earthcode 0.1.1__tar.gz → 0.1.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.
- {earthcode-0.1.1 → earthcode-0.1.2}/PKG-INFO +2 -12
- {earthcode-0.1.1 → earthcode-0.1.2}/README.md +1 -11
- {earthcode-0.1.1 → earthcode-0.1.2}/earthcode/search.py +2 -1
- {earthcode-0.1.1 → earthcode-0.1.2}/pixi.lock +2 -2
- {earthcode-0.1.1 → earthcode-0.1.2}/pixi.toml +4 -1
- {earthcode-0.1.1 → earthcode-0.1.2}/pyproject.toml +1 -1
- {earthcode-0.1.1 → earthcode-0.1.2}/tests/test_search.py +5 -3
- earthcode-0.1.1/.ipynb_checkpoints/dev-checkpoint.ipynb +0 -91
- earthcode-0.1.1/examples/earthcode_data_discovery.ipynb +0 -8078
- {earthcode-0.1.1 → earthcode-0.1.2}/.gitattributes +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/.github/workflows/ci.yml +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/.github/workflows/pages.yml +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/.gitignore +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/LICENSE +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/_config.yml +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/_toc.yml +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/assets/clone-and-branch.gif +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/assets/commitclip.gif +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/assets/create-token.gif +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/assets/pullrequest.gif +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/cli/generate_embeddings.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/earthcode/__init__.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/earthcode/fairtool.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/earthcode/git_add.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/earthcode/gitclerk_add.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/earthcode/metadata_input_definitions.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/earthcode/static.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/earthcode/validator.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/examples/contribute_via_osc_editor.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/examples/contribute_via_pr_osc.ipynb +0 -0
- /earthcode-0.1.1/examples/.ipynb_checkpoints/earthcode_data_discovery-checkpoint.ipynb → /earthcode-0.1.2/examples/earthcode_data_discovery.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/examples/earthcode_publishing_guide.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/examples/example_create_osc_entries.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/examples/glambie_notebook_osc.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/guide/0.Prerequisites-EarthCODE-Workspaces.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/guide/0.Prerequisites.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/guide/1.Project.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/guide/2.0.Product.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/guide/2.1.Product_files_PRR.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/guide/2.1.Product_files_self_hosted.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/guide/3.Workflow.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/guide/4.Experiment.ipynb +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/tests/test_creation.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/tests/test_fairtool.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/tests/test_notebooks.py +0 -0
- {earthcode-0.1.1 → earthcode-0.1.2}/tests/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: earthcode
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Tools for creating, validating, and searching EarthCODE Open Science Catalog metadata.
|
|
5
5
|
Project-URL: Homepage, https://github.com/ESA-EarthCODE/earthcode-library
|
|
6
6
|
Project-URL: Repository, https://github.com/ESA-EarthCODE/earthcode-library
|
|
@@ -65,18 +65,8 @@ To run:
|
|
|
65
65
|
4. `pixi install`
|
|
66
66
|
5. `pixi run jupyter lab`
|
|
67
67
|
|
|
68
|
-
Semantic search uses a staged ONNX bundle. By default it fetches
|
|
69
|
-
`model_O2.onnx` plus `tokenizer.json` from
|
|
70
|
-
`https://pangeo-test-fires.s3.eu-west-2.amazonaws.com/self-hosted-models`
|
|
71
|
-
into a local cache on first use.
|
|
72
|
-
The default cache location is the platform-specific user cache dir for
|
|
73
|
-
`earthcode`.
|
|
74
|
-
|
|
75
|
-
Runtime knobs:
|
|
76
|
-
- `EARTHCODE_MODEL_CACHE_DIR`: local cache root for staged bundles
|
|
77
|
-
|
|
78
68
|
We have examples for:
|
|
79
69
|
- `./examples/example_create_osc_entries.ipynb` - shows how to create OSC entries
|
|
80
70
|
- `./examples/contribute_via_pr_osc.ipynb` - shows how to add newly created entries to the OSC, using a GitHub pull request
|
|
81
71
|
- `./examples/contribute_via_osc_editor.ipynb` - shows how to add entries to the OSC, using a combination of this library and the OSC Editor (a GUI tool)
|
|
82
|
-
- `./examples/earthcode_publishing_guide.ipynb` - is a simplified introduction to the OSC and the necessary steps to publish data
|
|
72
|
+
- `./examples/earthcode_publishing_guide.ipynb` - is a simplified introduction to the OSC and the necessary steps to publish data
|
|
@@ -16,18 +16,8 @@ To run:
|
|
|
16
16
|
4. `pixi install`
|
|
17
17
|
5. `pixi run jupyter lab`
|
|
18
18
|
|
|
19
|
-
Semantic search uses a staged ONNX bundle. By default it fetches
|
|
20
|
-
`model_O2.onnx` plus `tokenizer.json` from
|
|
21
|
-
`https://pangeo-test-fires.s3.eu-west-2.amazonaws.com/self-hosted-models`
|
|
22
|
-
into a local cache on first use.
|
|
23
|
-
The default cache location is the platform-specific user cache dir for
|
|
24
|
-
`earthcode`.
|
|
25
|
-
|
|
26
|
-
Runtime knobs:
|
|
27
|
-
- `EARTHCODE_MODEL_CACHE_DIR`: local cache root for staged bundles
|
|
28
|
-
|
|
29
19
|
We have examples for:
|
|
30
20
|
- `./examples/example_create_osc_entries.ipynb` - shows how to create OSC entries
|
|
31
21
|
- `./examples/contribute_via_pr_osc.ipynb` - shows how to add newly created entries to the OSC, using a GitHub pull request
|
|
32
22
|
- `./examples/contribute_via_osc_editor.ipynb` - shows how to add entries to the OSC, using a combination of this library and the OSC Editor (a GUI tool)
|
|
33
|
-
- `./examples/earthcode_publishing_guide.ipynb` - is a simplified introduction to the OSC and the necessary steps to publish data
|
|
23
|
+
- `./examples/earthcode_publishing_guide.ipynb` - is a simplified introduction to the OSC and the necessary steps to publish data
|
|
@@ -76,7 +76,7 @@ def _get_cached_model_bundle(model_cache_dir=None):
|
|
|
76
76
|
print()
|
|
77
77
|
|
|
78
78
|
try:
|
|
79
|
-
for filename, uri in MODEL_ASSETS:
|
|
79
|
+
for filename, uri in MODEL_ASSETS: # was parallel before
|
|
80
80
|
download_file(filename, uri)
|
|
81
81
|
except Exception:
|
|
82
82
|
shutil.rmtree(model_dir, ignore_errors=True)
|
|
@@ -280,6 +280,7 @@ def search(
|
|
|
280
280
|
"q": np.asarray(vec, dtype=np.float32),
|
|
281
281
|
"k": limit,
|
|
282
282
|
},
|
|
283
|
+
disable_scoring_autoprojection=True,
|
|
283
284
|
prefilter=True,
|
|
284
285
|
limit=limit,
|
|
285
286
|
).to_table()
|
|
@@ -4058,8 +4058,8 @@ packages:
|
|
|
4058
4058
|
timestamp: 1734368817583
|
|
4059
4059
|
- pypi: ./
|
|
4060
4060
|
name: earthcode
|
|
4061
|
-
version: 0.1.
|
|
4062
|
-
sha256:
|
|
4061
|
+
version: 0.1.1
|
|
4062
|
+
sha256: 82130614dda8b649e3506de2147c7f48110d177362c1298c6ecb6b42d10f5267
|
|
4063
4063
|
requires_dist:
|
|
4064
4064
|
- pystac>=1.14.1,<2
|
|
4065
4065
|
- xarray>=2025.12.0,<2026
|
|
@@ -12,7 +12,7 @@ version = "0.1.0"
|
|
|
12
12
|
docs = "jupyter-book build ."
|
|
13
13
|
|
|
14
14
|
[dependencies]
|
|
15
|
-
python = ">=3.12
|
|
15
|
+
python = ">=3.12"
|
|
16
16
|
pystac = ">=1.14.1,<2"
|
|
17
17
|
xarray = ">=2025.12.0,<2026"
|
|
18
18
|
shapely = ">=2.1.2,<3"
|
|
@@ -30,6 +30,9 @@ onnxruntime = ">=1.24.1,<2"
|
|
|
30
30
|
platformdirs = ">=4.5.0,<5"
|
|
31
31
|
tokenizers = ">=0.22.2,<1"
|
|
32
32
|
|
|
33
|
+
[target.osx-arm64.dependencies]
|
|
34
|
+
python = ">=3.12,<3.14"
|
|
35
|
+
|
|
33
36
|
[feature.dev.dependencies]
|
|
34
37
|
jupyter-book = ">=1.0.4,<2"
|
|
35
38
|
jupyterlab = ">=4.5.0,<5"
|
|
@@ -78,6 +78,7 @@ def test_bbox_intersects_hits_expected_product():
|
|
|
78
78
|
ids = [r.id for r in results]
|
|
79
79
|
assert "binary-wet-snow-s14science-snow" in ids
|
|
80
80
|
|
|
81
|
+
# Test that containment differs from intersects
|
|
81
82
|
results_containment = search(
|
|
82
83
|
"snow data", limit=10, bbox=alps_bbox, intersects=False
|
|
83
84
|
)
|
|
@@ -87,17 +88,18 @@ def test_bbox_intersects_hits_expected_product():
|
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
def test_combined_filters():
|
|
91
|
+
# Test theme filter
|
|
90
92
|
land_results = search("forest fires", theme="land", limit=5)
|
|
91
93
|
assert len(land_results) > 0
|
|
92
94
|
|
|
93
|
-
ocean_results = search(
|
|
94
|
-
"forest fires", theme="oceans", keyword="forest fires", limit=5
|
|
95
|
-
)
|
|
95
|
+
ocean_results = search("forest fires", theme="oceans", keyword="forest fires", limit=5)
|
|
96
96
|
assert len(ocean_results) == 0
|
|
97
97
|
|
|
98
|
+
# Test variable filter
|
|
98
99
|
results = search(variable="burned-area", type="products", limit=5)
|
|
99
100
|
ids = {r.id for r in results}
|
|
100
101
|
assert "seasfire-cube" in ids
|
|
101
102
|
|
|
103
|
+
# Test keyword filter
|
|
102
104
|
results = search(keyword="seasonal fire modeling", type="products", limit=5)
|
|
103
105
|
assert "seasfire-cube" in [r.id for r in results]
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cells": [
|
|
3
|
-
{
|
|
4
|
-
"cell_type": "code",
|
|
5
|
-
"execution_count": null,
|
|
6
|
-
"id": "09da950a",
|
|
7
|
-
"metadata": {},
|
|
8
|
-
"outputs": [],
|
|
9
|
-
"source": [
|
|
10
|
-
"from earthcode.search import search\n",
|
|
11
|
-
"res = search(\"waposal\")\n",
|
|
12
|
-
"res"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"cell_type": "code",
|
|
17
|
-
"execution_count": null,
|
|
18
|
-
"id": "b42735c7",
|
|
19
|
-
"metadata": {},
|
|
20
|
-
"outputs": [
|
|
21
|
-
{
|
|
22
|
-
"data": {
|
|
23
|
-
"text/plain": [
|
|
24
|
-
"[<Collection id=waposal-waves>,\n",
|
|
25
|
-
" <Collection id=cloud-od-livas>,\n",
|
|
26
|
-
" <Collection id=dust-od-livas>,\n",
|
|
27
|
-
" <Collection id=swot-east-greenland-current>,\n",
|
|
28
|
-
" <Collection id=tropospheric-ozone-column-tropomi-sunlit>,\n",
|
|
29
|
-
" <Collection id=aerosol-dust-od-livas>,\n",
|
|
30
|
-
" <Collection id=cliima-cloud-od-livas>,\n",
|
|
31
|
-
" <Collection id=smos-l3-africa-smos-vegetation>,\n",
|
|
32
|
-
" <Collection id=rdsar-satellite-sar-altimeter-open-ocean-cp4o>,\n",
|
|
33
|
-
" <Collection id=clima-strat-aerosol-cloud-op-livas>]"
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"execution_count": 5,
|
|
37
|
-
"metadata": {},
|
|
38
|
-
"output_type": "execute_result"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"source": [
|
|
42
|
-
"res = search(\"waposal\")\n",
|
|
43
|
-
"res"
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"cell_type": "code",
|
|
48
|
-
"execution_count": null,
|
|
49
|
-
"id": "4c313d50",
|
|
50
|
-
"metadata": {},
|
|
51
|
-
"outputs": [],
|
|
52
|
-
"source": [
|
|
53
|
-
"# search individual stac collection from the osc\n",
|
|
54
|
-
"# index all items for that collection (skipping collections within it) basically flattening the structure of the stac collection so that it's the osc collection -> items\n",
|
|
55
|
-
"# have the ability to search them and then open them with xarray somehow \n",
|
|
56
|
-
"# in some cases there might be 300k items in a collection!\n",
|
|
57
|
-
"\n",
|
|
58
|
-
"\n",
|
|
59
|
-
"# e.g. https://opensciencedata.esa.int/products/waposal-waves/collection example links to https://opensciencedata.esa.int/external/s3.waw4-1.cloudferro.com/EarthCODE/Catalogs/waposal/collection\n",
|
|
60
|
-
"# which then contains a bunch of items e.g. https://opensciencedata.esa.int/external/s3.waw4-1.cloudferro.com/EarthCODE/Catalogs/waposal/waposal-az-cs2/waposal-az-cs2\n",
|
|
61
|
-
"# which then links to the data\n",
|
|
62
|
-
"\n",
|
|
63
|
-
"\n",
|
|
64
|
-
"#I should be able to do the same functionality as a stac api with this library\n",
|
|
65
|
-
"\n",
|
|
66
|
-
"# the key question is if I should keep the stac items in a geoparquet file on cloud or in the same lancedb file"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"metadata": {
|
|
71
|
-
"kernelspec": {
|
|
72
|
-
"display_name": "pangeo",
|
|
73
|
-
"language": "python",
|
|
74
|
-
"name": "python3"
|
|
75
|
-
},
|
|
76
|
-
"language_info": {
|
|
77
|
-
"codemirror_mode": {
|
|
78
|
-
"name": "ipython",
|
|
79
|
-
"version": 3
|
|
80
|
-
},
|
|
81
|
-
"file_extension": ".py",
|
|
82
|
-
"mimetype": "text/x-python",
|
|
83
|
-
"name": "python",
|
|
84
|
-
"nbconvert_exporter": "python",
|
|
85
|
-
"pygments_lexer": "ipython3",
|
|
86
|
-
"version": "3.13.3"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"nbformat": 4,
|
|
90
|
-
"nbformat_minor": 5
|
|
91
|
-
}
|