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.
We provide a platform independent justfile with recipes for all the development tasks. You should install just if it is not on your system already.
enum-properties uses uv for environment, package and dependency management:
just install-uvNext, initialize and install the development environment:
just setup
just installenum-properties documentation is generated using Sphinx. Any new feature PRs must provide updated documentation for the features added. To build the docs run:
just docsOr to serve a live automatic rebuilding on localhost:
just docs-liveenum-properties uses ruff for python linting and formatting. mypy and pyright are used for static type checking. 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:
just checkenum-properties uses pytest to define and run tests. All the tests are housed under tests/. 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:
just testTo run a single test, or group of tests in a class:
just test <path_to_tests_file>::ClassName::FunctionNameFor instance to run all tests in TestFlags, and then just the test_int_flag example test you would do:
just test tests/annotations/test_flags.py::TestFlags
just test tests/annotations/test_flags.py::TestFlags::test_int_flagTo debug a test:
just debug-test tests/annotations/test_flags.py::TestFlags::test_int_flagUpdate the versions in pyproject.toml and src/enum_properties/init.py then run:
just release x.x.x