Skip to content

Commit

Permalink
build!: require python 3.11-13 (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson authored Nov 5, 2024
1 parent 6483988 commit c6caed0
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ classifiers = [
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.10"
requires-python = ">=3.11"
description = "Data acquisition tools for Wagnerds"
license = {file = "LICENSE"}
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion src/wags_tails/base_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def iterate_versions(self) -> Generator:
for release in data:
yield (
datetime.datetime.strptime(release["tag_name"], "v%Y-%m-%d")
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime(DATE_VERSION_PATTERN)
)

Expand Down
2 changes: 1 addition & 1 deletion src/wags_tails/chemidplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _get_latest_version() -> str:
raw_date = result.groups()[0]
return (
datetime.datetime.strptime(raw_date, "%Y-%m-%d")
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime(DATE_VERSION_PATTERN)
)

Expand Down
2 changes: 1 addition & 1 deletion src/wags_tails/do.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _download_data(self, version: str, outfile: Path) -> None:
"""
formatted_version = (
datetime.datetime.strptime(version, DATE_VERSION_PATTERN)
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime("v%Y-%m-%d")
)
tag_info_url = f"https://api.github.com/repos/{self._repo}/releases/tags/{formatted_version}"
Expand Down
2 changes: 1 addition & 1 deletion src/wags_tails/drugsatfda.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _get_latest_version() -> str:
raise RemoteDataError(msg) from e
return (
datetime.datetime.strptime(date, "%Y-%m-%d")
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime(DATE_VERSION_PATTERN)
)

Expand Down
4 changes: 2 additions & 2 deletions src/wags_tails/moa.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _get_latest_version(self) -> str:
data = response.json()
return (
datetime.datetime.strptime(data[0]["tag_name"], self._src_date_fmt)
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime(DATE_VERSION_PATTERN)
)

Expand All @@ -50,7 +50,7 @@ def _download_data(self, version: str, outfile: Path) -> None:
}
formatted_version = (
datetime.datetime.strptime(version, DATE_VERSION_PATTERN)
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime(self._src_date_fmt)
)
download_http(
Expand Down
4 changes: 2 additions & 2 deletions src/wags_tails/mondo.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _get_latest_version() -> tuple[str, str]:
raw_version = data["tag_name"]
version = (
datetime.datetime.strptime(raw_version, "v%Y-%m-%d")
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime(DATE_VERSION_PATTERN)
)

Expand All @@ -60,7 +60,7 @@ def _download_data(self, version: str, outfile: Path) -> None:
"""
formatted_version = (
datetime.datetime.strptime(version, DATE_VERSION_PATTERN)
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime("v%Y-%m-%d")
)
download_http(
Expand Down
2 changes: 1 addition & 1 deletion src/wags_tails/oncotree.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _get_latest_version(self) -> str:
raise RemoteDataError(msg) from e
return (
datetime.datetime.strptime(raw_version, "%Y-%m-%d")
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime(DATE_VERSION_PATTERN)
)

Expand Down
4 changes: 2 additions & 2 deletions src/wags_tails/rxnorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _get_latest_version() -> str:
raw_version = r.json()["version"]
return (
datetime.datetime.strptime(raw_version, "%d-%b-%Y")
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime(DATE_VERSION_PATTERN)
)
except (ValueError, KeyError) as e:
Expand Down Expand Up @@ -76,7 +76,7 @@ def _download_data(self, version: str, file_path: Path) -> None:
raise RemoteDataError(msg)
fmt_version = (
datetime.datetime.strptime(version, DATE_VERSION_PATTERN)
.replace(tzinfo=datetime.timezone.utc)
.replace(tzinfo=datetime.UTC)
.strftime("%m%d%Y")
)
dl_url = f"https://download.nlm.nih.gov/umls/kss/rxnorm/RxNorm_full_{fmt_version}.zip"
Expand Down

0 comments on commit c6caed0

Please sign in to comment.