Skip to content

Commit

Permalink
switch to rye
Browse files Browse the repository at this point in the history
  • Loading branch information
mvantellingen committed Aug 19, 2024
1 parent 5b87542 commit f5164b6
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 81 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
with:
python-version: "3.12"

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

- name: Build package
run: python setup.py sdist bdist_wheel
run: rye build

- name: Publish package
uses: pypa/gh-action-pypi-publish@master
Expand Down
64 changes: 50 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,54 @@
[build-system]
requires = ["setuptools>=40.6.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "django-iam-dbauth"
version = "0.2.0"
description = "Django database backends to use AWS Database IAM Authentication"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Lab Digital", email = "opensource@labdigital.nl" }
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"Django>=4.2",
"boto3",
"dnspython"
]

[project.urls]
Homepage = "https://github.com/LabD/django-iam-dbauth"

[tool.coverage.run]
branch = true
source = ["django_iam_dbauth"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.3.2",
"coverage"
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.coverage.paths]
source = ["src", ".tox/*/site-packages"]
[tool.hatch.metadata]
allow-direct-references = true

[tool.coverage.report]
show_missing = true
[tool.hatch.build.targets.wheel]
packages = ["src/django_iam_dbauth"]

[tool.isort]
profile = "black"
default_section = "THIRDPARTY"
known_first_party = ["django_iam_dbauth", "tests"]
[tool.ruff]
src = ["src", "tests"]
fix = true
44 changes: 44 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false
# generate-hashes: false
# universal: false

-e file:.
asgiref==3.8.1
# via django
boto3==1.35.0
# via django-iam-dbauth
botocore==1.35.0
# via boto3
# via s3transfer
coverage==7.6.1
django==5.1
# via django-iam-dbauth
dnspython==2.6.1
# via django-iam-dbauth
iniconfig==2.0.0
# via pytest
jmespath==1.0.1
# via boto3
# via botocore
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.3.2
python-dateutil==2.9.0.post0
# via botocore
s3transfer==0.10.2
# via boto3
six==1.16.0
# via python-dateutil
sqlparse==0.5.1
# via django
urllib3==2.2.2
# via botocore
36 changes: 36 additions & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false
# generate-hashes: false
# universal: false

-e file:.
asgiref==3.8.1
# via django
boto3==1.35.0
# via django-iam-dbauth
botocore==1.35.0
# via boto3
# via s3transfer
django==5.1
# via django-iam-dbauth
dnspython==2.6.1
# via django-iam-dbauth
jmespath==1.0.1
# via boto3
# via botocore
python-dateutil==2.9.0.post0
# via botocore
s3transfer==0.10.2
# via boto3
six==1.16.0
# via python-dateutil
sqlparse==0.5.1
# via django
urllib3==2.2.2
# via botocore
62 changes: 0 additions & 62 deletions setup.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/test_aws_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


def test_get_connection_params(mocker):

token_kwargs = {}

def generate_db_auth_token(**kwargs):
Expand Down
1 change: 0 additions & 1 deletion tests/test_aws_postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


def test_get_connection_params(mocker):

token_kwargs = {}

def generate_db_auth_token(**kwargs):
Expand Down

0 comments on commit f5164b6

Please sign in to comment.