Skip to content

Contributing

Guidelines

We welcome contributions to the library! If you have a bug fix or new feature that you would like to contribute, please follow the steps below:

  1. Fork the repository on GitHub.
  2. Clone the repository to your local machine.
  3. Create a new branch for your bug fix or feature.
  4. Make your changes and test them thoroughly, making sure that it passes all current tests.
  5. Commit your changes and push the branch to your fork.
  6. Open a pull request on the main repository.

Code of Conduct

All contributors are expected to follow the project's code of conduct, which is based on the Contributor Covenant.

Reporting Bugs

If you find a bug in the library, please report it by opening an issue on GitHub. Be sure to include the version of the library you're using, as well as any error messages or tracebacks and a reproducible example.

Requesting Features

If you have a suggestion for a new feature, please open an issue on GitHub. Be sure to explain the problem that you're trying to solve and how you think the feature would solve it.

Submitting Pull Requests

When submitting a pull request, please make sure that you've followed the steps above and that your code has been thoroughly tested. Also, be sure to include a brief summary of the changes you've made and a reference to any issues that your pull request resolves.

Code formatting

iso-week-date uses ruff as linter and formatter:

make lint
ruff check iso_week_date tests --fix
ruff format iso_week_date tests

As part of the checks on pull requests, it is checked whether the code follows those standards. To ensure that the standard is met, it is recommended to install pre-commit hooks:

python -m pip install pre-commit
pre-commit install

Developing

Let's suppose that you already did steps 1-3 from the above list, now you should install the library and its developing dependencies in editable way.

First move into the repo folder: cd iso-week-date.

Then:

make init-dev
pip install -e ".[all-dev]" --no-cache-dir
pre-commit install

Now you are ready to proceed with all the changes you want to!

Testing

Once you are done with changes, you should:

  • add tests for the new features in the /tests folder
  • make sure that new features do not break existing codebase by running tests:

    make test
    
    pytest tests -vv
    

Docs

The documentation is generated using mkdocs-material, the API part uses mkdocstrings.

If a breaking feature is developed, then we suggest to update documentation in the /docs folder as well, in order to describe how this can be used from a user perspective.