22requires = [" poetry-core>=1.0.0" ]
33build-backend = " poetry.core.masonry.api"
44
5- [tool . poetry ] # https://python-poetry .org/docs/ pyproject/
5+ [project ] # https://packaging. python.org/en/latest/specifications/ pyproject-toml /
66name = " {{ cookiecutter.__project_name_kebab_case }}"
77version = " 0.0.0"
88description = " {{ cookiecutter.project_description }}"
9- authors = [" {{ cookiecutter.author_name }} <{{ cookiecutter.author_email }}>" ]
109readme = " README.md"
11- repository = " {{ cookiecutter.project_url }}"
12- {%- if cookiecutter.with_conventional_commits|int %}
13-
14- [tool .commitizen ] # https://commitizen-tools.github.io/commitizen/config/
15- bump_message = " bump(release): v$current_version → v$new_version"
16- tag_format = " v$version"
17- update_changelog_on_bump = true
18- version_provider = " poetry"
19- {%- endif %}
10+ license-files = [" LICENSE*" ]
11+ authors = [
12+ { name = " {{ cookiecutter.author_name }}" , email = " {{ cookiecutter.author_email }}" },
13+ ]
14+ requires-python = " >={{ cookiecutter.python_version }},<4.0"
15+ dependencies = [
16+ {%- if cookiecutter.with_fastapi_api|int %}
17+ "fastapi[all] (>=0.115.6)",
18+ "gunicorn (>=23.0.0)",
19+ {%- endif %}
20+ {%- if cookiecutter.project_type == "app" %}
21+ "poethepoet (>=0.32.1)",
22+ {%- endif %}
23+ {%- if cookiecutter.with_typer_cli|int %}
24+ "typer[all] (>=0.15.1)",
25+ {%- endif %}
26+ {%- if cookiecutter.with_fastapi_api|int %}
27+ "uvicorn[standard] (>=0.34.0)",
28+ {%- endif %}
29+ ]
2030{%- if cookiecutter.with_typer_cli|int %}
2131
22- [tool . poetry .scripts ] # https://python-poetry.org/docs/pyproject/#scripts
32+ [project .scripts ] # https://python-poetry.org/docs/pyproject/#scripts
2333{{ cookiecutter.__project_name_kebab_case }} = "{{ cookiecutter.__project_name_snake_case }}.cli:app"
2434{%- endif %}
2535
26- [tool .poetry .dependencies ] # https://python-poetry.org/docs/dependency-specification/
27- {%- if cookiecutter.with_fastapi_api|int %}
28- coloredlogs = " >=15.0.1"
29- fastapi = { extras = [" all" ], version = " >=0.110.1" }
30- gunicorn = " >=21.2.0"
31- {%- endif %}
32- {%- if cookiecutter.project_type == "app" %}
33- poethepoet = " >=0.25.0"
34- {%- endif %}
35- python = " >={{ cookiecutter.python_version }},<4.0"
36- {%- if cookiecutter.with_typer_cli|int %}
37- typer = { extras = [" all" ], version = " >=0.12.0" }
38- {%- endif %}
39- {%- if cookiecutter.with_fastapi_api|int %}
40- uvicorn = { extras = [" standard" ], version = " >=0.29.0" }
36+ [project .urls ] # https://packaging.python.org/en/latest/specifications/well-known-project-urls/#well-known-labels
37+ homepage = " {{ cookiecutter.project_url }}"
38+ source = " {{ cookiecutter.project_url }}"
39+ {%- if cookiecutter.with_conventional_commits|int %}
40+ changelog = " {{ cookiecutter.project_url }}/{% if cookiecutter.continuous_integration == " GitLab" %}-/{% endif %}blob/main/CHANGELOG.md"
4141{%- endif %}
42+ releasenotes = " {{ cookiecutter.project_url }}/{% if cookiecutter.continuous_integration == " GitLab" %}-/{% endif %}releases"
43+ documentation = " {{ cookiecutter.project_url }}"
44+ issues = " {{ cookiecutter.project_url }}/{% if cookiecutter.continuous_integration == " GitLab" %}-/{% endif %}issues"
4245
43- [tool .poetry .group .test .dependencies ] # https://python-poetry.org/docs/master/ managing-dependencies/
46+ [tool .poetry .group .test .dependencies ] # https://python-poetry.org/docs/managing-dependencies#dependency-groups
4447{%- if cookiecutter.with_conventional_commits|int %}
45- commitizen = " >=3.21.3 "
48+ commitizen = " >=4.1.0 "
4649{%- endif %}
47- coverage = { extras = [" toml" ], version = " >=7.4.4 " }
48- mypy = " >=1.9.0 "
50+ coverage = { extras = [" toml" ], version = " >=7.6.10 " }
51+ mypy = " >=1.14.1 "
4952{%- if cookiecutter.project_type == "package" %}
50- poethepoet = " >=0.25.0 "
53+ poethepoet = " >=0.32.1 "
5154{%- endif %}
52- pre-commit = " >=3.7.0 "
53- pytest = " >=8.1.1 "
55+ pre-commit = " >=4.0.1 "
56+ pytest = " >=8.3.4 "
5457pytest-mock = " >=3.14.0"
55- pytest-xdist = " >=3.5.0 "
56- ruff = " >=0.5.7 "
58+ pytest-xdist = " >=3.6.1 "
59+ ruff = " >=0.9.2 "
5760{%- if cookiecutter.development_environment == "strict" %}
5861shellcheck-py = " >=0.10.0.1"
59- typeguard = " >=4.2 .1"
62+ typeguard = " >=4.4 .1"
6063{%- endif %}
6164
62- [tool .poetry .group .dev .dependencies ] # https://python-poetry.org/docs/master/ managing-dependencies/
63- cruft = " >=2.15 .0"
65+ [tool .poetry .group .dev .dependencies ] # https://python-poetry.org/docs/managing-dependencies#dependency-groups
66+ cruft = " >=2.16 .0"
6467ipykernel = " >=6.29.4"
6568ipython = " >=8.18.0"
6669ipywidgets = " >=8.1.2"
67- pdoc = " >=14.4.0 "
70+ pdoc = " >=15.0.1 "
6871{%- if cookiecutter.private_package_repository_name %}
6972
7073[[tool .poetry .source ]]
@@ -76,6 +79,14 @@ name = "{{ cookiecutter.private_package_repository_name|slugify }}"
7679url = " {{ cookiecutter.private_package_repository_url }}"
7780priority = " explicit"
7881{%- endif %}
82+ {%- if cookiecutter.with_conventional_commits|int %}
83+
84+ [tool .commitizen ] # https://commitizen-tools.github.io/commitizen/config/
85+ bump_message = " bump(release): v$current_version → v$new_version"
86+ tag_format = " v$version"
87+ update_changelog_on_bump = true
88+ version_provider = " poetry"
89+ {%- endif %}
7990
8091[tool .coverage .report ] # https://coverage.readthedocs.io/en/latest/config.html#report
8192{%- if cookiecutter.development_environment == "strict" %}
@@ -127,15 +138,18 @@ filterwarnings = ["error", "ignore::DeprecationWarning"]
127138testpaths = [" src" , " tests" ]
128139xfail_strict = true
129140
130- [tool .ruff ] # https://github.com/charliermarsh/ ruff
141+ [tool .ruff ] # https://docs.astral.sh/ ruff/settings/
131142fix = true
132143line-length = 100
133144src = [" src" , " tests" ]
134145target-version = " py{{ cookiecutter.python_version.split('.')[:2]|join }}"
135146
147+ [tool .ruff .format ]
148+ docstring-code-format = true
149+
136150[tool .ruff .lint ]
137151{%- if cookiecutter.development_environment == "strict" %}
138- select = [" A" , " ASYNC" , " B" , " BLE" , " C4" , " C90" , " D" , " DTZ" , " E" , " EM" , " ERA" , " F" , " FBT" , " FLY" , " FURB" , " G" , " I" , " ICN" , " INP" , " INT" , " ISC" , " LOG" , " N" , " NPY" , " PERF" , " PGH" , " PIE" , " PL" , " PT" , " PTH" , " PYI" , " Q" , " RET" , " RSE" , " RUF" , " S" , " SIM" , " SLF" , " SLOT" , " T10" , " T20" , " TCH " , " TID" , " TRY" , " UP" , " W" , " YTT" ]
152+ select = [" A" , " ASYNC" , " B" , " BLE" , " C4" , " C90" , " D" , " DTZ" , " E" , " EM" , " ERA" , " F" , " FBT" , " FLY" , " FURB" , " G" , " I" , " ICN" , " INP" , " INT" , " ISC" , " LOG" , " N" , " NPY" , " PERF" , " PGH" , " PIE" , " PL" , " PT" , " PTH" , " PYI" , " Q" , " RET" , " RSE" , " RUF" , " S" , " SIM" , " SLF" , " SLOT" , " T10" , " T20" , " TC " , " TID" , " TRY" , " UP" , " W" , " YTT" ]
139153ignore = [" D203" , " D213" , " E501" , " RET504" , " S101" , " S307" ]
140154unfixable = [" ERA001" , " F401" , " F841" , " T201" , " T203" ]
141155{%- else %}
0 commit comments