Skip to content

Latest commit

 

History

History
86 lines (54 loc) · 2.68 KB

File metadata and controls

86 lines (54 loc) · 2.68 KB

Contributing

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.

Installation

Install Just

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-uv

Next, initialize and install the development environment:

    just setup
    just install

Documentation

enum-properties documentation is generated using Sphinx. Any new feature PRs must provide updated documentation for the features added. To build the docs run:

    just docs

Or to serve a live automatic rebuilding on localhost:

    just docs-live

Static Analysis

enum-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 check

Running Tests

enum-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 test

To run a single test, or group of tests in a class:

    just test <path_to_tests_file>::ClassName::FunctionName

For 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_flag

To debug a test:

    just debug-test tests/annotations/test_flags.py::TestFlags::test_int_flag

Issuing Releases

Update the versions in pyproject.toml and src/enum_properties/init.py then run:

    just release x.x.x