Skip to content

Commit a916706

Browse files
committed
chore: replace poetry with uv
1 parent 91a88ef commit a916706

File tree

5 files changed

+1095
-2908
lines changed

5 files changed

+1095
-2908
lines changed

.github/workflows/main.yaml

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,15 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12-
- name: Install poetry
13-
run: pipx install poetry
14-
1512
- uses: actions/setup-python@v4
1613
with:
17-
python-version: 3.9
18-
cache: "poetry"
19-
20-
- run: poetry install
14+
python-version: 3.12
2115

22-
- name: run linters
23-
uses: wearerequired/lint-action@v1
16+
- uses: astral-sh/setup-uv@v5
2417
with:
25-
black: true
26-
black_args: pydantic_ssm_settings
27-
black_command_prefix: poetry run
28-
flake8: true
29-
flake8_args: pydantic_ssm_settings
30-
flake8_command_prefix: poetry run
31-
mypy: true
32-
mypy_args: pydantic_ssm_settings
33-
mypy_command_prefix: poetry run
18+
enable-cache: true
19+
20+
- run: uv sync
3421

3522
test:
3623
runs-on: ubuntu-latest
@@ -46,17 +33,14 @@ jobs:
4633
steps:
4734
- uses: actions/checkout@v3
4835

49-
- name: Install poetry
50-
run: pipx install poetry
51-
52-
- uses: actions/setup-python@v4
36+
- uses: astral-sh/setup-uv@v5
5337
with:
5438
python-version: ${{ matrix.python-version }}
55-
cache: "poetry"
39+
enable-cache: true
5640

57-
- run: poetry install
41+
- run: uv sync
5842

59-
- run: poetry run pytest --cov=pydantic_ssm_settings
43+
- run: uv run pytest --cov=pydantic_ssm_settings
6044
env:
6145
COVERAGE_FILE: coverage/.coverage.linux-py${{ matrix.python-version }}-cN-dN
6246
CONTEXT: linux-py${{ matrix.python-version }}-compiled-no-deps-no
@@ -81,7 +65,7 @@ jobs:
8165
# Python Semantic Release needs access to the full history to
8266
# determine whether a release should be made.
8367
fetch-depth: 0
84-
68+
8569
- run: pip install packaging
8670

8771
- name: Python Semantic Release

.pre-commit-config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
repos:
2+
- repo: https://github.com/PyCQA/isort
3+
rev: 5.13.2
4+
hooks:
5+
- id: isort
6+
language_version: python
7+
args: ["-m", "3", "--trailing-comma", "-l", "88"]
8+
9+
- repo: https://github.com/astral-sh/ruff-pre-commit
10+
rev: v0.9.4
11+
hooks:
12+
- id: ruff
13+
args: ["--fix"]
14+
- id: ruff-format
15+
16+
- repo: https://github.com/pre-commit/mirrors-mypy
17+
rev: v1.10.0
18+
hooks:
19+
- id: mypy
20+
language_version: python
21+
additional_dependencies:
22+
- types-requests
23+
- types-attrs
24+
- types-PyYAML

poetry.lock

Lines changed: 0 additions & 2851 deletions
This file was deleted.

pyproject.toml

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,29 @@
1-
[build-system]
2-
build-backend = "poetry.masonry.api"
3-
requires = ["poetry>=0.12"]
4-
5-
[tool.poetry]
6-
authors = ["Anthony Lukach <[email protected]>"]
7-
description = "Replace Pydantic's builtin Secret Support with a configuration provider that loads parameters from AWS Systems Manager Parameter Store."
8-
license = "MIT"
9-
maintainers = ["Anthony Lukach <[email protected]>"]
1+
[project]
2+
dependencies = [
3+
"pydantic-settings>=2",
4+
]
5+
description = "AWS SSM support for Pydantic Settings"
106
name = "pydantic-ssm-settings"
117
readme = "README.md"
12-
repository = "https://github.com/developmentseed/pydantic-ssm-settings/"
8+
requires-python = ">=3.13"
139
version = "0.2.4"
1410

15-
[tool.poetry.dependencies]
16-
"boto3" = "^1.21.45"
17-
pydantic = "^2.5.2"
18-
python = "^3.9"
19-
pydantic-settings = ">=2.1.0"
20-
21-
[tool.poetry.dev-dependencies]
22-
black = "^22.3.0"
23-
boto3-stubs = {extras = ["ssm"], version = "^1.21.45"}
24-
coverage = {extras = ["toml"], version = "^6.4.1"}
25-
flake9 = "^3.8.3"
26-
isort = "^5.9.3"
27-
moto = {extras = ["all"], version = "^2.2.19"}
28-
mypy = "^0.910"
29-
pytest = "^6.2.5"
30-
pytest-cov = "^2.12.1"
31-
python-semantic-release = "^7.32.0"
11+
[dependency-groups]
12+
dev = [
13+
"boto3>=1.36.12",
14+
"boto3-stubs[ssm]>=1.36.12",
15+
"pre-commit>=4.1.0",
16+
"pytest>=8.3.4",
17+
"moto[all]>=5.0.28",
18+
]
3219

3320
[tool.semantic_release]
3421
# https://python-semantic-release.readthedocs.io/en/latest/configuration.html
3522
branch = "main"
36-
build_command = "pip install poetry && poetry build" # https://github.com/relekang/python-semantic-release/issues/222#issuecomment-709326972
23+
build_command = "pip install uv && uv build" # https://github.com/python-semantic-release/python-semantic-release/issues/222#issuecomment-2599855898
3724
upload_to_pypi = true
3825
upload_to_release = true
39-
version_toml = "pyproject.toml:tool.poetry.version"
26+
version_toml = "pyproject.toml:project.version"
4027
version_variable = "pydantic_ssm_settings/__init__.py:__version__"
4128

4229
[tool.flake8]
@@ -58,8 +45,7 @@ multi_line_output = 3
5845

5946
[tool.mypy]
6047
files = "pydantic_ssm_settings"
61-
python_version = 3.9
62-
show_error_codes = "True"
48+
python_version = "3.9"
6349

6450
[tool.coverage]
6551
precision = 2

0 commit comments

Comments
 (0)