diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e231f22..c67ac59 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,9 +2,9 @@ name: Publish Docker image on: push: - branches: [main] - release: - types: [published] + branches: [ignore] + # release: + # types: [published] jobs: push_to_registry: diff --git a/.gitignore b/.gitignore index 7247369..0a04b03 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +_version.py .vscode .DS_Store .*.swp diff --git a/pyproject.toml b/pyproject.toml index 856f5ae..d6e4dc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" name = "fmripost-template" description = 'A template tool for postprocessing fMRIPrep derivatives' readme = "README.md" -requires-python = ">=3.11" +requires-python = ">=3.10" license = {file = "LICENSE"} keywords = [] authors = [{name = "The NiPreps Developers", email = "nipreps@gmail.com"}] diff --git a/src/fmripost_template/cli/run.py b/src/fmripost_template/cli/run.py index 3973874..2ac2e03 100644 --- a/src/fmripost_template/cli/run.py +++ b/src/fmripost_template/cli/run.py @@ -225,7 +225,7 @@ def main(): if sentry_sdk is not None and failed_reports: sentry_sdk.capture_message( - 'Report generation failed for %d subjects' % failed_reports, + f'Report generation failed for {failed_reports} subjects', level='error', ) sys.exit(int((errno + len(failed_reports)) > 0)) diff --git a/src/fmripost_template/cli/version.py b/src/fmripost_template/cli/version.py index 64aa787..0dfcac1 100644 --- a/src/fmripost_template/cli/version.py +++ b/src/fmripost_template/cli/version.py @@ -23,7 +23,7 @@ """Version CLI helpers.""" from contextlib import suppress -from datetime import UTC, datetime +from datetime import datetime, timezone from pathlib import Path import requests @@ -41,7 +41,7 @@ def check_latest(): latest = None date = None outdated = None - now = datetime.now(tz=UTC) + now = datetime.now(tz=timezone.utc) cachefile = Path.home() / '.cache' / 'fmripost_template' / 'latest' try: cachefile.parent.mkdir(parents=True, exist_ok=True) @@ -56,7 +56,7 @@ def check_latest(): else: try: latest = Version(latest) - date = datetime.strptime(date, DATE_FMT).astimezone(UTC) + date = datetime.strptime(date, DATE_FMT).astimezone(timezone.utc) except (InvalidVersion, ValueError): latest = None else: diff --git a/src/fmripost_template/config.py b/src/fmripost_template/config.py index 2b6a9b2..d8a2bc3 100644 --- a/src/fmripost_template/config.py +++ b/src/fmripost_template/config.py @@ -149,7 +149,7 @@ # Just get so analytics track one hit from contextlib import suppress - from requests import ConnectionError, ReadTimeout + from requests import ConnectionError, ReadTimeout # noqa: A004 from requests import get as _get_url with suppress((ConnectionError, ReadTimeout)):