First off, thank you for considering contributing to Parides! It's people like you that make open source such a great community.
If you've noticed a bug or have a feature request, make sure to check our Issues first to see if someone else has already created a ticket. If not, go ahead and make one!
Parides primarily uses Poetry for dependency management, but you can also use a standard virtual environment.
- Ensure you have Python 3.10+ installed.
- Install Poetry:
pip install poetry
- Clone the repository and install dependencies:
git clone https://github.com/goettl79/parides.git cd parides poetry install
- Ensure you have Python 3.10+ installed.
- Clone the repository:
git clone https://github.com/goettl79/parides.git cd parides - Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the package in editable mode with development dependencies:
pip install -e ".[dev]"
- Create a new branch from
master(git checkout -b feature/your-feature-name). - Make your changes.
- Ensure you add type hints where applicable.
Before submitting a Pull Request, ensure your code passes the test suite and linting rules.
- Run Linting (flake8):
# Using Poetry (if venv not activated) poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # With activated venv flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- Run Unit Tests:
# Using Poetry poetry run pytest # With activated venv pytest
- Run Integration Tests (Optional):
If you made changes to the API fetching logic, try to test against a real Prometheus instance:
export PROM_URL="http://localhost:9090" # Replace with your Prometheus URL # Using Poetry poetry run pytest tests/integration/ # With activated venv pytest tests/integration/
- Push your branch to GitHub (
git push origin feature/your-feature-name). - Open a Pull Request against the
masterbranch. - Provide a clear description of what the PR does and link to any relevant issues.
- The CI pipeline will automatically run your code against Python 3.9-3.12. Please fix any failures before requesting a review.