Skip to content

Commit 353e4f8

Browse files
authored
Merge pull request #38 from OceanNetworksCanada/2.4.0
2.4.0
2 parents 4e8f2dc + 2b137cb commit 353e4f8

File tree

5 files changed

+117
-7
lines changed

5 files changed

+117
-7
lines changed

.github/workflows/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: Set up Python 3.10
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.10"
1919

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
name: Build distribution 📦
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.x"
16+
- name: Install pypa/build
17+
run: >-
18+
python3 -m
19+
pip install
20+
build
21+
--user
22+
- name: Build a binary wheel and a source tarball
23+
run: python3 -m build
24+
- name: Store the distribution packages
25+
uses: actions/upload-artifact@v3
26+
with:
27+
name: python-package-distributions
28+
path: dist/
29+
30+
publish-to-pypi:
31+
name: >-
32+
Publish Python 🐍 distribution 📦 to PyPI
33+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
34+
needs:
35+
- build
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: pypi
39+
url: https://pypi.org/p/onc
40+
permissions:
41+
id-token: write # IMPORTANT: mandatory for trusted publishing
42+
43+
steps:
44+
- name: Download all the dists
45+
uses: actions/download-artifact@v3
46+
with:
47+
name: python-package-distributions
48+
path: dist/
49+
- name: Publish distribution 📦 to PyPI
50+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,67 @@
11
# Changelog
22

3-
## v2.3.5 and before
3+
## v2.4.0 (2024-05-30)
4+
5+
### Enhancements
6+
7+
- Improved package setup (pyproject.toml, linting and formatter).
8+
([#1](https://github.com/OceanNetworksCanada/api-python-client/issues/1))
9+
- Added support of Path type for outPath (instance variable in ONC class).
10+
([#12](https://github.com/OceanNetworksCanada/api-python-client/issues/12))
11+
- Added GitHub Actions for continuous integration.
12+
([#19](https://github.com/OceanNetworksCanada/api-python-client/issues/19))
13+
- Added Sphinx for generating documentation.
14+
([#7](https://github.com/OceanNetworksCanada/api-python-client/issues/7))
15+
- Improved exception types raised and caught.
16+
([#17](https://github.com/OceanNetworksCanada/api-python-client/issues/17))
17+
- Added new public methods (`checkDataProduct`, `cancelDataProduct`, `restartDataProduct`, `getSensorCategoryCodes`) to match backend API update.
18+
([#26](https://github.com/OceanNetworksCanada/api-python-client/issues/26))
19+
- Renamed some public methods (old names are still available) to make the naming more consistent with the api end points.
20+
([#33](https://github.com/OceanNetworksCanada/api-python-client/issues/33))
21+
22+
| API End Point | Old Name | New Name |
23+
| --------------------- | ---------------------- | ------------------------- |
24+
| /locations/tree | getLocationHierarchy | getLocationsTree |
25+
| /scalardata/location | getDirectByLocation | getScalardataByLocation |
26+
| /scalardata/device | getDirectByDevice | getScalardataByDevice |
27+
| /rawdata/location | getDirectRawByLocation | getRawdataByLocation |
28+
| /rawdata/device | getDirectRawByDevice | getRawdataByDevice |
29+
| /archivefile/location | getListByLocation | getArchivefileByLocation |
30+
| /archivefile/device | getListByDevice | getArchivefileByDevice |
31+
| /archivefile/download | getFile | downloadArchivefile |
32+
| N/A | getDirectFiles | downloadDirectArchivefile |
33+
34+
- Added helper methods to combine `getXXXByLocation` and `getXXXByDevice` into `getXXX`.
35+
([#33](https://github.com/OceanNetworksCanada/api-python-client/issues/33))
36+
- Namely, `getScalardata`, `getRawdata` and `getArchivefile`.
37+
38+
### Fixes
39+
40+
- Removed unused modules (onc/ags.py, onc/dap.py, onc/nerc.py, onc/sos.py).
41+
([#1](https://github.com/OceanNetworksCanada/api-python-client/issues/1))
42+
43+
### Tests
44+
45+
- Added support using .env file for storing the token when running tests.
46+
([#2](https://github.com/OceanNetworksCanada/api-python-client/issues/2))
47+
- Replaced robot framework with pytest.
48+
([#10](https://github.com/OceanNetworksCanada/api-python-client/issues/10))
49+
50+
### Contributors
51+
52+
- [Jacob Stevens-Haas](https://github.com/Jacob-Stevens-Haas)
53+
- [Kan Fu](https://github.com/kan-fu)
54+
- [Renfu Li](https://github.com/Renfu-Li)
55+
56+
### Reviewers panel
57+
58+
- [Angela Schlesinger](https://github.com/aschlesin)
59+
- [Eli Ferguson](https://github.com/eliferguson)
60+
- [Jacob Stevens-Haas](https://github.com/Jacob-Stevens-Haas)
61+
- [Spencer Plovie](https://github.com/spencerwplovie)
62+
63+
## v2.3.5 (2019-12-12) and before
464

565
### Contributors
666

7-
- Dany Cabrera
67+
- [Dany Alejandro Cabrera](https://github.com/danyalejandro)

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
project = "onc"
1010
copyright = "2024, ONC Data Team"
1111
author = "ONC Data Team"
12-
release = "2.3.5"
12+
release = "2.4.0"
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "onc"
7-
version = "2.3.5"
8-
description = "Ocean 3.0 API Python Client Library"
7+
version = "2.4.0"
8+
description = "Oceans 3.0 API Python Client Library"
99
readme = "README.md"
1010
authors = [
11-
{ name = "ONC Data Team", email = "data@oceannetworks.ca" },
11+
{ name = "ONC Data Team", email = "api_support@oceannetworks.ca" },
1212
]
1313
license = { file = 'LICENSE.txt' }
1414
requires-python = ">=3.9"

0 commit comments

Comments
 (0)