Skip to content

Commit 4e63b7e

Browse files
committed
bump to poetry 2
1 parent 71d6c04 commit 4e63b7e

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
VERSION = $(shell git describe --tags --abbrev=0 | awk -F. '{OFS="."; $$NF+=1; print}')
22

3+
all: build test
4+
35
.PHONY: build
46
build:
57
@rm -rf ./build
68
@PYTHONWARNINGS=ignore uvx copier copy -q --trust --force --vcs-ref=HEAD . ./build
79

10+
.PHONY: test
11+
test:
12+
@poetry -C build run task lint
13+
@poetry -C build run task test -q
14+
15+
.PHONY: release
816
release:
917
@git tag $(VERSION)
1018
@git push --follow-tags

copier.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ _tasks:
4242
- "[ -d .git ] || poetry install -q"
4343
- "[ -d .git ] || git init -q && git add --all && git commit -qm 'initial commit'"
4444
- "[ -d .git ] || touch .envrc"
45-
- printf "To create your repo:\n gh repo create -y {{repo_username}}/{{repo_name}} {% if private %}--private{% else %}--public{% endif %}"
45+
- printf "To create your repo:\n gh repo create -y {{repo_username}}/{{repo_name}} {% if private %}--private{% else %}--public{% endif %}\n"

src/pyproject.toml.jinja

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
[tool.poetry]
1+
[project]
22
name = "{{project_name | lower | replace(' ', '-') | replace('_', '-')}}"
33
version = "0.1.0"
44
description = "{{project_description}}"
5-
authors = ["{{author_name}} <{{author_email}}>"]
65
readme = "README.md"
7-
repository = "https://github.com/{{repo_username}}/{{repo_name}}"
8-
packages = [{ include = "{{project_name}}", from = "src" }]
6+
authors = [{ name = "{{author_name}}", email = "{{author_email}}" }]
7+
requires-python = ">=3.10,<4.0"
8+
dependencies = []
9+
urls.repository = "https://github.com/{{repo_username}}/{{repo_name}}"
910
{%- if private %}
1011
classifiers = ["Private :: Do Not Upload"]
1112
{%- endif %}
1213
13-
[tool.poetry.dependencies]
14-
python = "^3.10"
15-
1614
[tool.poetry.group.dev.dependencies]
1715
{% if docs -%}
1816
mkdocs = ">=1"
1917
mkdocs-material = ">=9"
2018
{% endif -%}
2119
mypy = ">=1"
22-
pre-commit = ">=3"
20+
pre-commit = ">=4"
2321
pytest = ">=8"
24-
ruff = ">=0.6"
22+
ruff = ">=0.9"
2523
taskipy = ">=1"
2624

2725
[tool.taskipy.tasks]
@@ -44,5 +42,5 @@ ignore_missing_imports = true
4442
testpaths = ["tests"]
4543

4644
[build-system]
47-
requires = ["poetry-core>=1.0"]
45+
requires = ["poetry-core>=2.0"]
4846
build-backend = "poetry.core.masonry.api"

src/tests/test_{{project_name}}.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_todo() -> None:
2+
pass

src/{% if docker %}Dockerfile{% endif %}.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WORKDIR /app
55
FROM base AS builder
66

77
# Install poetry
8-
RUN pip install --no-cache-dir poetry~=1.6 \
8+
RUN pip install --no-cache-dir poetry~=2.0 \
99
&& poetry config virtualenvs.in-project true
1010

1111
# Install deps

0 commit comments

Comments
 (0)