Skip to content

Commit f5164b6

Browse files
committed
switch to rye
1 parent 5b87542 commit f5164b6

7 files changed

+133
-81
lines changed

.github/workflows/python-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
with:
1616
python-version: "3.12"
1717

18-
- name: Install build requirements
19-
run: python -m pip install wheel
18+
- name: Install the latest version of rye
19+
uses: eifinger/setup-rye@v4
2020

2121
- name: Build package
22-
run: python setup.py sdist bdist_wheel
22+
run: rye build
2323

2424
- name: Publish package
2525
uses: pypa/gh-action-pypi-publish@master

pyproject.toml

+50-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,54 @@
1-
[build-system]
2-
requires = ["setuptools>=40.6.0", "wheel"]
3-
build-backend = "setuptools.build_meta"
1+
[project]
2+
name = "django-iam-dbauth"
3+
version = "0.2.0"
4+
description = "Django database backends to use AWS Database IAM Authentication"
5+
readme = "README.md"
6+
license = { text = "MIT" }
7+
authors = [
8+
{ name = "Lab Digital", email = "opensource@labdigital.nl" }
9+
]
10+
classifiers = [
11+
"Development Status :: 5 - Production/Stable",
12+
"Environment :: Web Environment",
13+
"Framework :: Django",
14+
"Framework :: Django :: 4.2",
15+
"Framework :: Django :: 5.0",
16+
"Framework :: Django :: 5.1",
17+
"License :: OSI Approved :: MIT License",
18+
"Programming Language :: Python",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.8",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
]
26+
dependencies = [
27+
"Django>=4.2",
28+
"boto3",
29+
"dnspython"
30+
]
31+
32+
[project.urls]
33+
Homepage = "https://github.com/LabD/django-iam-dbauth"
434

5-
[tool.coverage.run]
6-
branch = true
7-
source = ["django_iam_dbauth"]
35+
[tool.rye]
36+
managed = true
37+
dev-dependencies = [
38+
"pytest>=8.3.2",
39+
"coverage"
40+
]
41+
42+
[build-system]
43+
requires = ["hatchling"]
44+
build-backend = "hatchling.build"
845

9-
[tool.coverage.paths]
10-
source = ["src", ".tox/*/site-packages"]
46+
[tool.hatch.metadata]
47+
allow-direct-references = true
1148

12-
[tool.coverage.report]
13-
show_missing = true
49+
[tool.hatch.build.targets.wheel]
50+
packages = ["src/django_iam_dbauth"]
1451

15-
[tool.isort]
16-
profile = "black"
17-
default_section = "THIRDPARTY"
18-
known_first_party = ["django_iam_dbauth", "tests"]
52+
[tool.ruff]
53+
src = ["src", "tests"]
54+
fix = true

requirements-dev.lock

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# generated by rye
2+
# use `rye lock` or `rye sync` to update this lockfile
3+
#
4+
# last locked with the following flags:
5+
# pre: false
6+
# features: []
7+
# all-features: false
8+
# with-sources: false
9+
# generate-hashes: false
10+
# universal: false
11+
12+
-e file:.
13+
asgiref==3.8.1
14+
# via django
15+
boto3==1.35.0
16+
# via django-iam-dbauth
17+
botocore==1.35.0
18+
# via boto3
19+
# via s3transfer
20+
coverage==7.6.1
21+
django==5.1
22+
# via django-iam-dbauth
23+
dnspython==2.6.1
24+
# via django-iam-dbauth
25+
iniconfig==2.0.0
26+
# via pytest
27+
jmespath==1.0.1
28+
# via boto3
29+
# via botocore
30+
packaging==24.1
31+
# via pytest
32+
pluggy==1.5.0
33+
# via pytest
34+
pytest==8.3.2
35+
python-dateutil==2.9.0.post0
36+
# via botocore
37+
s3transfer==0.10.2
38+
# via boto3
39+
six==1.16.0
40+
# via python-dateutil
41+
sqlparse==0.5.1
42+
# via django
43+
urllib3==2.2.2
44+
# via botocore

requirements.lock

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# generated by rye
2+
# use `rye lock` or `rye sync` to update this lockfile
3+
#
4+
# last locked with the following flags:
5+
# pre: false
6+
# features: []
7+
# all-features: false
8+
# with-sources: false
9+
# generate-hashes: false
10+
# universal: false
11+
12+
-e file:.
13+
asgiref==3.8.1
14+
# via django
15+
boto3==1.35.0
16+
# via django-iam-dbauth
17+
botocore==1.35.0
18+
# via boto3
19+
# via s3transfer
20+
django==5.1
21+
# via django-iam-dbauth
22+
dnspython==2.6.1
23+
# via django-iam-dbauth
24+
jmespath==1.0.1
25+
# via boto3
26+
# via botocore
27+
python-dateutil==2.9.0.post0
28+
# via botocore
29+
s3transfer==0.10.2
30+
# via boto3
31+
six==1.16.0
32+
# via python-dateutil
33+
sqlparse==0.5.1
34+
# via django
35+
urllib3==2.2.2
36+
# via botocore

setup.py

-62
This file was deleted.

tests/test_aws_mysql.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
def test_get_connection_params(mocker):
8-
98
token_kwargs = {}
109

1110
def generate_db_auth_token(**kwargs):

tests/test_aws_postgresql.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
def test_get_connection_params(mocker):
8-
98
token_kwargs = {}
109

1110
def generate_db_auth_token(**kwargs):

0 commit comments

Comments
 (0)