We welcome any kind of contribution to our software, from a simple comment or question to a full-fledged pull request.
A contribution can be one of the following cases:
- You have a question;
- You think you may have found a bug (including unexpected behavior);
- You want to change the code base (e.g., to fix a bug, add a new feature, or update documentation).
The sections below outline the steps in each case.
- Use the search functionality here to see if someone already filed the same issue;
- If your issue search did not yield any relevant results, make a new issue;
- Apply the "Question" label; apply other labels when relevant.
- Use the search functionality here to see if someone already filed the same issue;
- If your issue search does not yield any relevant results, make a new issue, providing enough information to the rest of the community to understand the cause and context of the problem. Depending on the issue, you may want to include:
- the SHA hashcode of the commit that is causing your problem;
- some identifying information (name and version number) for dependencies you're using;
- information about the operating system;
- Apply relevant labels to the newly created issue.
- (Important) Announce your plan to the rest of the community before you start working. This announcement should be in the form of a (new) issue;
- (Important) Wait until some kind of consensus is reached about your idea being a good idea;
- If needed, fork the repository to your own Github profile and create your own feature branch off of the latest main commit. While working on your feature branch, make sure to stay up to date with the main branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions here and here);
- Make sure the existing tests still work by following the instructions in Run the test suite;
- Add your own tests (if necessary);
- If you added your own tests, make sure they pass by following the instructions in Run the test suite;
- If your contribution is a performance enhancement, make sure to include benchmarks. See Benchmarking for more information;
- Update or expand the documentation;
- Make sure the documentation builds without errors by following the instructions in Build the documentation;
- Check that you can build the package locally and that it passes twine check. See Build from source for more information;
- Push your feature branch to (your fork of) the CVMatrix repository on GitHub;
- Create the pull request, e.g. following the instructions here.
If you feel like you've made a valuable contribution, but you don't know how to write or run tests for it or generate the documentation, don't let this discourage you from making the pull request; we can help you! Just submit the pull request, but remember that you might be asked to append additional commits to your pull request.
CVMatrix uses poetry to manage its dependencies and packaging. To build the package from source, follow these steps:
-
Clone the repository:
git clone https://github.com/Sm00thix/CVMatrix.git
-
Change to the repository directory:
cd CVMatrix
-
Install poetry and twine:
pip3 install poetry pip3 install twine
-
Install the dependencies:
poetry install
-
Build the package:
poetry build
-
Check the package with twine:
twine check dist/*
To run the test suite, follow these steps:
-
Install poetry:
pip3 install poetry
-
Install the project dependencies with poetry:
poetry install
-
Install additional dependencies for testing:
poetry add --group dev pandas pytest flake8 pytest-cov typeguard
-
Now, the tests can be run with the following command:
poetry run pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=cvmatrix/ --cov-report=xml --cov-report=html --typeguard-packages=cvmatrix/
-
Install sphinx, the sphinx-rtd-theme, and the MyST-Parser:
pip3 install sphinx sphinx-rtd-theme myst-parser
-
Change to the docs directory:
cd docs
-
Build the documentation:
make html
To run benchmarks, follow the instructions here.