Skip to content

Commit d26cb66

Browse files
committed
fix(docs): update contributing guide
1 parent 3e7e32b commit d26cb66

File tree

1 file changed

+40
-30
lines changed

1 file changed

+40
-30
lines changed

CONTRIBUTING.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ We welcome contributions from the community to help make this SDK robust, featur
66

77
## How to Contribute
88

9-
- **Pull Requests (PRs)** for bug fixes, features, and documentation updates.
10-
- **Bug Reports** for issues you encounter.
9+
1. Search existing issues/PRs to avoid duplicates.
10+
2. For opening an issue, use labels `bug`, `feature`, `docs`, or `question`.
11+
3. Fork the repo and create a feature branch:
12+
```bash
13+
git checkout -b feature/your-feature-name
14+
```
15+
4. Implement, test, then submit a PR referencing the issue.
1116

1217
## ✨ Write High-Quality Code
1318

@@ -19,12 +24,17 @@ We strive for high-quality, maintainable code. Please adhere to the following pr
1924
- Design clear, minimal, and predictable interfaces for functions and classes.
2025
- Use descriptive names for variables, functions, and classes.
2126
- Keep code focused and avoid unnecessary complexity.
27+
- Use [Google-style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) docstrings.
2228

23-
2. **Formatting, Linting & Type-Checking:**
29+
2. **Use dependencies sparingly:**
30+
31+
- Every dependency added is a potential security risk.
32+
- If the dependency is required, it should live in under `[project.optional-dependencies]` with a key marking the high level function, e.g. `rag`, `consensus`.
33+
34+
3. **Formatting, Linting & Type-Checking:**
2435

2536
- Use [ruff](https://docs.astral.sh/ruff/) for formatting and linting, both settings are defined in `pyproject.toml`.
26-
- Use [pyright](https://github.com/microsoft/pyright) for type checking, all new code MUST include accurate type hints.
27-
- Avoid using `typing.Any` unless absolutely necessary and clearly justified in comments.
37+
- Use [pyright](https://github.com/microsoft/pyright) for type checking, all new code MUST include accurate type hints. Avoid using `typing.Any` unless absolutely necessary and clearly justified in comments.
2838
- You can also install [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) into VSCode for an easier experience.
2939
- Ensure your code passes all checks locally without errors:
3040
```bash
@@ -33,37 +43,37 @@ We strive for high-quality, maintainable code. Please adhere to the following pr
3343
uv run pyright
3444
```
3545

36-
3. **Use dependencies sparingly:**
37-
- Every dependency added is a potential security risk.
38-
- If the dependency is required, it should live in under `[project.optional-dependencies]` with a key marking the high level function, e.g. `rag`, `consensus`.
39-
40-
## 🧪 Test Extensively
46+
4. **Test Extensively:**
4147

42-
- New features **must** include appropriate unit and/or integration tests using `pytest`.
43-
- Bug fixes **should** include tests demonstrating the fix.
44-
- **All tests must pass** locally before submitting a pull request. Run tests via:
48+
- New features **must** include appropriate unit and/or integration tests using `pytest`.
49+
- Bug fixes **should** include tests demonstrating the fix.
50+
- **All tests must pass** locally before submitting a pull request. Run tests via:
51+
```bash
52+
uv run pytest tests/unit/your-test.py -v
53+
uv run pytest tests/integration/your-test.py -v
54+
```
4555

46-
```bash
47-
# Run all tests (unit + integration, requires env vars for integration)
48-
uv run pytest
49-
```
56+
5. **Use Conventional Commits:**
5057

51-
## 🚨 CI Checks Must Pass
58+
- All commit messages **must** adhere to the **Conventional Commits** specification. This helps automate changelog generation and provides a clear commit history.
59+
- Read the spec: [https://www.conventionalcommits.org/](https://www.conventionalcommits.org/)
60+
- **Format:** `<type>[optional scope]: <description>`
61+
- **Examples:**
62+
- `feat(rag): add support for Neo4j AuraDB connection`
63+
- `fix(ecosystem): correct decimal calculation in FTSO price feed`
64+
- `docs(readme): update README with installation instructions`
65+
- `test(rag): add unit tests for GraphDbSettingsModel`
66+
- `chore(deps): update ruff version in pyproject.toml`
5267

53-
- We use Continuous Integration (CI) pipelines (e.g., GitHub Actions) to automatically run linters, type checkers, and tests.
54-
- **Pull requests will only be considered for merging if all CI checks pass.** Ensure your code meets all quality gates before submitting.
68+
## 🚨 PR Checklist
5569

56-
## ✅ Use Conventional Commits
70+
Before you mark your PR as ready-to-review:
5771

58-
- All commit messages **MUST** adhere to the **Conventional Commits** specification. This helps automate changelog generation and provides a clear commit history.
59-
- Please read the specification: [https://www.conventionalcommits.org/](https://www.conventionalcommits.org/)
60-
- **Format:** `<type>[optional scope]: <description>`
61-
- **Examples:**
62-
- `feat(rag): add support for Neo4j AuraDB connection`
63-
- `fix(ecosystem): correct decimal calculation in FTSO price feed`
64-
- `docs(readme): update README with installation instructions`
65-
- `test(rag): add unit tests for GraphDbSettingsModel`
66-
- `chore(deps): update ruff version in pyproject.toml`
72+
- [ ] Branch is up-to-date with `main`.
73+
- [ ] All linting, formatting, and type checks pass.
74+
- [ ] Tests cover new code (unit + integration).
75+
- [ ] Commit messages follow Conventional Commits.
76+
- [ ] PR description includes purpose and implementation details.
6777

6878
## 📜 License
6979

0 commit comments

Comments
 (0)