Contributions are encouraged! Please use the issue page to submit feature requests or bug reports. Issues with attached PRs will be given priority and have a much higher likelihood of acceptance. Please also open an issue and associate it with any submitted PRs. The aim is to keep this library as lightweight as possible. Only features with broad based use cases will be considered.
We are actively seeking additional maintainers. If you're interested, please contact me.
enum-properties uses Poetry for environment, package and dependency management.
poetry install
enum-properties documentation is generated using Sphinx with the readthedocs theme. Any new feature PRs must provide updated documentation for the features added. To build the docs run:
cd ./doc poetry run make html
enum-properties uses Pylint for python linting. Header imports are also standardized using isort. Static type checking is not done because the code simply relies too heavily on metaprogramming for it to be useful. Before any PR is accepted the following must be run, and static analysis tools should not produce any errors or warnings. Disabling certain errors or warnings where justified is acceptable:
poetry run isort enum_properties poetry run black enum_properties poetry run pylint enum_properties poetry run doc8 -q doc poetry check poetry run pip check poetry run python -m readme_renderer ./README.rst
enum-properties is setup to use pytest to run unit tests. All the tests are housed in enum_properties/tests/tests.py. Before a PR is accepted, all tests must be passing and the code coverage must be at 100%. A small number of exempted error handling branches are acceptable.
To run the full suite:
poetry run pytest
To run a single test, or group of tests in a class:
poetry run pytest <path_to_tests_file>::ClassName::FunctionName
For instance to run all tests in TestEnums, and then just the test_properties_and_symmetry test you would do:
poetry run pytest enum_properties/tests/tests.py::TestEnums poetry run pytest enum_properties/tests/tests.py::TestEnums::test_properties_and_symmetry