frequenz-repo-config0.11.0
Published
Frequenz repository setup tools and common configuration
pip install frequenz-repo-config
Package Downloads
Project URLs
Requires Python
<4,>=3.11
Dependencies
- nox
>=2022.11.21
- mkdocs-gen-files
<0.6.0,>=0.4.0
- semver
<4,>=3.0.1
- github-action-utils
<2,>=1.1.0
- grpcio-tools
<2,>=1.47.0; extra == "api"
- mypy-protobuf
<4,>=3.0.0; extra == "api"
- setuptools
<76,>=67.6.0; extra == "api"
- frequenz-repo-config
[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]; extra == "dev"
- flake8
==7.1.1; extra == "dev-flake8"
- flake8-docstrings
==1.7.0; extra == "dev-flake8"
- flake8-pyproject
==1.2.3; extra == "dev-flake8"
- pydoclint
==0.5.9; extra == "dev-flake8"
- pydocstyle
==6.3.0; extra == "dev-flake8"
- black
==24.10.0; extra == "dev-formatting"
- isort
==5.13.2; extra == "dev-formatting"
- black
==24.10.0; extra == "dev-mkdocs"
- Markdown
==3.7; extra == "dev-mkdocs"
- mike
==2.1.3; extra == "dev-mkdocs"
- mkdocs-gen-files
==0.5.0; extra == "dev-mkdocs"
- mkdocs-literate-nav
==0.6.1; extra == "dev-mkdocs"
- mkdocs-macros-plugin
==1.3.7; extra == "dev-mkdocs"
- mkdocs-material
==9.5.45; extra == "dev-mkdocs"
- mkdocstrings
[python]==0.27.0; extra == "dev-mkdocs"
- mkdocstrings-python
==1.12.2; extra == "dev-mkdocs"
- mypy
==1.13.0; extra == "dev-mypy"
- types-setuptools
<76,>=67.6.0; extra == "dev-mypy"
- types-Markdown
==3.7.0.20240822; extra == "dev-mypy"
- types-PyYAML
==6.0.12.20240917; extra == "dev-mypy"
- types-babel
==2.11.0.15; extra == "dev-mypy"
- types-colorama
==0.4.15.20240311; extra == "dev-mypy"
- frequenz-repo-config
[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-mypy"
- nox
==2024.10.9; extra == "dev-noxfile"
- frequenz-repo-config
[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
- setuptools
<76,>=67.6.0; extra == "dev-pylint"
- pytest
==8.3.3; extra == "dev-pytest"
- pylint
==3.3.1; extra == "dev-pytest"
- cookiecutter
==2.6.0; extra == "dev-pytest"
- jinja2
==3.1.4; extra == "dev-pytest"
- sybil
<10,>=6.1.1; extra == "dev-pytest"
- pylint
<4,>=2.17.3; extra == "extra-lint-examples"
- pytest
<9,>=7.3.0; extra == "extra-lint-examples"
- sybil
<10,>=6.1.1; extra == "extra-lint-examples"
Frequenz Repository Configuration
Introduction
This is a highly opinionated set of tools and configurations to set up a Python repository for Frequenz projects.
It offers:
- Cookiecutter templates for scaffolding new projects
- Trivial build of
noxfile.py
with some predefined sessions that include all common checks. - Tools to build protobuf/grpc files as Python, including type information.
Supported Platforms
The following platforms are officially supported (tested):
- Python: 3.11
- Operating System: Ubuntu Linux 20.04
- Architectures: amd64, arm64
Quick Example
To start a new project, you should first install
Cookiecutter.
It is normally available in any Linux distribution, but some have a very old
version (for example, Ubuntu/Debian). You can check which version your distro
has on Repology. You need
at least version 2.4.0. To ensure you get an up-to-date version, you can
always use pip
and install it in a venv
:
$ python -m venv cookiecutter
$ cd cookiecutter
$ . bin/activate
(venv) $ pip install cookiecutter
Collecting cookiecutter
...
Then simply run Cookiecutter where you want to create the new project. A new directory will be created with the generated project name. For example:
cd ~/devel
cookiecutter gh:frequenz-floss/frequenz-repo-config-python --directory=cookiecutter
This command will prompt you for the project type, name, and other configuration options, and it will generate the entire project for you.
It is recommended to use a released version, you can do that by adding the
option --checkout <version>
to the command above. You can check which is the
latest version
here.
After completing the project and fixing the TODO
s, you can either amend the
previous commit using git commit --amend
or create a new commit for the
changes using git commit
.
Documentation
For more detailed documentation, please check the project's website.
Contributing
If you want to know how to build this project and contribute to it, please refer to the Contributing Guide.