Skip to content

Latest commit

 

History

History
102 lines (72 loc) · 2.23 KB

File metadata and controls

102 lines (72 loc) · 2.23 KB

Contributing to multipac_testbench

Thank you for considering contributing to multipac_testbench! 🎉


🛠 Development Workflow

I use long-lived branches for each major series (e.g., 1.7.x).

TL;DR

  • Base your work on the relevant X.Y.x branch
  • Run pre-commit hooks before committing
  • Run and write tests
  • Submit a pull request

🧪 Running Tests

The project uses pytest. From the root of the repository:

pytest -m "not implementation"

You will need to install development dependencies:

pip install multipac_testbench -e ".[test]"

🎯 Pre-commit Hooks

I use pre-commit to enforce formatting and static checks.
It should be automatically installed when running pip install multipac_testbench. Set it up as follows:

pre-commit install

This ensures that all required hooks run automatically before each commit.

Hook configuration

The repository uses the following hooks:

  • black (code formatting)
  • isort (import sorting)
  • pyupgrade (modernize Python syntax)
  • Various pre-commit-hooks like:
    • check-docstring-first
    • check-merge-conflict
    • end-of-file-fixer
    • trailing-whitespace
    • and many more

The full configuration is in .pre-commit-config.yaml.

To run all hooks manually:

pre-commit run --all-files

✨ Contributing Code

  1. Fork the repository and clone your fork.
  2. Create a branch from the appropriate X.Y.x branch:
    git checkout -b fix/some-bug 1.7.x
  3. Make your changes.
  4. Ensure pre-commit hooks pass.
  5. Add tests if applicable.
  6. Commit and push:
    git commit -m "Fix: correct bug in XYZ"
    git push origin fix/some-bug
  7. Open a pull request into the corresponding X.Y.x branch.

🧾 Changelog and Versioning

Please add an entry to CHANGELOG.md under the appropriate unreleased version header:

## [X.Y.Z] - unreleased

I use Semantic Versioning: MAJOR.MINOR.PATCH.


🗣 Questions or Suggestions?

Open an issue or start a discussion. I'm happy to help!


Thank you again for contributing 🙏 -- Adrien