From 69c90f02b82054cf0a73ba010936cedb9c289e70 Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Mon, 13 Jan 2025 15:03:17 +0000 Subject: [PATCH 1/4] Upgrade pre-commit dependencies --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2dad190..de1d213 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.5 + rev: v0.9.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From ce5e0fbbcbaae80bb20239dbb1fcb8733d5fe262 Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Mon, 13 Jan 2025 15:04:00 +0000 Subject: [PATCH 2/4] Run pre-commit --- transfers/reingest.py | 3 +-- transfers/transferargs.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/transfers/reingest.py b/transfers/reingest.py index 6cf2cfe..9b59b03 100644 --- a/transfers/reingest.py +++ b/transfers/reingest.py @@ -167,8 +167,7 @@ def reingest_full_and_approve( transfer = amclient.get_transfer_status() LOGGER.info( - "Attempting to approve transfer following the " - "initialization of reingest." + "Attempting to approve transfer following the initialization of reingest." ) if transfer.get("status") == "USER_INPUT": diff --git a/transfers/transferargs.py b/transfers/transferargs.py index 47de1a8..f44c073 100644 --- a/transfers/transferargs.py +++ b/transfers/transferargs.py @@ -51,7 +51,7 @@ def get_parser(doc): # command line. "--transfer-path", metavar="PATH", - help="Relative path within the " 'Transfer Source. Default: ""', + help='Relative path within the Transfer Source. Default: ""', type=fsencode, default=b"", ) @@ -97,8 +97,7 @@ def get_parser(doc): parser.add_argument( "--hide", action="store_true", - help="If set, hide the Transfers and SIPs in the " - "dashboard once they complete.", + help="If set, hide the Transfers and SIPs in the dashboard once they complete.", ) parser.add_argument( "--delete-on-complete", From df0bf9d1dc72e2e559e5f4776ef5bffb973fc3cc Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Mon, 13 Jan 2025 15:05:08 +0000 Subject: [PATCH 3/4] Upgrade Python requirements --- requirements-dev.txt | 6 +++--- requirements.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 25c9bb6..aadf4f1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --output-file=requirements-dev.txt requirements-dev.in # -amclient==1.3.1 +amclient==1.4.0 # via -r requirements.txt certifi==2024.12.14 # via @@ -32,7 +32,7 @@ lxml==5.3.0 # via # -r requirements.txt # metsrw -metsrw==0.5.1 +metsrw==0.6.1 # via -r requirements.txt packaging==24.2 # via pytest @@ -48,7 +48,7 @@ requests==2.32.3 # via # -r requirements.txt # amclient -ruff==0.8.5 +ruff==0.9.1 # via -r requirements-dev.in sqlalchemy==1.4.54 # via -r requirements.txt diff --git a/requirements.txt b/requirements.txt index b038262..61d5a27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --output-file=requirements.txt requirements.in # -amclient==1.3.1 +amclient==1.4.0 # via -r requirements.in certifi==2024.12.14 # via requests @@ -16,7 +16,7 @@ idna==3.10 # via requests lxml==5.3.0 # via metsrw -metsrw==0.5.1 +metsrw==0.6.1 # via -r requirements.in requests==2.32.3 # via From ba5ebca06af557a7b0df5fc7e4a4f6ac9a3ff171 Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Mon, 13 Jan 2025 15:09:56 +0000 Subject: [PATCH 4/4] Add support for Python 3.13 --- .github/workflows/test.yml | 19 +++++++++++-------- tox.ini | 9 +-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6744f46..d218576 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: jobs: test: name: "Test Python ${{ matrix.python-version }}" - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-24.04" strategy: fail-fast: false matrix: @@ -18,12 +18,13 @@ jobs: "3.10", "3.11", "3.12", + "3.13", ] steps: - name: "Check out repository" uses: "actions/checkout@v4" - name: "Set up Python ${{ matrix.python-version }}" - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.python-version }}" cache: "pip" @@ -33,27 +34,29 @@ jobs: - name: "Install tox" run: | python -m pip install --upgrade pip - pip install tox tox-gh-actions + pip install tox - name: "Run tox" run: | - tox -- --cov --cov-config .coveragerc --cov-report xml:coverage.xml + tox -e py -- --cov --cov-config .coveragerc --cov-report xml:coverage.xml - name: "Upload coverage report" if: github.repository == 'artefactual/automation-tools' - uses: "codecov/codecov-action@v3" + uses: "codecov/codecov-action@v4" with: files: ./coverage.xml fail_ci_if_error: false verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} lint: name: "Lint" - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-24.04" steps: - name: "Check out repository" uses: "actions/checkout@v4" - name: "Set up Python" - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: - python-version: "3.12" + python-version: "3.x" cache: "pip" cache-dependency-path: | requirements.txt diff --git a/tox.ini b/tox.ini index 40feb27..414dbc8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,7 @@ [tox] -envlist = py{39,310,311,312}, linting +envlist = py, linting skipsdist = True -[gh-actions] -python = - 3.9: py39 - 3.10: py310 - 3.11: py311 - 3.12: py312 - [testenv] deps = -rrequirements-dev.txt skip_install = True