Skip to content

Latest commit

 

History

History
91 lines (57 loc) · 2.46 KB

CONTRIBUTING.rst

File metadata and controls

91 lines (57 loc) · 2.46 KB

Contribution guidelines

What to work on?

You are welcome to propose and contribute new ideas. We encourage you to open an issue so that we can align on the work to be done. It is generally a good idea to have a quick discussion before opening a pull request that is potentially out-of-scope.

Fork/clone/pull

The typical workflow for contributing to Qolmat is:

  1. Fork the main branch from the GitHub repository.
  2. Clone your fork locally.
  3. Commit changes.
  4. Push the changes to your fork.
  5. Send a pull request from your fork back to the original main branch.

Local setup

We encourage you to use a virtual environment. You'll want to activate it every time you want to work on Qolmat.

You can create a virtual environment via conda:

$ conda env create -f environment.dev.yml
$ conda activate env_qolmat_dev

If you need to use pytorch, enter the command:

$ pip install -e .[pytorch]

Once the environment is installed, pre-commit is installed, but need to be activated using the following command:

$ pre-commit install
$ pre-commit install-hooks

Documenting your change

If you're adding a class or a function, then you'll need to add a docstring with a doctest. We follow the numpy docstring convention, so please do too. Any estimator should follow the [scikit-learn API](https://scikit-learn.org/stable/developers/develop.html), so please follow these guidelines.

Updating changelog

You can make your contribution visible by :

  1. adding your name to the Contributors sections of AUTHORS.rst
  2. adding a line describing your change into HISTORY.rst

Testing

Pre-commit

These tests absolutely have to pass.

$ pre-commit run --all-files

Static typing

These tests absolutely have to pass.

$ mypy qolmat

Unit test

These tests absolutely have to pass. The coverage should on new features must be above 95%.

$ pytest -vs --cov-branch --cov=qolmat --pyargs tests --cov-report term-missing