cloudnet-api-client 0.12.4__tar.gz → 0.12.5__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.
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/CHANGELOG.md +5 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/PKG-INFO +1 -1
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/cloudnet_api_client/client.py +6 -5
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/cloudnet_api_client/containers.py +10 -3
- cloudnet_api_client-0.12.5/cloudnet_api_client/version.py +1 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/test_client.py +5 -3
- cloudnet_api_client-0.12.4/cloudnet_api_client/version.py +0 -1
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.github/dataportal.env +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.github/db.env +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.github/docker-compose.yml +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.github/initdb.d/init-dbs.sh +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.github/ss.env +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.github/workflows/publish.yml +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.github/workflows/test.yml +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.gitignore +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/.pre-commit-config.yaml +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/LICENSE +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/README.md +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/cloudnet_api_client/__init__.py +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/cloudnet_api_client/dl.py +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/cloudnet_api_client/py.typed +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/cloudnet_api_client/utils.py +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/pyproject.toml +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20140205_hyytiala_classification.nc +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20250801_Magurele_CHM170137_000.nc +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20250803_JOYCE_WST_01m.dat +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20250808_Granada_CHM170119_0045_000.nc +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20250808_hyytiala_iwc-Z-T-method.nc +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20250814_bucharest_classification.nc +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20250821_limassol_parsivel_41582c49.nc +0 -0
- {cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20250822_leipzig-lim_ecmwf-open.nc +0 -0
|
@@ -5,6 +5,11 @@ 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.5 – 2025-09-03
|
|
9
|
+
|
|
10
|
+
- Add "mobile" site type
|
|
11
|
+
- Split `Location` to `MeanLocation` and `RawLocation`
|
|
12
|
+
|
|
8
13
|
## 0.12.4 – 2025-08-26
|
|
9
14
|
|
|
10
15
|
- Add `software` attribute to `ProductMetadata`
|
|
@@ -24,10 +24,11 @@ from cloudnet_api_client.containers import (
|
|
|
24
24
|
ExtendedProduct,
|
|
25
25
|
ExtendedProductMetadata,
|
|
26
26
|
Instrument,
|
|
27
|
-
|
|
27
|
+
MeanLocation,
|
|
28
28
|
Model,
|
|
29
29
|
Product,
|
|
30
30
|
ProductMetadata,
|
|
31
|
+
RawLocation,
|
|
31
32
|
RawMetadata,
|
|
32
33
|
RawModelMetadata,
|
|
33
34
|
Site,
|
|
@@ -277,12 +278,12 @@ class APIClient:
|
|
|
277
278
|
|
|
278
279
|
def moving_site_mean_location(
|
|
279
280
|
self, site_id: str, date: datetime.date | str
|
|
280
|
-
) ->
|
|
281
|
+
) -> MeanLocation:
|
|
281
282
|
if not isinstance(date, datetime.date):
|
|
282
283
|
date = datetime.date.fromisoformat(date)
|
|
283
284
|
payload = {"date": date}
|
|
284
285
|
res = self._get(f"sites/{site_id}/locations", params=payload)[0]
|
|
285
|
-
return
|
|
286
|
+
return MeanLocation(
|
|
286
287
|
time=date,
|
|
287
288
|
latitude=res["latitude"],
|
|
288
289
|
longitude=res["longitude"],
|
|
@@ -290,13 +291,13 @@ class APIClient:
|
|
|
290
291
|
|
|
291
292
|
def moving_site_locations(
|
|
292
293
|
self, site_id: str, date: datetime.date | str
|
|
293
|
-
) -> list[
|
|
294
|
+
) -> list[RawLocation]:
|
|
294
295
|
if not isinstance(date, datetime.date):
|
|
295
296
|
date = datetime.date.fromisoformat(date)
|
|
296
297
|
payload = {"date": date, "raw": "1"}
|
|
297
298
|
locations = self._get(f"sites/{site_id}/locations", params=payload)
|
|
298
299
|
return [
|
|
299
|
-
|
|
300
|
+
RawLocation(
|
|
300
301
|
time=_parse_datetime(location["date"]),
|
|
301
302
|
latitude=location["latitude"],
|
|
302
303
|
longitude=location["longitude"],
|
|
@@ -3,15 +3,22 @@ import uuid
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
from typing import Literal
|
|
5
5
|
|
|
6
|
-
SITE_TYPE = Literal["cloudnet", "model", "hidden", "campaign"]
|
|
6
|
+
SITE_TYPE = Literal["cloudnet", "model", "hidden", "campaign", "mobile"]
|
|
7
7
|
PRODUCT_TYPE = Literal["instrument", "geophysical", "evaluation", "model"]
|
|
8
8
|
STATUS = Literal["created", "uploaded", "processed", "invalid"]
|
|
9
9
|
TIMELINESS = Literal["rrt", "nrt", "scheduled"]
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@dataclass(frozen=True, slots=True)
|
|
13
|
-
class
|
|
14
|
-
time: datetime.
|
|
13
|
+
class MeanLocation:
|
|
14
|
+
time: datetime.date
|
|
15
|
+
latitude: float
|
|
16
|
+
longitude: float
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@dataclass(frozen=True, slots=True)
|
|
20
|
+
class RawLocation:
|
|
21
|
+
time: datetime.datetime
|
|
15
22
|
latitude: float
|
|
16
23
|
longitude: float
|
|
17
24
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.12.5"
|
|
@@ -13,10 +13,11 @@ from cloudnet_api_client.containers import (
|
|
|
13
13
|
ExtendedInstrument,
|
|
14
14
|
ExtendedProduct,
|
|
15
15
|
Instrument,
|
|
16
|
-
|
|
16
|
+
MeanLocation,
|
|
17
17
|
Model,
|
|
18
18
|
Product,
|
|
19
19
|
ProductMetadata,
|
|
20
|
+
RawLocation,
|
|
20
21
|
RawMetadata,
|
|
21
22
|
Site,
|
|
22
23
|
VersionMetadata,
|
|
@@ -128,7 +129,7 @@ class TestSites:
|
|
|
128
129
|
|
|
129
130
|
def test_moving_site_mean_location(self, client: APIClient):
|
|
130
131
|
location = client.moving_site_mean_location("boaty", "2022-01-01")
|
|
131
|
-
assert isinstance(location,
|
|
132
|
+
assert isinstance(location, MeanLocation)
|
|
132
133
|
assert location.time == datetime.date(2022, 1, 1)
|
|
133
134
|
assert round(location.latitude) == 60
|
|
134
135
|
assert round(location.longitude) == 25
|
|
@@ -136,7 +137,8 @@ class TestSites:
|
|
|
136
137
|
def test_moving_site_locations(self, client: APIClient):
|
|
137
138
|
locations = client.moving_site_locations("boaty", "2022-01-01")
|
|
138
139
|
assert isinstance(locations, list)
|
|
139
|
-
assert all(isinstance(loc,
|
|
140
|
+
assert all(isinstance(loc, RawLocation) for loc in locations)
|
|
141
|
+
assert all(loc.time.date().isoformat() == "2022-01-01" for loc in locations)
|
|
140
142
|
|
|
141
143
|
def test_invalid_site_id(self, client: APIClient):
|
|
142
144
|
with pytest.raises(CloudnetAPIError):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.12.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cloudnet_api_client-0.12.4 → cloudnet_api_client-0.12.5}/tests/data/20250803_JOYCE_WST_01m.dat
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|