cloudnet-api-client 0.12.1__tar.gz → 0.12.2__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 (31) hide show
  1. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/CHANGELOG.md +4 -0
  2. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/PKG-INFO +1 -1
  3. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/cloudnet_api_client/client.py +4 -3
  4. cloudnet_api_client-0.12.2/cloudnet_api_client/version.py +1 -0
  5. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/test_client.py +2 -0
  6. cloudnet_api_client-0.12.1/cloudnet_api_client/version.py +0 -1
  7. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.github/dataportal.env +0 -0
  8. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.github/db.env +0 -0
  9. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.github/docker-compose.yml +0 -0
  10. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.github/initdb.d/init-dbs.sh +0 -0
  11. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.github/ss.env +0 -0
  12. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.github/workflows/publish.yml +0 -0
  13. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.github/workflows/test.yml +0 -0
  14. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.gitignore +0 -0
  15. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/.pre-commit-config.yaml +0 -0
  16. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/LICENSE +0 -0
  17. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/README.md +0 -0
  18. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/cloudnet_api_client/__init__.py +0 -0
  19. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/cloudnet_api_client/containers.py +0 -0
  20. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/cloudnet_api_client/dl.py +0 -0
  21. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/cloudnet_api_client/py.typed +0 -0
  22. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/cloudnet_api_client/utils.py +0 -0
  23. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/pyproject.toml +0 -0
  24. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/data/20140205_hyytiala_classification.nc +0 -0
  25. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/data/20250801_Magurele_CHM170137_000.nc +0 -0
  26. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/data/20250803_JOYCE_WST_01m.dat +0 -0
  27. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/data/20250808_Granada_CHM170119_0045_000.nc +0 -0
  28. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/data/20250808_hyytiala_iwc-Z-T-method.nc +0 -0
  29. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/data/20250814_bucharest_classification.nc +0 -0
  30. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/data/20250821_limassol_parsivel_41582c49.nc +0 -0
  31. {cloudnet_api_client-0.12.1 → cloudnet_api_client-0.12.2}/tests/data/20250822_leipzig-lim_ecmwf-open.nc +0 -0
@@ -5,6 +5,10 @@ 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.2 – 2025-08-25
9
+
10
+ - Fix product type filter bug
11
+
8
12
  ## 0.12.1 – 2025-08-25
9
13
 
10
14
  - Fix tag subset filters
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudnet-api-client
3
- Version: 0.12.1
3
+ Version: 0.12.2
4
4
  Summary: Cloudnet API client
5
5
  Author-email: Simo Tukiainen <simo.tukiainen@fmi.fi>
6
6
  License-File: LICENSE
@@ -60,7 +60,7 @@ class APIClient:
60
60
  self,
61
61
  type: SITE_TYPE | list[SITE_TYPE] | None = None,
62
62
  ) -> list[Site]:
63
- validate_type(type, SITE_TYPE)
63
+ type = validate_type(type, SITE_TYPE)
64
64
  res = self._get("sites", {"type": type})
65
65
  return _build_objects(res, Site)
66
66
 
@@ -71,7 +71,7 @@ class APIClient:
71
71
  def products(
72
72
  self, type: PRODUCT_TYPE | list[PRODUCT_TYPE] | None = None
73
73
  ) -> list[Product]:
74
- validate_type(type, PRODUCT_TYPE)
74
+ type = validate_type(type, PRODUCT_TYPE)
75
75
  data = self._get("products")
76
76
  if type is not None:
77
77
  data = [obj for obj in data if any(t in obj["type"] for t in type)]
@@ -674,7 +674,7 @@ def _check_params(params: dict, ignore: tuple = ()) -> None:
674
674
  raise TypeError("At least one of the parameters must be set.")
675
675
 
676
676
 
677
- def validate_type(type, values) -> None:
677
+ def validate_type(type, values) -> list | None:
678
678
  if type is not None:
679
679
  if not isinstance(type, str | list):
680
680
  raise ValueError(f"Invalid type: {type}")
@@ -682,3 +682,4 @@ def validate_type(type, values) -> None:
682
682
  for t in type:
683
683
  if t not in get_args(values):
684
684
  raise ValueError(f"Invalid type: {t}")
685
+ return type
@@ -0,0 +1 @@
1
+ __version__ = "0.12.2"
@@ -153,10 +153,12 @@ class TestProducts:
153
153
 
154
154
  def test_products_route_with_type_filter(self, client: APIClient):
155
155
  products = client.products("instrument")
156
+ assert len(products) > 5
156
157
  assert all(product.type == {"instrument"} for product in products)
157
158
 
158
159
  def test_products_route_with_type_filter_combo(self, client: APIClient):
159
160
  products = client.products(["instrument", "geophysical"])
161
+ assert len(products) > 5
160
162
  assert all(
161
163
  product.type in [{"instrument"}, {"geophysical"}] for product in products
162
164
  )
@@ -1 +0,0 @@
1
- __version__ = "0.12.1"