1- # https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
21[build-system ]
2+ # https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
33requires = [" poetry-core>=1.0.0" ]
44build-backend = " poetry.core.masonry.api"
55
6- # https://python-poetry.org/docs/pyproject/
76[tool .poetry ]
7+ # https://python-poetry.org/docs/pyproject/
88name = " {{ cookiecutter.__package_name_kebab_case }}"
99version = " 0.0.1"
1010description = " {{ cookiecutter.package_description }}"
@@ -20,18 +20,18 @@ classifiers = [
2020 " Programming Language :: Python :: 3" ,
2121]
2222
23- # https://python-poetry.org/docs/repositories/#using-a-private-repository
2423[[tool .poetry .source ]]
24+ # https://python-poetry.org/docs/repositories/#using-a-private-repository
2525name = " risc-pypi"
2626url = " https://pypiserver.risc-software.at/simple/"
2727priority = " explicit"
2828
29- # https://python-poetry.org/docs/dependency-specification/
3029[tool .poetry .dependencies ]
30+ # https://python-poetry.org/docs/dependency-specification/
3131python = " ^{{ cookiecutter.python_version }}"
3232
33- # https://python-poetry.org/docs/master/managing-dependencies/
3433[tool .poetry .group .dev .dependencies ]
34+ # https://python-poetry.org/docs/master/managing-dependencies/
3535poethepoet = " ^0.20.0"
3636black = { version = " ^23.3.0" , extras = [" jupyter" ] }
3737ruff = " ^0.0.272"
@@ -44,9 +44,10 @@ mkdocs = "^1.4.3"
4444mkdocs-material = " ^9.1.15"
4545mkdocstrings = {extras = [" python" ], version = " ^0.22.0" }
4646liccheck = " ^0.9.2"
47+ setuptools = " ^69.0.3"
4748
48- # https://github.com/nat-n/poethepoet
4949[tool .poe .tasks ]
50+ # https://github.com/nat-n/poethepoet
5051_format = " black ."
5152_sort_imports = " isort ."
5253_lint = " ruff check --fix ."
@@ -55,30 +56,41 @@ _check_format = "black --check ."
5556_check_sort_imports = " isort --check ."
5657_check_lint = " ruff check ."
5758
59+ # if you are using poetry for dependency management, you have to generate a requirements.txt first
60+ _convert_to_req_txt = { shell = " poetry export --without-hashes --format=requirements.txt > requirements.txt" }
61+ # check authorization of the licenses of dependencies as defined in [tool.liccheck] section
62+ # (or a separate liccheck.ini-file)
63+ _check_licenses = " liccheck -s liccheck.ini -r requirements.txt"
64+
65+ check_licenses = [
66+ " _convert_to_req_txt" ,
67+ " _check_licenses" ,
68+ ]
69+
5870docs = " mkdocs serve"
5971precommit = [" _format" , " _sort_imports" , " _lint" ]
60- check = [" _check_format" , " _check_sort_imports" , " _check_lint" ]
72+ check = [" _check_format" , " _check_sort_imports" , " _check_lint" , " check_licenses " ]
6173test = " pytest"
6274
63- # https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
6475[tool .black ]
76+ # https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
6577line-length = 120
6678
67- # https://pycqa.github.io/isort/docs/configuration/config_files
6879[tool .isort ]
80+ # https://pycqa.github.io/isort/docs/configuration/config_files
6981profile = " black"
7082
71- # https://docs.pytest.org/en/7.1.x/reference/customize.html
7283[tool .pytest .ini_options ]
84+ # https://docs.pytest.org/en/7.1.x/reference/customize.html
7385addopts = " --color=yes --doctest-modules -ra --cov --cov-report=html --cov-report term --exitfirst --failed-first --strict-config --strict-markers --verbosity=2 --junitxml=python-junit.xml"
7486xfail_strict = true
7587pythonpath = [" {{ cookiecutter.__package_name_snake_case }}" ]
7688testpaths = [" {{ cookiecutter.__package_name_snake_case }}" , " tests" ]
7789# ignore any of these paths
7890norecursedirs = [ ]
7991
80- # https://github.com/charliermarsh/ruff
8192[tool .ruff ]
93+ # https://github.com/charliermarsh/ruff
8294fix = true
8395ignore-init-module-imports = true
8496line-length = 120
0 commit comments