# Contributing to phonometry Thank you for your interest in contributing to phonometry! We welcome contributions from the community to help improve this project. ## 🛠️ Development Setup To set up your development environment: 1. **Clone the repository:** ```bash git clone https://github.com/jmrplens/phonometry.git cd phonometry ``` 2. **Create a virtual environment:** ```bash python3 -m venv .venv source .venv/bin/activate # On Windows use: .venv\Scripts\activate ``` 3. **Install dependencies:** Install both production and development dependencies to run tests and linters. ```bash pip install -r requirements.txt pip install -r requirements-dev.txt ``` ## ✅ Code Quality Standards We enforce strict code quality standards. Before submitting a Pull Request, please ensure your code passes the following checks: ### 1. Type Checking (MyPy) We use strict type checking. Ensure no errors are reported: ```bash mypy . ``` ### 2. Linting & Formatting (Ruff) We use `ruff` for fast linting and formatting. ```bash ruff check . ``` ### 3. Testing (Pytest) Run the full test suite to ensure no regressions. We aim for 100% code coverage. ```bash pytest tests/ ``` To check coverage locally: ```bash pytest --cov=src/phonometry --cov-report=term-missing tests/ ``` ### 4. Documentation Images (auto-generated) Every image under `.github/images/` is generated with the library itself by `generate_graphs.py` — never hand-made. If your change alters filter responses, weighting curves or any other plotted behavior, regenerate the graphs and commit the affected images together with the code change: ```bash make graphs # or: python generate_graphs.py ``` When adding a feature with visual output, add a `generate_*` function to `generate_graphs.py` and reference the resulting image from the docs — do not commit images produced any other way. ## 📦 Releasing Releases are fully automated from the repository-root `VERSION` file: 1. Open a PR that bumps `VERSION` (semver) and moves the `[Unreleased]` CHANGELOG section to the new version. 2. When the PR merges to `main`, the release workflow validates the version, builds the package, publishes to PyPI and creates the GitHub Release (tag included). Zenodo registers the DOI from the release webhook. Never push tags manually; the workflow is idempotent (an existing tag is skipped). ## 🚀 How to Contribute ### Reporting Bugs If you find a bug, check the [Issues](https://github.com/jmrplens/phonometry/issues). If not reported, open a new issue with: - Steps to reproduce - Expected vs Actual behavior - Environment details (OS, Python version) ### Pull Requests 1. **Fork** the repository. 2. **Create a branch** for your feature (`git checkout -b feature/amazing-feature`). 3. **Commit** your changes with clear messages. 4. **Verify** your code using the commands above (`pytest`, `mypy`, `ruff`). 5. **Push** to your fork and **Open a Pull Request**. ## License By contributing to this project, you agree that your contributions will be licensed under the project's [LICENSE](LICENSE) file.