From 242b401f0bc5b3d84fa8711f035aa33b114bb39f Mon Sep 17 00:00:00 2001 From: Kan Fu Date: Thu, 4 Dec 2025 15:26:48 -0800 Subject: [PATCH 1/2] feat: bump min python version to 3.10 --- .github/workflows/ci.yml | 2 +- CONTRIBUTING.md | 4 ++-- pyproject.toml | 2 +- src/onc/modules/_OncService.py | 2 -- src/onc/onc.py | 2 -- tox.ini | 4 ++-- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9426240..5cf959e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,10 @@ jobs: fail-fast: false matrix: py: + - "3.13" - "3.12" - "3.11" - "3.10" - - "3.9" os: - ubuntu-latest steps: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 543328a..3f9e0f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -238,18 +238,18 @@ The actual tox environments to run are specified in the [[gh]](https://github.co ``` [gh] python = - 3.9 = py39 3.10 = py310, format-check, lint 3.11 = py311 3.12 = py312 + 3.13 = py313 ``` In the config above, tox will run different sets of tox environments on different Python versions. -- on Python 3.9 job, tox runs `py39` environment, - on Python 3.10 job, tox runs `py310`, `format-check` and `lint` environments, - on Python 3.11 job, tox runs `py311` environment, - on Python 3.12 job, tox runs `py312` environment. +- on Python 3.13 job, tox runs `py313` environment. _ci.yml_ uses a matrix strategy for operating systems. So for each Python version, it will run three times for Windows, Ubuntu, and Mac OS. diff --git a/pyproject.toml b/pyproject.toml index 8079a3c..571f407 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ { name = "ONC Data Team", email = "api_support@oceannetworks.ca" }, ] license = { file = 'LICENSE.txt' } -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "requests", 'python-dateutil', diff --git a/src/onc/modules/_OncService.py b/src/onc/modules/_OncService.py index d1b382c..02eb532 100644 --- a/src/onc/modules/_OncService.py +++ b/src/onc/modules/_OncService.py @@ -1,5 +1,3 @@ -from __future__ import annotations - import logging import pprint import weakref diff --git a/src/onc/onc.py b/src/onc/onc.py index 2176214..42b1e85 100644 --- a/src/onc/onc.py +++ b/src/onc/onc.py @@ -1,5 +1,3 @@ -from __future__ import annotations - import datetime import json import os diff --git a/tox.ini b/tox.ini index 8784bd0..10c787e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] min_version = 4.0 env_list = - py39 + py310 format-check lint isolated_build = True @@ -54,7 +54,7 @@ commands = sphinx-autobuild -W doc/source doc/build/html --watch "*.md" --watch [gh] python = - 3.9 = py39 3.10 = py310, format-check, lint 3.11 = py311 3.12 = py312 + 3.13 = py313 From a98022874f2d7d675d65006233e29b3d01f20ee3 Mon Sep 17 00:00:00 2001 From: Kan Fu Date: Thu, 4 Dec 2025 15:28:10 -0800 Subject: [PATCH 2/2] release: prepare for version 2.6.0 --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ doc/source/conf.py | 2 +- pyproject.toml | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca0706c..409bc43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## v2.6.0 (2025-12-04) + +### Enhancements + +- Bump the minimum Python version from 3.9 to 3.10. + + This is in alignment with the [status of Python versions](https://devguide.python.org/versions/). + +- ONC class can get the token by checking an environment variable called `ONC_TOKEN`. + ([#67](https://github.com/OceanNetworksCanada/api-python-client/pull/67)). + + This means users can use `onc = ONC()` if `ONC_TOKEN` is set correctly (probably in a .env file) + +- Added a new method called `getDataAvailability`, which matches the new OpenAPI end point + [`/dataAvailability/dataproducts`](https://data.oceannetworks.ca/OpenAPI#get-/dataAvailability/dataproducts). + ([#70](https://github.com/OceanNetworksCanada/api-python-client/pull/70)). + +- Change the default value of `showWarning` to be `True`. + +### Fixes + +- Fix 0 file size in the print message when calling `orderDataProduct` + ([#64](https://github.com/OceanNetworksCanada/api-python-client/pull/64)). + +### Contributors + +- [Kan Fu](https://github.com/kan-fu) + ## v2.5.1 (2025-07-12) ### Enhancements diff --git a/doc/source/conf.py b/doc/source/conf.py index 5de0915..cb5864f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -9,7 +9,7 @@ project = "onc" copyright = "2025, ONC Data Team" author = "ONC Data Team" -release = "2.5.1" +release = "2.6.0" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/pyproject.toml b/pyproject.toml index 571f407..0c4e31e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "onc" -version = "2.5.1" +version = "2.6.0" description = "Oceans 3.0 API Python Client Library" readme = "README.md" authors = [