Skip to content

Commit 67d882c

Browse files
CONTRIBUTING.rst template
1 parent 119f062 commit 67d882c

1 file changed

Lines changed: 104 additions & 0 deletions

File tree

docs/templates/CONTRIBUTING.rst

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
====================================
2+
Contributing to XYZ
3+
====================================
4+
5+
Thank you for your interest in contributing to **XYZ**!
6+
7+
----
8+
9+
Development Setup
10+
=================
11+
12+
1. Clone the repository::
13+
14+
git clone https://github.com/USERNAME/XYZ.git
15+
cd XYZ
16+
17+
2. ...
18+
19+
3. ...
20+
21+
4. ...
22+
23+
5. ...
24+
25+
----
26+
27+
Code Style
28+
==========
29+
30+
This project follows strict coding standards:
31+
32+
Formatting
33+
----------
34+
35+
- **Formatter**: Use ``yapf`` for code formatting
36+
- **Linter**: Use ``ruff`` for linting only (not formatting)
37+
- **Type hints**: Full type hints everywhere using modern syntax (``str | None``, ``list[str]``)
38+
- **Docstrings**: Vertical multi-line format only
39+
- **Imports**: Vertical multi-line for 2+ imports with trailing commas
40+
- **Constants**: All magic numbers and strings must be constants or enums
41+
42+
Run formatters and linters
43+
---------------------------
44+
45+
::
46+
47+
# Format code
48+
yapf -ir src/
49+
50+
# Lint
51+
ruff check src/
52+
53+
# Type check
54+
mypy src/
55+
56+
----
57+
58+
Testing
59+
=======
60+
61+
Run tests before submitting::
62+
63+
uv run pytest
64+
65+
----
66+
67+
Pull Request Process
68+
====================
69+
70+
1. Create a feature branch from ``main``
71+
2. Make your changes following code style guidelines
72+
3. Add tests for new functionality
73+
4. Ensure all tests pass
74+
5. Update documentation if needed
75+
6. Submit a pull request
76+
77+
----
78+
79+
Commit Messages
80+
===============
81+
82+
Use conventional commit format:
83+
84+
- ``feat:`` New features
85+
- ``fix:`` Bug fixes
86+
- ``docs:`` Documentation changes
87+
- ``refactor:`` Code refactoring
88+
- ``test:`` Test additions/changes
89+
- ``chore:`` Maintenance tasks
90+
91+
Example::
92+
93+
feat: XYZ
94+
95+
- XYZ
96+
- XYZ
97+
- XYZ
98+
99+
----
100+
101+
Questions?
102+
==========
103+
104+
Open an issue or reach out to the maintainers!

0 commit comments

Comments
 (0)