Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8, 3.9, "3.10" ]
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]

steps:
- uses: actions/checkout@v2
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4
poetry-version: 2.4
- name: Install dependencies
run: |
poetry install
Expand All @@ -32,6 +32,7 @@ jobs:

publish:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- name: Build and publish to pypi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8, 3.9, "3.10" ]
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]

steps:
- uses: actions/checkout@v2
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4
poetry-version: 2.4
- name: Install dependencies
run: |
poetry install
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
name: "Sort module imports"
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
Expand Down
56 changes: 30 additions & 26 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ authors = ["David Steiner <david_j_steiner@yahoo.co.nz>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/Validus-Risk-Management/partifact"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]

[tool.poetry.scripts]
partifact = "partifact.main:app"
Expand Down Expand Up @@ -37,8 +44,8 @@ isort = "^5.12.0"
mypy = "^0.910"
pep8-naming = "^0.12.1"
pre-commit = "^2.14.0"
pyfakefs = "^4.5.0"
pytest = "^7.2.0"
pyfakefs = "^6.2.0"
pytest = "^9.0.3"
pytest-mock = "^3.6.1"
pytest-cov = "^4.0.0"

Expand Down
16 changes: 10 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
URL_TEMPLATE = "https://{code_artifact_domain}-{aws_account}.d.codeartifact.{aws_region}.amazonaws.com/pypi/{code_artifact_repository}"


@pytest.fixture()
@pytest.fixture
def write_conf(fs):
"""Fixture to write a configuration entry."""

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


@pytest.fixture()
@pytest.fixture
def add_conf(write_conf):
"""Fixture to add a test configuration entry."""

Expand Down Expand Up @@ -97,7 +97,9 @@ def __init__(self, aws):
self.aws = aws

def assume_role(
self, RoleArn=None, RoleSessionName=None # noqa : boto3 argument naminge
self,
RoleArn=None, # noqa: N803
RoleSessionName=None, # noqa: N803
):
"""Mimicking boto3.client('sts')."""
self.aws.register_role(RoleArn)
Expand All @@ -116,13 +118,15 @@ def __init__(self, aws):
self.aws = aws

def get_authorization_token(
self, domain=None, domainOwner=None # noqa : boto3 argument naminge
self,
domain=None,
domainOwner=None, # noqa: N803
):
"""Mimicking boto3.client('codeartifact')."""
return self.aws._get_authorization_token(domain, domainOwner)


@pytest.fixture()
@pytest.fixture
def aws(mocker):
"""Swaps boto3 with a dummy implementation."""
dummy_aws = DummyAWS()
Expand All @@ -131,7 +135,7 @@ def aws(mocker):
return dummy_aws


@pytest.fixture()
@pytest.fixture
def subprocess_mock(mocker):
"""Patches subprocess.run so that it does not execute anything."""
mock = mocker.patch("subprocess.run")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
runner = CliRunner()


@pytest.fixture()
@pytest.fixture
def load_config_mock(mocker) -> Mock:
"""Patches the load method of Configuration."""
test_config = Configuration(
Expand All @@ -24,7 +24,7 @@ def load_config_mock(mocker) -> Mock:
return load_mock


@pytest.fixture()
@pytest.fixture
def token_mock(mocker):
"""Patches token generation."""
test_token = "TEST_TOKEN"
Expand Down
Loading