PlexiGlass is a pure Python library providing common utilities not limited to
- argparse
- logging
It should additionally serve as a good Python project template.
$ pip install poetry
$ poetry config virtualenvs.create false
$ poetry install
Optional dependencies can be installed using the extras syntax.
$ poetry install -E logging -E synapse
A shortcut has been provided to install all optional dependencies. This is the recommended install option for developers working on plexiglass.
$ poetry install -E all
A test suite is available in the tests directory.
They are found and run with pytest.
$ py.test
$ poetry run pytest
Configuration is found in the pytest.ini
file.
The coverage information is retrieved by regex in the GitLab CI (check .gitlab-ci.yml
).
The code for PlexiGlass is handled by the black Python code formatter.
$ black .
Code is checked against the flake8 tool as part of the test suite.
Add # noqa
to the end of lines that should not be linted.
Add # pragma: no cover
to the end of blocks/statements that should not be covered.
To generally update dependencies that are unbounded,
# The lock file will contain any newly updated dependency versions.
# Which we then automatically populate the `setup.py` file with.
$ poetry update
$ dephell convert deps
# DEV: Until https://github.com/dephell/dephell/issues/178 is resolved
# Remove the `README.rst` and point to `README.md` manually instead.
$ rm -f README.rst
$ sed -i 's#README.rst#README.md#' setup.py
Distribution Statement "A" (Approved for Public Release, Distribution Unlimited).