First off, thank you for considering contributing to CPPP Collector! It's people like you that make CPPP Collector such a great tool.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps which reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include screenshots and animated GIFs if possible
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behavior and the expected behavior
- Explain why this enhancement would be useful
- Fill in the required template
- Follow the Python styleguides
- Include appropriate test cases
- End all files with a newline
- Avoid platform-dependent code
-
Fork the repository
-
Clone your fork:
git clone https://github.com/pardarsh/cppp-collector.git cd cppp-collector -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install in development mode:
pip install -e ".[dev]" -
Install pre-commit hooks:
pre-commit install
# Run all tests
pytest tests/
# Run with coverage
pytest tests/ --cov=cppp_collector
# Run specific test file
pytest tests/test_collector.py -v
# Run specific test
pytest tests/test_collector.py::TestDateParsing::test_parse_date_with_am_pm -vWe follow PEP 8 style guidelines. The project uses:
- black for code formatting
- flake8 for linting
- mypy for type checking
Run these before submitting:
# Format code
black cppp_collector/ tests/ examples/
# Check style
flake8 cppp_collector/ tests/ examples/
# Type checking
mypy cppp_collector/Or use pre-commit to run all checks:
pre-commit run --all-files- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
Example:
Add support for Maharashtra procurement portal
- Implement MaharashtraCollector class
- Add parser for government website format
- Add 5 unit tests
- Update documentation
Closes #123
- Use clear and concise language
- Include examples for new features
- Update README.md if adding user-facing features
- Update docstrings for code changes
If you're adding support for a new procurement source:
- Create
cppp_collector/collectors/source_name.py - Implement the collector class following the CPPPCollector pattern
- Map data to canonical schema
- Add comprehensive tests in
tests/test_source_name.py - Update README with source information
- Add example in
examples/
Maintainers: to release a new version:
- Update version in
pyproject.toml - Update CHANGELOG.md
- Create a git tag:
git tag v0.2.0 - Push tag:
git push origin v0.2.0 - GitHub Actions will build and publish to PyPI
Feel free to open an issue with the question label or contact the maintainers.
This contributing guide is adapted from the Atom Contributing Guide.