### Install MkDocs Dependencies Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Install the necessary dependencies to build the project documentation using `mkdocs`. This is included in the `.[dev]` extra. ```sh python -m pip install -e .[dev-mkdocs] ``` -------------------------------- ### Serve Documentation with MkDocs Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Serve the documentation locally for live preview. Changes to source files will be updated automatically if installed with `-e`. ```sh mkdocs serve ``` -------------------------------- ### Install Project in Editable Mode Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Install the project in editable mode for local development. This command also installs all necessary dependencies. ```sh python -m pip install -e . ``` -------------------------------- ### Build Project Distribution Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Use this command to build the source and binary distributions of the project. Ensure you have the `build` package installed. ```sh python -m pip install build python -m build ``` -------------------------------- ### Install Project with Development Dependencies Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Install the project in editable mode along with all development dependencies, including tools like `mypy`, `pylint`, and `pytest`. ```sh python -m pip install -e .[dev] ``` -------------------------------- ### Example Cross-Arch Dockerfile Name Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Provides a concrete example of a Dockerfile name following the specified naming scheme for testing on an arm64 architecture with Ubuntu 20.04 and Python 3.11. ```text arm64-ubuntu-20.04-python-3.11.Dockerfile ``` -------------------------------- ### Install Runtime and Test Dependencies Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Install the runtime and test dependencies separately to run `pytest` manually. This is included in the `.[dev]` extra. ```sh python -m pip install .[dev-pytest] ``` -------------------------------- ### Run Pytest Manually Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Execute tests manually using `pytest` after installing the necessary dependencies. ```sh pytest tests/test_*.py ``` -------------------------------- ### Run Tests and Checks with Nox Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Use `nox` to run tests and other checks in isolated virtual environments. This command installs the `dev-noxfile` extra dependencies. ```sh python -m pip install .[dev-noxfile] nox ``` -------------------------------- ### Build Documentation with MkDocs Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Build the project documentation. The output will be written to the `site/` directory. ```sh mkdocs build ``` -------------------------------- ### Push Multi-Version Documentation to Fork Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Deploy and push multi-version documentation to your fork's GitHub pages. Replace `your-fork-remote` with the name of your fork's remote. ```sh mike deploy --push --remote your-fork-remote ``` -------------------------------- ### Serve Multi-Version Documentation with Mike Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Serve the contents of the local `gh-pages` branch using `mike`. Note that live updates are not supported like `mkdocs serve`; `mike deploy` must be run to refresh. ```sh mike serve ``` -------------------------------- ### Deploy Multi-Version Documentation with Mike Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Deploy a specific version of the documentation using `mike`. This command builds the documentation and writes it to the local `gh-pages` branch. ```sh mike deploy my-version ``` -------------------------------- ### Set Default Version for Mike Serve Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Set the default version for `mike serve` to point to the newly deployed documentation. ```sh mike set-default my-version ``` -------------------------------- ### Run Pylint with Nox (Reusing Environment) Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Execute `pylint` using `nox` while reusing the current environment. Specify the test files to check. ```sh nox -R -s pylint -- test/test_*.py ``` -------------------------------- ### Reset Release Notes to Template Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md After a release, reset the `RELEASE_NOTES.md` file to its template state. This prepares for the next release cycle. ```sh cp .github/RELEASE_NOTES.template.md RELEASE_NOTES.md ``` -------------------------------- ### Run Mypy with Nox (Reusing Environment) Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Execute `mypy` using `nox` while reusing the current environment. Specify the test files to type check. ```sh nox -R -s mypy -- test/test_*.py ``` -------------------------------- ### Reuse Testing Environment with Nox Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Speed up testing by reusing the current environment with `nox -R`. Be aware this might lead to a less clean testing environment. ```sh nox -R ``` -------------------------------- ### Cross-Arch Dockerfile Naming Scheme Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Illustrates the naming convention for Dockerfiles used in cross-architecture testing. Ensure a Dockerfile exists for your target architecture, OS, and Python version before configuring test matrices. ```text --python-.Dockerfile ``` -------------------------------- ### Create Signed Git Tag for Release Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Create a new signed Git tag for a release. Use a semver-compatible version number prefixed with 'v', and use `RELEASE_NOTES.md` for the tag message. ```sh git tag -s --cleanup=whitespace -F RELEASE_NOTES.md v0.0.1 ``` -------------------------------- ### Run Pytest with Nox (Reusing Environment) Source: https://github.com/frequenz-floss/frequenz-quantities-python/blob/v1.x.x/CONTRIBUTING.md Execute `pytest` using `nox` while reusing the current environment for faster execution. Specify the test files to run. ```sh nox -R -s pytest -- test/test_*.py ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.