eotdl 2025.4.22__py3-none-any.whl → 2025.4.22.post3__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/commands/datasets.py +14 -0
- eotdl/commands/models.py +15 -0
- eotdl/commands/stac.py +2 -2
- eotdl/curation/stac/api.py +2 -2
- eotdl/datasets/__init__.py +1 -0
- eotdl/datasets/update.py +11 -1
- eotdl/models/__init__.py +1 -0
- eotdl/models/update.py +11 -2
- eotdl/repos/APIRepo.py +2 -2
- eotdl/repos/DatasetsAPIRepo.py +7 -0
- eotdl/repos/ModelsAPIRepo.py +6 -1
- eotdl/repos/STACAPIRepo.py +2 -2
- {eotdl-2025.4.22.dist-info → eotdl-2025.4.22.post3.dist-info}/METADATA +1 -1
- {eotdl-2025.4.22.dist-info → eotdl-2025.4.22.post3.dist-info}/RECORD +17 -17
- {eotdl-2025.4.22.dist-info → eotdl-2025.4.22.post3.dist-info}/WHEEL +0 -0
- {eotdl-2025.4.22.dist-info → eotdl-2025.4.22.post3.dist-info}/entry_points.txt +0 -0
eotdl/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "2025.04.22"
|
1
|
+
__version__ = "2025.04.22-3"
|
eotdl/commands/datasets.py
CHANGED
@@ -5,6 +5,7 @@ from ..datasets import (
|
|
5
5
|
retrieve_datasets,
|
6
6
|
ingest_dataset,
|
7
7
|
stage_dataset,
|
8
|
+
deactivate_dataset,
|
8
9
|
)
|
9
10
|
|
10
11
|
app = typer.Typer(help="Explore, ingest and download training datasets.")
|
@@ -141,5 +142,18 @@ def get(
|
|
141
142
|
typer.echo(e)
|
142
143
|
|
143
144
|
|
145
|
+
@app.command()
|
146
|
+
def delete(
|
147
|
+
dataset: str = typer.Argument(None, help="Name of the dataset to deactivate")
|
148
|
+
):
|
149
|
+
"""
|
150
|
+
Delete a dataset from the EOTDL.
|
151
|
+
"""
|
152
|
+
try:
|
153
|
+
deactivate_dataset(dataset)
|
154
|
+
typer.echo(f"Dataset {dataset} deleted")
|
155
|
+
except Exception as e:
|
156
|
+
typer.echo(e)
|
157
|
+
|
144
158
|
if __name__ == "__main__":
|
145
159
|
app()
|
eotdl/commands/models.py
CHANGED
@@ -5,6 +5,7 @@ from ..models import (
|
|
5
5
|
retrieve_models,
|
6
6
|
ingest_model,
|
7
7
|
stage_model,
|
8
|
+
deactivate_model
|
8
9
|
)
|
9
10
|
|
10
11
|
app = typer.Typer(help="Explore, ingest and download ML models.")
|
@@ -132,5 +133,19 @@ def get(
|
|
132
133
|
typer.echo(e)
|
133
134
|
|
134
135
|
|
136
|
+
@app.command()
|
137
|
+
def delete(
|
138
|
+
model_name: str = typer.Argument(None, help="Name of the model to delete")
|
139
|
+
):
|
140
|
+
"""
|
141
|
+
Delete a model from the EOTDL.
|
142
|
+
"""
|
143
|
+
try:
|
144
|
+
deactivate_model(model_name)
|
145
|
+
typer.echo(f"Model {model_name} deleted")
|
146
|
+
except Exception as e:
|
147
|
+
typer.echo(e)
|
148
|
+
|
149
|
+
|
135
150
|
if __name__ == "__main__":
|
136
151
|
app()
|
eotdl/commands/stac.py
CHANGED
@@ -24,9 +24,9 @@ def collections():
|
|
24
24
|
raise typer.Abort()
|
25
25
|
|
26
26
|
@app.command()
|
27
|
-
def collection(
|
27
|
+
def collection(collection_name: str):
|
28
28
|
try:
|
29
|
-
data = retrieve_stac_collection(
|
29
|
+
data = retrieve_stac_collection(collection_name)
|
30
30
|
typer.echo(data)
|
31
31
|
except Exception as e:
|
32
32
|
typer.echo(e)
|
eotdl/curation/stac/api.py
CHANGED
@@ -16,9 +16,9 @@ def retrieve_stac_collections():
|
|
16
16
|
raise Exception(error)
|
17
17
|
return data
|
18
18
|
|
19
|
-
def retrieve_stac_collection(
|
19
|
+
def retrieve_stac_collection(collection_name):
|
20
20
|
repo = STACAPIRepo()
|
21
|
-
data, error = repo.collection(
|
21
|
+
data, error = repo.collection(collection_name)
|
22
22
|
if error:
|
23
23
|
raise Exception(error)
|
24
24
|
return data
|
eotdl/datasets/__init__.py
CHANGED
eotdl/datasets/update.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
from ..repos import DatasetsAPIRepo
|
2
|
-
|
2
|
+
from ..auth import with_auth
|
3
|
+
from .retrieve import retrieve_dataset
|
3
4
|
|
4
5
|
def update_dataset(dataset_id, metadata, content, user):
|
5
6
|
repo = DatasetsAPIRepo()
|
@@ -15,3 +16,12 @@ def update_dataset(dataset_id, metadata, content, user):
|
|
15
16
|
if error:
|
16
17
|
raise Exception(error)
|
17
18
|
return data
|
19
|
+
|
20
|
+
@with_auth
|
21
|
+
def deactivate_dataset(dataset_name, user):
|
22
|
+
dataset = retrieve_dataset(dataset_name)
|
23
|
+
repo = DatasetsAPIRepo()
|
24
|
+
data, error = repo.deactivate_dataset(dataset['id'], user)
|
25
|
+
if error:
|
26
|
+
raise Exception(error)
|
27
|
+
return data
|
eotdl/models/__init__.py
CHANGED
eotdl/models/update.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
from ..repos import ModelsAPIRepo
|
2
|
-
|
3
|
-
|
2
|
+
from ..auth import with_auth
|
3
|
+
from .retrieve import retrieve_model
|
4
4
|
def update_model(model_id, metadata, content, user):
|
5
5
|
repo = ModelsAPIRepo()
|
6
6
|
data, error = repo.update_model(
|
@@ -15,3 +15,12 @@ def update_model(model_id, metadata, content, user):
|
|
15
15
|
if error:
|
16
16
|
raise Exception(error)
|
17
17
|
return data
|
18
|
+
|
19
|
+
@with_auth
|
20
|
+
def deactivate_model(model_name, user):
|
21
|
+
model = retrieve_model(model_name)
|
22
|
+
repo = ModelsAPIRepo()
|
23
|
+
data, error = repo.deactivate_model(model['id'], user)
|
24
|
+
if error:
|
25
|
+
raise Exception(error)
|
26
|
+
return data
|
eotdl/repos/APIRepo.py
CHANGED
@@ -4,8 +4,8 @@ import requests
|
|
4
4
|
|
5
5
|
class APIRepo:
|
6
6
|
def __init__(self, url=None):
|
7
|
-
default_url = "https://api.eotdl.com/"
|
8
|
-
|
7
|
+
# default_url = "https://api.eotdl.com/"
|
8
|
+
default_url = "http://localhost:8000/"
|
9
9
|
self.url = url if url else os.getenv("EOTDL_API_URL", default_url)
|
10
10
|
|
11
11
|
def format_response(self, response):
|
eotdl/repos/DatasetsAPIRepo.py
CHANGED
@@ -41,3 +41,10 @@ class DatasetsAPIRepo(APIRepo):
|
|
41
41
|
headers=self.generate_headers(user),
|
42
42
|
)
|
43
43
|
return self.format_response(response)
|
44
|
+
|
45
|
+
def deactivate_dataset(self, dataset_name, user):
|
46
|
+
response = requests.patch(
|
47
|
+
self.url + "datasets/deactivate/" + dataset_name,
|
48
|
+
headers=self.generate_headers(user),
|
49
|
+
)
|
50
|
+
return self.format_response(response)
|
eotdl/repos/ModelsAPIRepo.py
CHANGED
@@ -38,4 +38,9 @@ class ModelsAPIRepo(APIRepo):
|
|
38
38
|
)
|
39
39
|
return self.format_response(response)
|
40
40
|
|
41
|
-
|
41
|
+
def deactivate_model(self, model_name, user):
|
42
|
+
response = requests.patch(
|
43
|
+
self.url + "models/deactivate/" + model_name,
|
44
|
+
headers=self.generate_headers(user),
|
45
|
+
)
|
46
|
+
return self.format_response(response)
|
eotdl/repos/STACAPIRepo.py
CHANGED
@@ -15,8 +15,8 @@ class STACAPIRepo(APIRepo):
|
|
15
15
|
response = requests.get(self.url + "stac/collections")
|
16
16
|
return self.format_response(response)
|
17
17
|
|
18
|
-
def collection(self,
|
19
|
-
response = requests.get(self.url + f"stac/collections/{
|
18
|
+
def collection(self, collection_name):
|
19
|
+
response = requests.get(self.url + f"stac/collections/{collection_name}")
|
20
20
|
return self.format_response(response)
|
21
21
|
|
22
22
|
def items(self, collection_id):
|
@@ -1,4 +1,4 @@
|
|
1
|
-
eotdl/__init__.py,sha256=
|
1
|
+
eotdl/__init__.py,sha256=7ffxcL2ca1sGY5odWVA8EOODNWH7DJNXcTVDabbY4Tk,29
|
2
2
|
eotdl/cli.py,sha256=BAI3HuDf1WohaWeA5y1bUJMABDkqmfttOCa7FY5P3Hk,701
|
3
3
|
eotdl/access/__init__.py,sha256=k-zmTwB6VLoWt_AsXx9CnEKdtONBZAaC8T6vqPMPSjk,436
|
4
4
|
eotdl/access/download.py,sha256=e5H8LUkCfIVkFxJFM5EwCMG-R5DHVSHDGLvuNM5DNc8,2815
|
@@ -19,35 +19,35 @@ eotdl/auth/is_logged.py,sha256=QREuhkoDnarZoUZwCxVCNoESGb_Yukh0lJo1pXvrV9Q,115
|
|
19
19
|
eotdl/auth/logout.py,sha256=P_Sp6WmVvnG3R9V1L9541KNyHFko9DtQPqAKD2vaguw,161
|
20
20
|
eotdl/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
21
|
eotdl/commands/auth.py,sha256=WzA0aFGRoscy7fPKQTxiphBc0LJztJxBBl7rjDBRVfI,1544
|
22
|
-
eotdl/commands/datasets.py,sha256=
|
23
|
-
eotdl/commands/models.py,sha256=
|
24
|
-
eotdl/commands/stac.py,sha256=
|
22
|
+
eotdl/commands/datasets.py,sha256=SHLWuFTT4Pe0Uh-hAVcCvyDoe0cSastXT13fpujdnos,5541
|
23
|
+
eotdl/commands/models.py,sha256=7P_K5zMVDQQRlfrV_ayIEqQg_tpoLkw1aF48dw60rY4,5192
|
24
|
+
eotdl/commands/stac.py,sha256=jgjjkGw9tIvuovyAwfEu6B4ZMoMvEj5lrj_lO-9IqrE,1444
|
25
25
|
eotdl/curation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
26
|
eotdl/curation/stac/__init__.py,sha256=FMi-qzd6v1sdsqZsBRRnedccaJFXJGCPCH3uTctyLYU,37
|
27
|
-
eotdl/curation/stac/api.py,sha256=
|
27
|
+
eotdl/curation/stac/api.py,sha256=5XW9yzSxiuML70bBbzJ0DGx0GmplmhYtgeGZg029Qjk,1428
|
28
28
|
eotdl/curation/stac/stac.py,sha256=4f7xrh2CcXTkTs3or1UMVxiFfwtVfTqH4YwTGsbi6No,1013
|
29
|
-
eotdl/datasets/__init__.py,sha256=
|
29
|
+
eotdl/datasets/__init__.py,sha256=g2WBJa_EVVXtktxqZRJEAQPHADU0qVaLkjDYZnojDgc,256
|
30
30
|
eotdl/datasets/ingest.py,sha256=7LI4eENRxhGDjgfAlgLqTY96jiX5iRB0_SlU63NboOM,1414
|
31
31
|
eotdl/datasets/retrieve.py,sha256=dhNbBJu0vE0l-LsGQNQF5Vc_WzZDRbXPzvd66GNlV6U,691
|
32
32
|
eotdl/datasets/stage.py,sha256=pcU1AsjbczzMHdhCxjKfCuuuLo1OZMMWNAUqj-3SxKc,2162
|
33
|
-
eotdl/datasets/update.py,sha256=
|
33
|
+
eotdl/datasets/update.py,sha256=QmhXZwAOqz5ysc_VpCjFFDo5tpt0EKG44G1jYeQmbkQ,706
|
34
34
|
eotdl/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
35
|
eotdl/files/ingest.bck,sha256=dgjZfd-ACCKradDo2B02CPahwEhFtWvnKvTm372K5eo,6185
|
36
36
|
eotdl/files/ingest.py,sha256=mepe-RmweWaM_4fUZjyGWpwjrg6EIlc_B7GwxRR7Br4,9379
|
37
37
|
eotdl/files/metadata.py,sha256=C-NDr-zjM58fP8QcHB1N1QyLRUeYyMbT6wPPnxGk8LI,1370
|
38
|
-
eotdl/models/__init__.py,sha256=
|
38
|
+
eotdl/models/__init__.py,sha256=b6t1Z377On1F56c-GSy7FM_nBWRLHh1Ph2R24rPFiVY,239
|
39
39
|
eotdl/models/download.py,sha256=rRT3fG-qS3-SXfzFdqy0cuiDnOIV9Du74JCnsbbA9Ps,3475
|
40
40
|
eotdl/models/ingest.py,sha256=xpDoY4Tn0y94bIDXgk2No6fGLydPbKYcc9NsPj-yFms,1372
|
41
41
|
eotdl/models/retrieve.py,sha256=-Ij7dT4J1p7MW4n13OlPB9OW4tBaBXPwk9dW8IuCZPc,664
|
42
42
|
eotdl/models/stage.py,sha256=rvWN8vcBz7qHhu0TzJ90atw1kEr3JPKF0k2S-Sv-JVs,1944
|
43
|
-
eotdl/models/update.py,sha256=
|
44
|
-
eotdl/repos/APIRepo.py,sha256=
|
43
|
+
eotdl/models/update.py,sha256=PIdPbPrdul-HSAAL21SadAkZT2kcnJyV2uTmi8dlK5k,676
|
44
|
+
eotdl/repos/APIRepo.py,sha256=s9w29Cnk5Pu4NvjyHAfcpM69a2lODICJ-Gn_iosxsPg,791
|
45
45
|
eotdl/repos/AuthAPIRepo.py,sha256=vYCqFawe3xUm2cx4SqVXCvzl8J_sr9rs_MkipYC0bXE,957
|
46
46
|
eotdl/repos/AuthRepo.py,sha256=jpzzhINCcDZHRCyrPDsp49h17IlXp2HvX3BB3f5cnb4,1154
|
47
|
-
eotdl/repos/DatasetsAPIRepo.py,sha256=
|
47
|
+
eotdl/repos/DatasetsAPIRepo.py,sha256=tAnzKCyVHw6YtEXt8UMu5HTvUysS6KOVtaVZQDeN6iY,1695
|
48
48
|
eotdl/repos/FilesAPIRepo.py,sha256=PNNS5LGxksZpkg-49_r3r2H0iQWkCeb7iiL6j-S4wLY,4757
|
49
|
-
eotdl/repos/ModelsAPIRepo.py,sha256=
|
50
|
-
eotdl/repos/STACAPIRepo.py,sha256=
|
49
|
+
eotdl/repos/ModelsAPIRepo.py,sha256=hgnU8wkwESsrzfL6Wxpwwt7ejlnoOBeeNa4IrV4hwRo,1494
|
50
|
+
eotdl/repos/STACAPIRepo.py,sha256=GJIrLkgVB-donToJlgOmaJbxDmXzIuwlmCb9R2yoRIA,1387
|
51
51
|
eotdl/repos/__init__.py,sha256=GIzk62681dvNzYgVzvJgrMzVRhrep4-kJH6lTOtfnT8,258
|
52
52
|
eotdl/shared/__init__.py,sha256=mF7doJC8Z5eTPmB01UQvPivThZac32DRY33T6qshXfg,41
|
53
53
|
eotdl/shared/checksum.py,sha256=4IB6N9jRO0chMDNJzpdnFDhC9wcFF9bO5oHq2HodcHw,479
|
@@ -60,7 +60,7 @@ eotdl/tools/time_utils.py,sha256=JHrQ3PxXkhwor8zcOFccf26zOG9WBtb9xHb6j-Fqa9k,466
|
|
60
60
|
eotdl/tools/tools.py,sha256=Tl4_v2ejkQo_zyZek8oofJwoYcdVosdOwW1C0lvWaNM,6354
|
61
61
|
eotdl/wrappers/__init__.py,sha256=IY3DK_5LMbc5bIQFleQA9kzFbPhWuTLesJ8dwfvpkdA,32
|
62
62
|
eotdl/wrappers/models.py,sha256=kNO4pYw9KKKmElE7bZWWHGs7FIThNUXj8XciKh_3rNw,6432
|
63
|
-
eotdl-2025.4.22.dist-info/METADATA,sha256=
|
64
|
-
eotdl-2025.4.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
65
|
-
eotdl-2025.4.22.dist-info/entry_points.txt,sha256=FV4dFIZ5zdWj1q1nUEEip29n3sAgbviVOizEz00gEF0,40
|
66
|
-
eotdl-2025.4.22.dist-info/RECORD,,
|
63
|
+
eotdl-2025.4.22.post3.dist-info/METADATA,sha256=juP5ybZqiIS9GuJlpzAv_SL8JHkrtLRgj9P6GYMaAyU,3371
|
64
|
+
eotdl-2025.4.22.post3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
65
|
+
eotdl-2025.4.22.post3.dist-info/entry_points.txt,sha256=FV4dFIZ5zdWj1q1nUEEip29n3sAgbviVOizEz00gEF0,40
|
66
|
+
eotdl-2025.4.22.post3.dist-info/RECORD,,
|
File without changes
|
File without changes
|