Skip to content

Commit 81af66e

Browse files
authored
Merge pull request #103 from petercorke/docs/contributing
2 parents 105e7e4 + 1885fc1 commit 81af66e

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

‎.github/CONTRIBUTING.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Contributing to the Machine Vision Toolbox for Python
2+
3+
Thanks for your interest in contributing! We welcome bug reports, fixes, new features, and documentation improvements.
4+
5+
## Reporting issues
6+
7+
Please use the issue template and include:
8+
9+
- Your operating system, Python version, and machinevisiontoolbox version
10+
- A short, self-contained code example that reproduces the problem
11+
12+
## Looking for somewhere to start?
13+
14+
Issues labelled [`good first issue`](https://github.com/petercorke/machinevision-toolbox-python/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) or [`help wanted`](https://github.com/petercorke/machinevision-toolbox-python/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) are a good place to start.
15+
16+
## Contributing code
17+
18+
- Keep pull requests scoped to a single feature or fix. If you have several unrelated changes, open separate PRs so each can be reviewed and merged independently.
19+
- For API changes, propose the change in [Discussions](https://github.com/petercorke/machinevision-toolbox-python/discussions) before opening a PR.
20+
- PR titles follow [Conventional Commits](https://www.conventionalcommits.org/) (`type: description`) — checked automatically on the PR.
21+
- Code is linted and import-sorted with [ruff](https://docs.astral.sh/ruff/) and formatted with [black](https://pypi.org/project/black/); configuration is in `pyproject.toml` under `[tool.ruff]` and `[tool.black]`. Type checking is done with [pyright](https://microsoft.github.io/pyright/) (`[tool.pyright]`).
22+
- New or changed code should be type-hinted using modern syntax (`X | Y`, `X | None`, `list[X]`, `dict[K, V]` — not `Union`, `Optional`, `List`, `Dict`).
23+
- Docstrings use reST style (`:param:`, `:returns:`). Type hints in the function signature already cover types, so `:type:`/`:rtype:` are rarely needed.
24+
- Any code change should be covered by tests and must not break existing ones. Tests live in `tests/`. Install the dev dependencies with `pip install -e '.[dev]'` (add `,docs` too if you're touching documentation), then run:
25+
26+
```
27+
python -m pytest --timeout=50 --timeout-method=thread
28+
```
29+
30+
- Target branch is `main`.
31+
32+
## License
33+
34+
By contributing, you agree that your contributions will be licensed under this project's [MIT License](LICENSE).

0 commit comments

Comments
 (0)