Welcome to Py-FSRS!
In this short guide, you will get a quick overview of how you can contribute to the Py-FSRS project.
If you encounter an issue with Py-FSRS and would like to report it, you'll first want to make sure you're using the latest version of Py-FSRS.
The latest version of py-fsrs can be found under releases and you can verify the version of your current installation with the following command:
pip show fsrs
Once you've confirmed your version, please report your issue in the issues tab.
Step 1: Start by forking this repo, then cloning it to your local machine.
Step 2: Create a new local branch where you will implement your changes.
Install the fsrs
python package locally in editable mode from the src with
pip install -e .
Now you're ready to make changes to src/fsrs
and see your changes reflected immediately!
This project follows semantic versioning, so please make sure to increment the version number in pyproject.toml when contributing new code.
Py-FSRS uses Ruff for linting and formatting, mypy for static type-checking and pytest to run its tests. In order for your contribution to be accepted, your code must pass the linting, type-checking and formatting checks as well as the tests.
You can install these packages with
pip install ruff mypy pytest
Lint your code with:
ruff check --fix
Run the type-checker:
mypy .
Format your code with:
ruff format
Run the tests with:
pytest
Additionally, you are encouraged to contribute your own tests to tests/test_fsrs.py to help make Py-FSRS more reliable!
To submit a pull request, commit your local changes to your branch then push the branch to your fork. You can now open a pull request.