Contributing

ConfigUpdater is an open-source project and needs your help to improve. If you experience bugs or other issues, please file an issue report on our issue tracker. If you also want to contribute code or improve the documentation, it’s best to create a Pull Request (PR) on GitHub. Here is a short introduction to how it works.

Code Contributions

Submit an issue

Before you work on any non-trivial code contribution, it’s best to first create an issue report to start a discussion on the subject. This often provides additional considerations and avoids unnecessary work.

Create an environment

ConfigUpdater requires Python 3.11 or newer. The development environment is managed with uv, so install it first. uv also downloads a suitable Python version if you don’t have one.

Clone the repository

  1. Create a GitHub account if you do not already have one.

  2. Fork the project repository: click on the Fork button near the top of the page. This creates a copy of the code under your account on the GitHub server.

  3. Clone this copy to your local disk:

    git clone git@github.com:YourLogin/configupdater.git
    
  4. Create a virtual environment in .venv with configupdater and all development tools (pytest, mypy, tox, pre-commit):

    uv sync
    
  5. Install the pre-commit hooks:

    uv run pre-commit install
    

    The hooks automatically check the code you are writing on every commit.

  6. Create a branch to hold your changes:

    git checkout -b my-feature
    

    and start making changes. Never work on the main branch!

  7. Start your work on this branch. When you’re done editing, do:

    git add modified_files
    git commit
    

    to record your changes in Git, then push them to GitHub with:

    git push -u origin my-feature
    
  8. Please check that your changes don’t break any unit tests with:

    uv run tox
    

    or, for a quick run without coverage, uv run pytest.

    Don’t forget to add unit tests for a new feature, and a regression test for a bugfix.

  9. The pre-commit hooks check your code style with ruff on every commit. You can also run them on all files with uv run tox -e lint, and check the type hints with uv run tox -e typecheck.

  10. Add yourself to the list of contributors in AUTHORS.rst.

  11. Go to the web page of your ConfigUpdater fork, and click “Create pull request” to send your changes to the maintainers for review. Find more detailed information on creating a PR.