From 00f1c877e035c6e694f659ef0d178a88507592bc Mon Sep 17 00:00:00 2001 From: Harrison Nicholls Date: Mon, 9 Sep 2024 12:21:38 +0200 Subject: [PATCH] Fixed docs --- CONTRIBUTING.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d502566 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,60 @@ +# Contributing guidelines + +## Development + +### Building the documentation + +The documentation is written in [markdown](https://www.markdownguide.org/basic-syntax/), and uses [mkdocs](https://www.mkdocs.org/) to generate the pages. + +To build the documentation for yourself: + +```console +pip install -e .[docs] +mkdocs serve +``` + +You can find the documentation source in the [docs](https://github.com/FormingWorlds/CALLIOPE/tree/main/docs) directory. +If you are adding new pages, make sure to update the listing in the [`mkdocs.yml`](https://github.com/FormingWorlds/CALLIOPE/blob/main/mkdocs.yml) under the `nav` entry. + +The documentation is hosted on [readthedocs](https://readthedocs.io/projects/fwl-calliope). + +### Running tests + +CALLIOPE uses [pytest](https://docs.pytest.org/en/latest/) to run the tests. You can run the tests for yourself using: + +```console +pytest +``` + +To check coverage: + +```console +coverage run -m pytest +coverage report # to output to terminal +coverage html # to generate html report +``` + + +### Making a release + +The versioning scheme we use is [CalVer](https://calver.org/). + +0. Update requirements files: + +```console +python tools/generate_requirements_txt.py +pip-compile -o requirements_full.txt pyproject.toml +``` + +1. Bump the version (`release`/`patch`) as needed + +```console +bump-my-version bump release +# 24.06.26 +``` + +2. Commit and push your changes. + +3. Make a new [release](https://github.com/FormingWorlds/CALLIOPE/releases). Make sure to set the tag to the specified version, e.g. `24.06.26`. + +4. The [upload to pypi](https://pypi.org/project/fwl-calliope) is triggered when a release is published and handled by [this workflow](https://github.com/FormingWorlds/CALLIOPE/actions/workflows/publish.yaml).