eotdl 2024.6.13__py3-none-any.whl → 2024.8.21__py3-none-any.whl
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.
- eotdl/__init__.py +1 -1
- eotdl/datasets/ingest.py +10 -9
- eotdl/datasets/metadata.py +2 -0
- {eotdl-2024.6.13.dist-info → eotdl-2024.8.21.dist-info}/METADATA +2 -1
- {eotdl-2024.6.13.dist-info → eotdl-2024.8.21.dist-info}/RECORD +7 -7
- {eotdl-2024.6.13.dist-info → eotdl-2024.8.21.dist-info}/WHEEL +0 -0
- {eotdl-2024.6.13.dist-info → eotdl-2024.8.21.dist-info}/entry_points.txt +0 -0
eotdl/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "2024.
|
1
|
+
__version__ = "2024.08.21"
|
eotdl/datasets/ingest.py
CHANGED
@@ -4,6 +4,7 @@ from tqdm import tqdm
|
|
4
4
|
import json
|
5
5
|
import frontmatter
|
6
6
|
import markdown
|
7
|
+
from markdown.extensions.fenced_code import FencedCodeExtension
|
7
8
|
|
8
9
|
from ..auth import with_auth
|
9
10
|
from .metadata import Metadata
|
@@ -60,20 +61,20 @@ def ingest_folder(
|
|
60
61
|
readme = frontmatter.load(folder.joinpath("README.md"))
|
61
62
|
metadata, content = readme.metadata, readme.content
|
62
63
|
metadata = Metadata(**metadata)
|
63
|
-
except FileNotFoundError:
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
64
|
+
# except FileNotFoundError:
|
65
|
+
# # load metadata (legacy)
|
66
|
+
# metadata = (
|
67
|
+
# yaml.safe_load(open(folder.joinpath("metadata.yml"), "r").read()) or {}
|
68
|
+
# )
|
69
|
+
# metadata = Metadata(**metadata)
|
70
|
+
# content = None
|
70
71
|
except Exception as e:
|
71
|
-
|
72
|
+
print(str(e))
|
72
73
|
raise Exception("Error loading metadata")
|
73
74
|
# retrieve dataset (create if doesn't exist)
|
74
75
|
dataset = retrieve_dataset(metadata, user)
|
75
76
|
if content:
|
76
|
-
content = markdown.markdown(content)
|
77
|
+
content = markdown.markdown(content, extensions=[FencedCodeExtension()])
|
77
78
|
update_metadata = True
|
78
79
|
if "description" in dataset:
|
79
80
|
# do not do this if the dataset is new, only if it already exists
|
eotdl/datasets/metadata.py
CHANGED
@@ -21,6 +21,8 @@ class Metadata(BaseModel):
|
|
21
21
|
# validate thumbnail is a url
|
22
22
|
@validator("thumbnail")
|
23
23
|
def thumbnail_is_url(cls, v):
|
24
|
+
if not v:
|
25
|
+
return ""
|
24
26
|
if not v.startswith("http") and not v.startswith("https"):
|
25
27
|
raise ValueError("thumbnail must be a URL")
|
26
28
|
return v
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: eotdl
|
3
|
-
Version: 2024.
|
3
|
+
Version: 2024.8.21
|
4
4
|
Summary: Earth Observation Training Data Lab
|
5
5
|
License: MIT
|
6
6
|
Author: EarthPulse
|
@@ -18,6 +18,7 @@ Requires-Dist: geopandas (>=0.13.2,<0.14.0)
|
|
18
18
|
Requires-Dist: markdown (>=3.5.2,<4.0.0)
|
19
19
|
Requires-Dist: markdownify (>=0.11.6,<0.12.0)
|
20
20
|
Requires-Dist: mypy (>=1.6.1,<2.0.0)
|
21
|
+
Requires-Dist: openeo (>=0.31.0,<0.32.0)
|
21
22
|
Requires-Dist: pydantic (>=1.10.6,<2.0.0)
|
22
23
|
Requires-Dist: pyjwt (>=2.6.0,<3.0.0)
|
23
24
|
Requires-Dist: pystac[validation] (==1.8.2)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
eotdl/__init__.py,sha256=
|
1
|
+
eotdl/__init__.py,sha256=n2OwrPMIbMfYBFKreUbRkS6EzKE96Cyf_7fANIHPTf8,27
|
2
2
|
eotdl/access/__init__.py,sha256=jbyjD7BRGJURlTNmtcbBBhw3Xk4EiZvkqmEykM-bJ1k,231
|
3
3
|
eotdl/access/airbus/__init__.py,sha256=G_kkRS9eFjXbQ-aehmTLXeAxh7zpAxz_rgB7J_w0NRg,107
|
4
4
|
eotdl/access/airbus/client.py,sha256=zjfgB_NTsCCIszoQesYkyLJgheKg-eTh28vbleXYxfw,12018
|
@@ -44,8 +44,8 @@ eotdl/curation/stac/parsers.py,sha256=H5IukLA61mpLojeuhWNQdiZk2eiYHAfpJBFxmjdGDs
|
|
44
44
|
eotdl/curation/stac/stac.py,sha256=9GdiB1mV8iyREvXZoJmNJKQGawWyK3h9Eu0hJX5u6O4,13180
|
45
45
|
eotdl/datasets/__init__.py,sha256=xNbkUjqI1mf0TGjy52tpZtr5DnWNX5EVgyM04P4sU3Y,175
|
46
46
|
eotdl/datasets/download.py,sha256=JSOi7OKiENYQ3TRVj2WsC1CPYD22VlC9W5kYHPfx8Vs,3667
|
47
|
-
eotdl/datasets/ingest.py,sha256=
|
48
|
-
eotdl/datasets/metadata.py,sha256=
|
47
|
+
eotdl/datasets/ingest.py,sha256=ketP5ZElDRHbUjBSLowiAjsnjVKjiqQU40DBkw0rBsA,5918
|
48
|
+
eotdl/datasets/metadata.py,sha256=C2LSgVo0SNjEaHP8rXW1JQo4kW0aZ7MLoGa81wMRwTc,1497
|
49
49
|
eotdl/datasets/retrieve.py,sha256=DJz5K1bCLizg9YNwBnhHMFzcxMXar2socYkFONdSL4c,1041
|
50
50
|
eotdl/datasets/update.py,sha256=x-rpfxnavn9X-7QYkFMGtbn1b3bKmAZydOeS7Tjr5AQ,386
|
51
51
|
eotdl/files/__init__.py,sha256=2zfAxgLHmU_jWq_3emnfPXsX-R20gSt-yZX0bPa9h0g,87
|
@@ -73,7 +73,7 @@ eotdl/tools/paths.py,sha256=yWhOtVxX4NxrDrrBX2fuye5N1mAqrxXFy_eA7dffd84,1152
|
|
73
73
|
eotdl/tools/stac.py,sha256=ovXdrPm4Sn9AAJmrP88WnxDmq2Ut-xPoscjphxz3Iyo,5763
|
74
74
|
eotdl/tools/time_utils.py,sha256=qJ3-rk1I7ne722SLfAP6-59kahQ0vLQqIf9VpOi0Kpg,4691
|
75
75
|
eotdl/tools/tools.py,sha256=Tl4_v2ejkQo_zyZek8oofJwoYcdVosdOwW1C0lvWaNM,6354
|
76
|
-
eotdl-2024.
|
77
|
-
eotdl-2024.
|
78
|
-
eotdl-2024.
|
79
|
-
eotdl-2024.
|
76
|
+
eotdl-2024.8.21.dist-info/METADATA,sha256=ZNq8rxclA_OIzKxaR1VHpWqgtU7LtXw1-SwO1LTe1us,4093
|
77
|
+
eotdl-2024.8.21.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
78
|
+
eotdl-2024.8.21.dist-info/entry_points.txt,sha256=s6sfxUfRrSX2IP2UbrzTFTvRCtLgw3_OKcHlOKf_5F8,39
|
79
|
+
eotdl-2024.8.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|