If you are looking for help with setting up or using mons
, or you have other questions about how the program works and how you can contribute, please use the #modding_help
or #modding_dev
channels in the Celeste Community Discord: https://discord.gg/celeste
- Check the existing issues to see if your request has already been made.
- If so, add a comment to describe how you plan to resolve it and request to have the issue assigned to you.
- If an issue does not already exist, create one describing your request and how you plan on implementing it.
- Clone the GitHub repository locally
$ git clone https://github.com/coloursofnoise/mons.git
$ cd mons
- Create a virtualenv
$ python3 -m venv env
$ . env/bin/activate
- Upgrade
pip
andsetuptools
$ python -m pip install --upgrade pip setuptools
- Install development dependencies, then install
mons
in editable mode
$ pip install -r requirements-dev.txt
$ pip install -e .
- Install the pre-commit hooks
$ pre-commit install
When making changes to the project, follow best practices for code and version control wherever possible:
- Commit frequently, with clear commit messages.
- Use Black to format your code. This and other tools will run automatically if you install pre-commit using the instructions above.
- Add tests to verify your code. Added tests should fail without your changes.
- Add or update docstrings and other relevant documentation.
- When creating your pull request, provide a short explanation for your changes and link to the issue being addressed: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
Run tests for the current environment with pytest
$ pytest
To run end-to-end tests using a local Celeste install, run pytest
and provide the path for the Celeste install
$ pytest --mons-test-install={/path/to/Celeste/install}
The full suite of tests can be run with tox
. This will also be run by the CI server when a pull request is submitted
$ tox
End-to-end tests can also be run with tox
$ tox -- --mons-test-install={/path/to/Celeste/install}
- Tag a commit with the format
v{version number}
where {version number} follows the semver specification. - The CI server will run tests, then build and upload the new version to PyPI.
- (Optional) Create a GitHub release for the new tag once CI has completed successfully.