Skip to content

Commit 4c4d9bf

Browse files
committed
update contributing
1 parent b5df153 commit 4c4d9bf

File tree

2 files changed

+73
-97
lines changed

2 files changed

+73
-97
lines changed

CONTRIBUTING.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing
2+
3+
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.
4+
5+
We are actively seeking additional maintainers. If you're interested, please contact [me](https://github.com/bckohan).
6+
7+
8+
## Installation
9+
10+
### Install Just
11+
12+
We provide a platform independent justfile with recipes for all the development tasks. You should [install just](https://just.systems/man/en/installation.html) if it is not on your system already.
13+
14+
`enum-properties` uses [uv](https://docs.astral.sh/uv) for environment, package and dependency management:
15+
16+
```bash
17+
just install_uv
18+
```
19+
20+
Next, initialize and install the development environment:
21+
22+
```bash
23+
just setup
24+
just install
25+
```
26+
27+
## Documentation
28+
29+
`enum-properties` documentation is generated using [Sphinx](https://www.sphinx-doc.org). Any new feature PRs must provide updated documentation for the features added. To build the docs run:
30+
31+
```bash
32+
just install-docs
33+
just docs
34+
```
35+
36+
Or to serve a live automatic rebuilding on localhost:
37+
38+
```bash
39+
just docs-live
40+
```
41+
42+
43+
## Static Analysis
44+
45+
`enum-properties` uses [ruff](https://docs.astral.sh/ruff) for python linting and formatting. [mypy](http://mypy-lang.org) and [pyright](https://github.com/microsoft/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:
46+
47+
```bash
48+
just check
49+
```
50+
51+
## Running Tests
52+
53+
`enum-properties` uses [pytest](https://docs.pytest.org/) 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.
54+
55+
To run the full suite:
56+
57+
```bash
58+
just test
59+
```
60+
61+
To run a single test, or group of tests in a class:
62+
63+
```bash
64+
just test <path_to_tests_file>::ClassName::FunctionName
65+
```
66+
67+
For instance to run all tests in TestFlags, and then just the
68+
test_int_flag example test you would do:
69+
70+
```bash
71+
just test tests/annotations/test_flags.py::TestFlags
72+
just test tests/annotations/test_flags.py::TestFlags::test_int_flag
73+
```

CONTRIBUTING.rst

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)