Skip to content

Commit 40a50f3

Browse files
Create CONTRIBUTING.rst
1 parent a8d58c0 commit 40a50f3

1 file changed

Lines changed: 114 additions & 0 deletions

File tree

docs/templates/CONTRIBUTING.rst

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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/CarterPerez-dev/XYZ.git
15+
cd stripe-referral
16+
17+
2. Create a virtual environment::
18+
19+
python -m venv venv
20+
source venv/bin/activate # On Windows: venv\Scripts\activate
21+
22+
3. Install in development mode::
23+
24+
pip install -e ".[dev]"
25+
26+
4. Set up your environment::
27+
28+
cp .env.example .env
29+
# Edit .env with your database URL and API keys
30+
31+
5. Run database migrations::
32+
33+
alembic upgrade head
34+
35+
----
36+
37+
Code Style
38+
==========
39+
40+
This project follows strict coding standards:
41+
42+
Formatting
43+
----------
44+
45+
- **Formatter**: Use ``yapf`` for code formatting
46+
- **Linter**: Use ``ruff`` for linting only (not formatting)
47+
- **Type hints**: Full type hints everywhere using modern syntax (``str | None``, ``list[str]``)
48+
- **Docstrings**: Vertical multi-line format only
49+
- **Imports**: Vertical multi-line for 2+ imports with trailing commas
50+
- **Constants**: All magic numbers and strings must be constants or enums
51+
52+
Run formatters and linters
53+
---------------------------
54+
55+
::
56+
57+
# Format code
58+
yapf -ir src/
59+
60+
# Lint
61+
ruff check src/
62+
63+
# Type check
64+
mypy src/
65+
66+
----
67+
68+
Testing
69+
=======
70+
71+
Run tests before submitting::
72+
73+
pytest -v
74+
75+
----
76+
77+
Pull Request Process
78+
====================
79+
80+
1. Create a feature branch from ``main``
81+
2. Make your changes following code style guidelines
82+
3. Add tests for new functionality
83+
4. Ensure all tests pass
84+
5. Update documentation if needed
85+
6. Submit a pull request
86+
87+
----
88+
89+
Commit Messages
90+
===============
91+
92+
Use conventional commit format:
93+
94+
- ``feat:`` New features
95+
- ``fix:`` Bug fixes
96+
- ``docs:`` Documentation changes
97+
- ``refactor:`` Code refactoring
98+
- ``test:`` Test additions/changes
99+
- ``chore:`` Maintenance tasks
100+
101+
Example::
102+
103+
feat: XYZ
104+
105+
- XYZ
106+
- XYZ
107+
- XYZ
108+
109+
----
110+
111+
Questions?
112+
==========
113+
114+
Open an issue or reach out to the maintainers!

0 commit comments

Comments
 (0)