Skip to content

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs to our issues page.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug, in the form of a minimal reproducible example.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.

Write Documentation

caveclient could always use more documentation, whether as part of the official caveclient docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

The best way to send feedback is to create an issue on GitHub.

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that while contributions are welcome, developer/maintainer time is limited.

Get Started

Ready to contribute? Here's how to set up caveclient for local development.

  • Fork the repo on GitHub.
  • Clone your fork locally
git clone git@github.com:your_name_here/CAVEclient.git
  • Ensure pip is installed.
  • Create a virtual environment (here we use venv):
python3 -m venv .venv
  • Start your virtualenv:
source .venv/bin/activate
  • Create a branch for local development:
git checkout -b name-of-your-bugfix-or-feature
  • Make your changes locally
  • Install development requirements:
pip install -r test_requirements.txt
pip install -e .
  • When you're done making changes, check that your changes pass the tests by running pytest:
pytest tests

Note that once you submit your pull request, GitHub Actions will run the tests also, including on multiple operating systems and Python versions. Your pull request will have to pass on all of these before it can be merged.

  • Ensure your contribution meets style guidelines. First, install ruff:
pip install ruff
  • Fix linting and formatting. From the root of the repository, run the following commands:
ruff check . --extend-select I --fix
ruff format .
  • Commit your changes and push your branch to GitHub:
git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  • The pull request should include tests if adding a new feature.
  • The docs should be updated with whatever changes you have made. Put your new functionality into a function with a docstring, and make sure the new functionality is documented after building the documentation.

Documentation style

We use mkdocs to build the documentation. In particular, we use the mkdocs-material theme, and a variety of other extensions.

Note

More information codifying our documentation style and principles coming soon. For now, just try to follow the style of the existing documentation.