Skip to content

Commit 53eb065

Browse files
authored
Merge pull request #9 from Validus-Risk-Management/feature/python-312
adding new python versions
2 parents 5f237b1 + 0a98e87 commit 53eb065

7 files changed

Lines changed: 57 additions & 41 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [ 3.8, 3.9, "3.10" ]
11+
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
1212

1313
steps:
1414
- uses: actions/checkout@v2
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install Poetry
2020
uses: abatilo/actions-poetry@v2
2121
with:
22-
poetry-version: 1.4
22+
poetry-version: 2.4
2323
- name: Install dependencies
2424
run: |
2525
poetry install
@@ -32,6 +32,7 @@ jobs:
3232
3333
publish:
3434
runs-on: ubuntu-latest
35+
needs: test
3536
steps:
3637
- uses: actions/checkout@v2
3738
- name: Build and publish to pypi

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [ 3.8, 3.9, "3.10" ]
14+
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
1515

1616
steps:
1717
- uses: actions/checkout@v2
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Poetry
2323
uses: abatilo/actions-poetry@v2
2424
with:
25-
poetry-version: 1.4
25+
poetry-version: 2.4
2626
- name: Install dependencies
2727
run: |
2828
poetry install

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
name: "Sort module imports"
1919
args: ["--profile", "black", "--filter-files"]
2020
- repo: https://github.com/pycqa/flake8
21-
rev: 3.9.2
21+
rev: 6.1.0
2222
hooks:
2323
- id: flake8
2424
additional_dependencies:

poetry.lock

Lines changed: 30 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ authors = ["David Steiner <david_j_steiner@yahoo.co.nz>"]
66
license = "MIT"
77
readme = "README.md"
88
homepage = "https://github.com/Validus-Risk-Management/partifact"
9+
classifiers = [
10+
"Programming Language :: Python :: 3",
11+
"Programming Language :: Python :: 3.11",
12+
"Programming Language :: Python :: 3.12",
13+
"Programming Language :: Python :: 3.13",
14+
"Programming Language :: Python :: 3.14",
15+
]
916

1017
[tool.poetry.scripts]
1118
partifact = "partifact.main:app"
@@ -37,8 +44,8 @@ isort = "^5.12.0"
3744
mypy = "^0.910"
3845
pep8-naming = "^0.12.1"
3946
pre-commit = "^2.14.0"
40-
pyfakefs = "^4.5.0"
41-
pytest = "^7.2.0"
47+
pyfakefs = "^6.2.0"
48+
pytest = "^9.0.3"
4249
pytest-mock = "^3.6.1"
4350
pytest-cov = "^4.0.0"
4451

tests/conftest.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
URL_TEMPLATE = "https://{code_artifact_domain}-{aws_account}.d.codeartifact.{aws_region}.amazonaws.com/pypi/{code_artifact_repository}"
99

1010

11-
@pytest.fixture()
11+
@pytest.fixture
1212
def write_conf(fs):
1313
"""Fixture to write a configuration entry."""
1414

@@ -23,7 +23,7 @@ def _write(repository: str, **kwargs):
2323
return _write
2424

2525

26-
@pytest.fixture()
26+
@pytest.fixture
2727
def add_conf(write_conf):
2828
"""Fixture to add a test configuration entry."""
2929

@@ -97,7 +97,9 @@ def __init__(self, aws):
9797
self.aws = aws
9898

9999
def assume_role(
100-
self, RoleArn=None, RoleSessionName=None # noqa : boto3 argument naminge
100+
self,
101+
RoleArn=None, # noqa: N803
102+
RoleSessionName=None, # noqa: N803
101103
):
102104
"""Mimicking boto3.client('sts')."""
103105
self.aws.register_role(RoleArn)
@@ -116,13 +118,15 @@ def __init__(self, aws):
116118
self.aws = aws
117119

118120
def get_authorization_token(
119-
self, domain=None, domainOwner=None # noqa : boto3 argument naminge
121+
self,
122+
domain=None,
123+
domainOwner=None, # noqa: N803
120124
):
121125
"""Mimicking boto3.client('codeartifact')."""
122126
return self.aws._get_authorization_token(domain, domainOwner)
123127

124128

125-
@pytest.fixture()
129+
@pytest.fixture
126130
def aws(mocker):
127131
"""Swaps boto3 with a dummy implementation."""
128132
dummy_aws = DummyAWS()
@@ -131,7 +135,7 @@ def aws(mocker):
131135
return dummy_aws
132136

133137

134-
@pytest.fixture()
138+
@pytest.fixture
135139
def subprocess_mock(mocker):
136140
"""Patches subprocess.run so that it does not execute anything."""
137141
mock = mocker.patch("subprocess.run")

tests/test_login.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
runner = CliRunner()
1010

1111

12-
@pytest.fixture()
12+
@pytest.fixture
1313
def load_config_mock(mocker) -> Mock:
1414
"""Patches the load method of Configuration."""
1515
test_config = Configuration(
@@ -24,7 +24,7 @@ def load_config_mock(mocker) -> Mock:
2424
return load_mock
2525

2626

27-
@pytest.fixture()
27+
@pytest.fixture
2828
def token_mock(mocker):
2929
"""Patches token generation."""
3030
test_token = "TEST_TOKEN"

0 commit comments

Comments
 (0)