cloudnet-api-client 0.12.12__tar.gz → 0.12.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.github/workflows/publish.yml +1 -1
  2. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.github/workflows/test.yml +12 -20
  3. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.pre-commit-config.yaml +3 -3
  4. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/CHANGELOG.md +9 -0
  5. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/PKG-INFO +28 -3
  6. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/README.md +26 -1
  7. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/cloudnet_api_client/client.py +140 -350
  8. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/cloudnet_api_client/dl.py +83 -29
  9. cloudnet_api_client-0.12.14/cloudnet_api_client/utils.py +439 -0
  10. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/cloudnet_api_client/version.py +1 -1
  11. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/pyproject.toml +4 -3
  12. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/test_client.py +131 -6
  13. cloudnet_api_client-0.12.12/cloudnet_api_client/utils.py +0 -75
  14. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.github/dataportal.env +0 -0
  15. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.github/db.env +0 -0
  16. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.github/docker-compose.yml +0 -0
  17. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.github/initdb.d/init-dbs.sh +0 -0
  18. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.github/ss.env +0 -0
  19. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/.gitignore +0 -0
  20. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/LICENSE +0 -0
  21. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/cloudnet_api_client/__init__.py +0 -0
  22. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/cloudnet_api_client/containers.py +0 -0
  23. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/cloudnet_api_client/py.typed +0 -0
  24. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20140205_hyytiala_classification.nc +0 -0
  25. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250711_kenttarova_l3-cf_ecmwf.nc +0 -0
  26. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250711_kenttarova_l3-cf_era5-1-12.nc +0 -0
  27. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250711_kenttarova_l3-cf_era5-7-18.nc +0 -0
  28. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250801_Magurele_CHM170137_000.nc +0 -0
  29. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250803_JOYCE_WST_01m.dat +0 -0
  30. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250808_Granada_CHM170119_0045_000.nc +0 -0
  31. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250808_hyytiala_iwc-Z-T-method.nc +0 -0
  32. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250814_bucharest_classification.nc +0 -0
  33. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250821_limassol_parsivel_41582c49.nc +0 -0
  34. {cloudnet_api_client-0.12.12 → cloudnet_api_client-0.12.14}/tests/data/20250822_leipzig-lim_ecmwf-open.nc +0 -0
@@ -30,7 +30,7 @@ jobs:
30
30
  echo "name=cloudnet-api-client $version" >> $GITHUB_OUTPUT
31
31
  id: changelog
32
32
  - name: Create release
33
- uses: softprops/action-gh-release@v2
33
+ uses: softprops/action-gh-release@v3
34
34
  with:
35
35
  name: ${{ steps.changelog.outputs.name }}
36
36
  body_path: ${{ github.workspace }}-CHANGELOG.txt
@@ -2,30 +2,27 @@ name: Test and lint
2
2
 
3
3
  on: [push, pull_request]
4
4
 
5
+ concurrency:
6
+ group: ${{ github.workflow }}-${{ github.ref }}
7
+ cancel-in-progress: true
8
+
5
9
  jobs:
6
10
  test:
7
11
  timeout-minutes: 5
8
12
  strategy:
9
13
  matrix:
10
- python-version: ["3.10", "3.11", "3.12", "3.13"]
14
+ python-version: ["3.10", "3.14"]
11
15
  runs-on: ubuntu-latest
12
16
  steps:
13
- - name: Set up Python
14
- uses: actions/setup-python@v6
15
- with:
16
- python-version: ${{ matrix.python-version }}
17
-
18
17
  - name: Checkout code
19
18
  uses: actions/checkout@v6
20
19
 
21
- - name: Cache Python dependencies
22
- uses: actions/cache@v5
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v6
23
22
  with:
24
- path: ~/.cache/pip
25
- key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
26
- restore-keys: |
27
- ${{ runner.os }}-pip-${{ matrix.python-version }}-
28
- ${{ runner.os }}-pip-
23
+ python-version: ${{ matrix.python-version }}
24
+ cache: pip
25
+ cache-dependency-path: pyproject.toml
29
26
 
30
27
  - name: Checkout fixtures
31
28
  uses: actions/checkout@v6
@@ -41,19 +38,14 @@ jobs:
41
38
  repository: actris-cloudnet/dataportal-fixtures
42
39
  path: dataportal-fixtures
43
40
 
44
- - name: Set up Docker Buildx
45
- uses: docker/setup-buildx-action@v4
46
-
47
41
  - name: Start dataportal
48
42
  run: docker compose -f .github/docker-compose.yml up -d --wait
49
43
 
50
44
  - name: Install dependencies
51
- run: |
52
- pip install --upgrade pip
53
- pip install .[dev,test]
45
+ run: pip install .[dev,test]
54
46
 
55
47
  - name: Run pre-commit checks
56
- if: matrix.python-version == '3.13'
48
+ if: matrix.python-version == '3.14'
57
49
  run: pre-commit run --all-files --show-diff-on-failure
58
50
 
59
51
  - name: Run tests
@@ -13,7 +13,7 @@ repos:
13
13
  args: ["--fix", "lf"]
14
14
  - id: trailing-whitespace
15
15
  - repo: https://github.com/astral-sh/ruff-pre-commit
16
- rev: v0.12.8
16
+ rev: v0.17.3
17
17
  hooks:
18
18
  - id: ruff
19
19
  args: ["--fix"]
@@ -31,10 +31,10 @@ repos:
31
31
  hooks:
32
32
  - id: prettier
33
33
  - repo: https://github.com/pappasam/toml-sort
34
- rev: v0.24.2
34
+ rev: v0.25.0
35
35
  hooks:
36
36
  - id: toml-sort-fix
37
37
  - repo: https://github.com/crate-ci/typos
38
- rev: v1.30.2
38
+ rev: v1.51.1
39
39
  hooks:
40
40
  - id: typos
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.12.14 – 2026-11-30
9
+
10
+ - Add `submit` method for data submission
11
+
12
+ ## 0.12.13 – 2026-10-28
13
+
14
+ - Verify checksum on file download
15
+ - Test with Python 3.14
16
+
8
17
  ## 0.12.12 – 2026-09-15
9
18
 
10
19
  - Add labelling_status to Site
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: cloudnet-api-client
3
- Version: 0.12.12
3
+ Version: 0.12.14
4
4
  Summary: Cloudnet API client
5
5
  Author-email: Simo Tukiainen <simo.tukiainen@fmi.fi>
6
+ License-Expression: MIT
6
7
  License-File: LICENSE
7
8
  Classifier: Development Status :: 3 - Alpha
8
9
  Classifier: Intended Audience :: Science/Research
9
- Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
@@ -64,7 +64,9 @@ file = client.file("405cc410-1f24-4ea9-bae8-da7f22be26cb")
64
64
  files = client.files(site_id="hyytiala", date="2021-01-01", product_id=["mwr", "radar"])
65
65
  file_paths = client.download(files, "data/")
66
66
 
67
- raw_files = client.raw_files(site_id="granada", date="2024-01", instrument_id="parsivel")
67
+ raw_files = client.raw_files(
68
+ site_id="granada", date="2024-01", instrument_id="parsivel"
69
+ )
68
70
  file_paths = client.download(raw_files, "data_raw/")
69
71
  ```
70
72
 
@@ -250,6 +252,29 @@ Parameters:
250
252
  There's also an asynchronous version of this function:
251
253
  `cloudnet_api_client.adownload`. It's useful for usage inside Jupyter notebook.
252
254
 
255
+ ### `APIClient().submit()` &rarr; `None`
256
+
257
+ Submit a raw data file to the Cloudnet data portal. The file metadata is uploaded
258
+ first, then the file itself. If the file has already been received by the server,
259
+ the data upload is skipped. See the
260
+ [data upload documentation](https://docs.cloudnet.fmi.fi/api/data-upload.html).
261
+
262
+ Parameters:
263
+
264
+ | name | type | default | example |
265
+ | -------------- | ------------------- | ------- | ---------------------------------------------------- |
266
+ | filename | `str` or `PathLike` | | "20250801_Magurele_CHM170137_000.nc" |
267
+ | date | `str` or `date` | | "2025-08-01" |
268
+ | instrument_id | `str` | | "chm15k" |
269
+ | instrument_pid | `str` | | "https://hdl.handle.net/21.12132/3.c60c931fac9d43f0" |
270
+ | site_id | `str` | | "bucharest" |
271
+ | username | `str` | | |
272
+ | password | `str` | | |
273
+ | tags | `Iterable[str]` | `None` | ["co"] |
274
+
275
+ The upload requires HTTP Basic authentication via the `username` and `password`
276
+ parameters.
277
+
253
278
  ## License
254
279
 
255
280
  MIT
@@ -35,7 +35,9 @@ file = client.file("405cc410-1f24-4ea9-bae8-da7f22be26cb")
35
35
  files = client.files(site_id="hyytiala", date="2021-01-01", product_id=["mwr", "radar"])
36
36
  file_paths = client.download(files, "data/")
37
37
 
38
- raw_files = client.raw_files(site_id="granada", date="2024-01", instrument_id="parsivel")
38
+ raw_files = client.raw_files(
39
+ site_id="granada", date="2024-01", instrument_id="parsivel"
40
+ )
39
41
  file_paths = client.download(raw_files, "data_raw/")
40
42
  ```
41
43
 
@@ -221,6 +223,29 @@ Parameters:
221
223
  There's also an asynchronous version of this function:
222
224
  `cloudnet_api_client.adownload`. It's useful for usage inside Jupyter notebook.
223
225
 
226
+ ### `APIClient().submit()` &rarr; `None`
227
+
228
+ Submit a raw data file to the Cloudnet data portal. The file metadata is uploaded
229
+ first, then the file itself. If the file has already been received by the server,
230
+ the data upload is skipped. See the
231
+ [data upload documentation](https://docs.cloudnet.fmi.fi/api/data-upload.html).
232
+
233
+ Parameters:
234
+
235
+ | name | type | default | example |
236
+ | -------------- | ------------------- | ------- | ---------------------------------------------------- |
237
+ | filename | `str` or `PathLike` | | "20250801_Magurele_CHM170137_000.nc" |
238
+ | date | `str` or `date` | | "2025-08-01" |
239
+ | instrument_id | `str` | | "chm15k" |
240
+ | instrument_pid | `str` | | "https://hdl.handle.net/21.12132/3.c60c931fac9d43f0" |
241
+ | site_id | `str` | | "bucharest" |
242
+ | username | `str` | | |
243
+ | password | `str` | | |
244
+ | tags | `Iterable[str]` | `None` | ["co"] |
245
+
246
+ The upload requires HTTP Basic authentication via the `username` and `password`
247
+ parameters.
248
+
224
249
  ## License
225
250
 
226
251
  MIT