Contributing¶
Contributions to The Data Packet are welcome. This page covers the contribution process; Development Setup covers the local dev environment.
Ways to contribute¶
-
Bug reports
Open an issue with steps to reproduce, expected behaviour, and actual behaviour.
-
Feature requests
Open an issue describing the use case and proposed solution. Discuss approach before writing code for significant changes.
-
Pull requests
Bug fixes, new article sources, documentation improvements. All PRs require passing CI (format, type check, tests).
-
Documentation
Corrections, clearer explanations, additional examples. Docs live in
docs/and are written in Markdown.
Contribution process¶
- Open an issue first for significant changes — agree on approach before writing code.
- Fork the repository and create a feature branch from
main. - Write tests for any new functionality.
-
Run the full quality check before submitting:
-
Open a pull request against
mainwith a clear description.
Adding a new article source¶
The source system is designed for extension. To add a new source:
1. Create the module
from the_data_packet.sources.base import Article, ArticleSource
class YourSource(ArticleSource):
def collect_articles(
self,
categories: list[str],
max_articles: int,
) -> list[Article]:
# Fetch and return Article objects
...
2. Register it
Add to the_data_packet/sources/__init__.py and the --sources choices in cli.py.
3. Add tests
Code standards¶
| Standard | Tool | Config |
|---|---|---|
| Formatting | black |
line length 88, target py3.9 |
| Import order | isort |
black-compatible profile |
| Linting | flake8 |
max line length 120 |
| Type hints | mypy |
strict, ignore missing imports |
| Docstrings | Google style | all public classes and functions |
Reporting security issues¶
Open a security vulnerability report on GitHub. For high-severity issues where public disclosure would be harmful before a fix is available, use GitHub's private security advisory instead.
Either way, include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
License¶
By contributing, you agree that your contributions will be licensed under the MIT License.