Skip to content

kudu-dynamics/plexiglass

Repository files navigation

PlexiGlass


Code style: black


PlexiGlass is a pure Python library providing common utilities not limited to

  • argparse
  • logging

It should additionally serve as a good Python project template.

Installation

$ 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

Development

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.

Coverage (pytest-cov)

The coverage information is retrieved by regex in the GitLab CI (check .gitlab-ci.yml).

Formatting (pytest-black)

The code for PlexiGlass is handled by the black Python code formatter.

$ black .

Code Style (pytest-flake8)

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.

Library Maintenance

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).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages