I use standard python environments which I install in the root folder of the
project. I typically call the folder .venv, and this is in the .gitignore.
~/bareASGI$ python3.11 -m venv .venv
~/bareASGI$ . .venv/bin/activate
(.venv) ~/bareASGI$The project uses standard tooling.
The required packages can be installed wit the following command.
(.venv) ~/bareASGI$ pip install -e '.[dev,docs,examples]'The python code is fully typed. Types can be checked by running the standalone
mypy command.
(.venv) ~/bareASGI$ mypy
Success: no issues found in 58 source filesThe project uses pylint.
(.venv) ~/bareASGI$ pylint bareasgiThere are a growing number of tests. The tests can be run as follows.
(.venv) ~/bareASGI$ pytest testsThe following commands build the package and publish it. Note that publishing requires authentication.
(.venv) ~/bareASGI$ python -m build
Building bareasgi (4.0.1)
- Building sdist
- Built bareasgi-4.0.1.tar.gz
- Building wheel
- Built bareasgi-4.0.1-py3-none-any.whl
(.venv) ~/bareASGI$ twine upload dist/*
Username:The project uses mkdocs to build the docs
and mike to handle multiple versions. The
docs are served by GitHub Pages on the gh-pages
branch.
The following would build and publish version 4.0 and update the latest
alias to point to 4.0.
mike deploy --push --update-aliases 4.0 latest
Two aliases are configured: latest and stable. The following would set the
default to latest.
mike set-default --push latest