Skip to content

Commit

Permalink
Add support for Python 3.13
Browse files Browse the repository at this point in the history
* Upgrade pre-commit dependencies
* Upgrade Python requirements
  • Loading branch information
replaceafill authored Jan 13, 2025
1 parent 9435615 commit 06c5113
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 27 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
9 changes: 1 addition & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions transfers/reingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
5 changes: 2 additions & 3 deletions transfers/transferargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"",
)
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 06c5113

Please sign in to comment.