Skip to content

Commit 061f77b

Browse files
committed
Version 0.1.7 - update dependencies
1 parent 1944192 commit 061f77b

File tree

9 files changed

+163
-185
lines changed

9 files changed

+163
-185
lines changed

.idea/misc.xml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.1.7] - 2024-10-19
2+
### Changed
3+
- Updated dependencies to include h5netcdf, h5py, pyarrow, and netcdf4
4+
15
## [0.1.4] - 2024-09-28
26
### Added
37
- Simpler method for accessing data using m2m yaml summary file (see

notebooks/01-getting_started.ipynb

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
"# Get metadata for a specific data (printing just \n",
225225
"# a subset because there's a lot of metadata)\n",
226226
"metadata = request_manager.get_metadata(site, node, sensor)\n",
227-
"print(metadata['parameters'][0])"
227+
"print(metadata['parameters'][1])"
228228
],
229229
"outputs": [
230230
{
@@ -323,8 +323,8 @@
323323
{
324324
"metadata": {
325325
"ExecuteTime": {
326-
"end_time": "2024-09-28T23:35:40.103969Z",
327-
"start_time": "2024-09-28T23:35:39.850101Z"
326+
"end_time": "2024-10-14T16:26:32.506549Z",
327+
"start_time": "2024-10-14T16:26:32.490202Z"
328328
}
329329
},
330330
"cell_type": "code",
@@ -335,45 +335,43 @@
335335
"id": "720d509d7d2ae56d",
336336
"outputs": [
337337
{
338-
"data": {
339-
"text/plain": [
340-
"dict_keys(['@class', 'lastModifiedTimestamp', 'dataSource', 'eventName', 'eventType', 'eventStartTime', 'eventStopTime', 'notes', 'eventId', 'assetUid', 'deployCruiseInfo', 'recoverCruiseInfo', 'deployedBy', 'recoveredBy', 'referenceDesignator', 'deploymentNumber', 'versionNumber', 'inductiveId', 'waterDepth', 'mooring', 'node', 'sensor', 'location', 'editPhase', 'ingestInfo', 'tense'])"
341-
]
342-
},
343-
"execution_count": 25,
344-
"metadata": {},
345-
"output_type": "execute_result"
338+
"ename": "NameError",
339+
"evalue": "name 'request_manager' is not defined",
340+
"output_type": "error",
341+
"traceback": [
342+
"\u001B[0;31m---------------------------------------------------------------------------\u001B[0m",
343+
"\u001B[0;31mNameError\u001B[0m Traceback (most recent call last)",
344+
"Cell \u001B[0;32mIn[4], line 1\u001B[0m\n\u001B[0;32m----> 1\u001B[0m sensor_info \u001B[38;5;241m=\u001B[39m \u001B[43mrequest_manager\u001B[49m\u001B[38;5;241m.\u001B[39mget_sensor_information(site, node, sensor, \u001B[38;5;241m1\u001B[39m)[\u001B[38;5;241m0\u001B[39m]\n\u001B[1;32m 2\u001B[0m sensor_info\u001B[38;5;241m.\u001B[39mkeys()\n",
345+
"\u001B[0;31mNameError\u001B[0m: name 'request_manager' is not defined"
346+
]
346347
}
347348
],
348-
"execution_count": 25
349+
"execution_count": 4
349350
},
350351
{
351352
"metadata": {
352353
"ExecuteTime": {
353-
"end_time": "2024-09-28T23:37:33.501064Z",
354-
"start_time": "2024-09-28T23:37:33.493973Z"
354+
"end_time": "2024-10-14T16:26:41.816915Z",
355+
"start_time": "2024-10-14T16:26:41.803135Z"
355356
}
356357
},
357358
"cell_type": "code",
358359
"source": "sensor_info['location']",
359360
"id": "57e8dfe6e1d5b639",
360361
"outputs": [
361362
{
362-
"data": {
363-
"text/plain": [
364-
"{'latitude': 44.63833,\n",
365-
" 'longitude': -124.30388,\n",
366-
" 'depth': 0.0,\n",
367-
" 'orbitRadius': 250.0,\n",
368-
" 'location': [-124.30388, 44.63833]}"
369-
]
370-
},
371-
"execution_count": 34,
372-
"metadata": {},
373-
"output_type": "execute_result"
363+
"ename": "NameError",
364+
"evalue": "name 'sensor_info' is not defined",
365+
"output_type": "error",
366+
"traceback": [
367+
"\u001B[0;31m---------------------------------------------------------------------------\u001B[0m",
368+
"\u001B[0;31mNameError\u001B[0m Traceback (most recent call last)",
369+
"Cell \u001B[0;32mIn[5], line 1\u001B[0m\n\u001B[0;32m----> 1\u001B[0m \u001B[43msensor_info\u001B[49m[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mlocation\u001B[39m\u001B[38;5;124m'\u001B[39m]\n",
370+
"\u001B[0;31mNameError\u001B[0m: name 'sensor_info' is not defined"
371+
]
374372
}
375373
],
376-
"execution_count": 34
374+
"execution_count": 5
377375
},
378376
{
379377
"metadata": {

notebooks/03-simple-get-data.ipynb

Lines changed: 100 additions & 141 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "yooink"
7-
version = "0.1.6"
7+
version = "0.1.7"
88
authors = [
99
{ name="Michelle Weirathmueller", email="[email protected]" },
1010
]
@@ -26,10 +26,14 @@ dependencies = [
2626
"python_dateutil==2.9.0.post0",
2727
"pytz==2024.2",
2828
"PyYAML==6.0.2",
29-
"requests==2.32.3", # Updated to lowercase
29+
"requests==2.32.3",
3030
"tomlkit==0.13.2",
3131
"tqdm==4.66.5",
3232
"xarray==2024.9.0",
33+
"pyarrow",
34+
"h5py",
35+
"netcdf4",
36+
"h5netcdf"
3337
]
3438

3539
[project.urls]

requirements.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ pandas==2.2.3
55
python_dateutil==2.9.0.post0
66
pytz==2024.2
77
PyYAML==6.0.2
8-
PyYAML==6.0.2
98
Requests==2.32.3
109
tqdm==4.66.5
11-
xarray==2024.9.0
10+
xarray
11+
pyarrow
12+
h5py
13+
netcdf4
14+
h5netcdf

src/yooink/__init__.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,21 @@
99
from .data.data_manager import DataManager
1010
from .api.client import APIClient, M2MInterface
1111
from .request.request_manager import RequestManager
12-
from .ooi_data_summary import ooi_data_summary
12+
from .ooi_data_summary import ooi_data_summary, ooi_data_full
13+
from .request.data_fetcher import DataFetcher
14+
from .utils import ooi_seconds_to_datetime
1315

1416
# Define __all__ to control what gets imported with "from yooink import *"
1517
__all__ = [
16-
'api',
17-
'request',
18-
'data',
19-
'APIClient',
20-
'RequestManager',
21-
'DataManager',
22-
'M2MInterface',
23-
'ooi_data_summary'
18+
"api",
19+
"request",
20+
"data",
21+
"APIClient",
22+
"RequestManager",
23+
"DataManager",
24+
"M2MInterface",
25+
"ooi_data_summary",
26+
"ooi_data_full",
27+
"DataFetcher",
28+
"ooi_seconds_to_datetime",
2429
]

src/yooink/data/ooi_data.parquet

31.6 KB
Binary file not shown.

src/yooink/ooi_data_summary.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import pandas as pd
22
import importlib.resources as pkg_resources
33

4-
# Load the CSV into a pandas DataFrame as soon as the module is imported
5-
with pkg_resources.open_text(
6-
'yooink.data', 'data_combinations.csv') as csv_file:
4+
# # Load the CSV into a pandas DataFrame
5+
with pkg_resources.open_text("yooink.data", "data_combinations.csv") as csv_file:
76
ooi_data_summary = pd.read_csv(csv_file)
7+
8+
# Load the parquet file into a pandas Dataframe
9+
with pkg_resources.open_binary("yooink.data", "ooi_data.parquet") as parquet_file:
10+
ooi_data_full = pd.read_parquet(parquet_file)

0 commit comments

Comments
 (0)