udata 9.0.1.dev29853__py2.py3-none-any.whl → 9.0.1.dev29871__py2.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.
Potentially problematic release.
This version of udata might be problematic. Click here for more details.
- udata/api/commands.py +0 -2
- udata/core/dataservices/rdf.py +2 -5
- udata/core/dataset/models.py +1 -2
- udata/core/dataset/rdf.py +2 -3
- udata/features/notifications/__init__.py +0 -1
- udata/harvest/api.py +1 -1
- udata/harvest/backends/base.py +3 -4
- udata/harvest/backends/dcat.py +0 -1
- udata/rdf.py +0 -1
- udata/static/chunks/{11.7266fef2dddc1db403d9.js → 11.ae54612e36c6d46f85db.js} +3 -3
- udata/static/chunks/{11.7266fef2dddc1db403d9.js.map → 11.ae54612e36c6d46f85db.js.map} +1 -1
- udata/static/chunks/{13.91b177d7d531fd55cf5d.js → 13.d8ccb992a49875966313.js} +2 -2
- udata/static/chunks/{13.91b177d7d531fd55cf5d.js.map → 13.d8ccb992a49875966313.js.map} +1 -1
- udata/static/chunks/{16.e866757bab9f6b0a3f1b.js → 16.4565605e68bab129a471.js} +2 -2
- udata/static/chunks/{16.e866757bab9f6b0a3f1b.js.map → 16.4565605e68bab129a471.js.map} +1 -1
- udata/static/chunks/{19.619b83ac597516dcd03e.js → 19.f993a75d5bfe2382548d.js} +3 -3
- udata/static/chunks/{19.619b83ac597516dcd03e.js.map → 19.f993a75d5bfe2382548d.js.map} +1 -1
- udata/static/chunks/{5.48417db6b33328fa9d6a.js → 5.cc2e7bf65ef32f9c8604.js} +3 -3
- udata/static/chunks/{5.48417db6b33328fa9d6a.js.map → 5.cc2e7bf65ef32f9c8604.js.map} +1 -1
- udata/static/chunks/{6.f84539bd4c419b36cc19.js → 6.cad898a38692eda28965.js} +3 -3
- udata/static/chunks/{6.f84539bd4c419b36cc19.js.map → 6.cad898a38692eda28965.js.map} +1 -1
- udata/static/chunks/{9.07503e7f7ec02919f696.js → 9.d5b992e9ef51921aeb57.js} +2 -2
- udata/static/chunks/{9.07503e7f7ec02919f696.js.map → 9.d5b992e9ef51921aeb57.js.map} +1 -1
- udata/static/common.js +1 -1
- udata/static/common.js.map +1 -1
- udata/storage/s3.py +3 -3
- udata/tests/api/test_dataservices_api.py +0 -1
- udata/tests/frontend/test_auth.py +1 -4
- udata/tests/organization/test_csv_adapter.py +0 -1
- udata/tests/site/test_site_api.py +0 -1
- udata/tests/test_utils.py +1 -1
- {udata-9.0.1.dev29853.dist-info → udata-9.0.1.dev29871.dist-info}/METADATA +1 -1
- {udata-9.0.1.dev29853.dist-info → udata-9.0.1.dev29871.dist-info}/RECORD +37 -37
- {udata-9.0.1.dev29853.dist-info → udata-9.0.1.dev29871.dist-info}/LICENSE +0 -0
- {udata-9.0.1.dev29853.dist-info → udata-9.0.1.dev29871.dist-info}/WHEEL +0 -0
- {udata-9.0.1.dev29853.dist-info → udata-9.0.1.dev29871.dist-info}/entry_points.txt +0 -0
- {udata-9.0.1.dev29853.dist-info → udata-9.0.1.dev29871.dist-info}/top_level.txt +0 -0
udata/api/commands.py
CHANGED
udata/core/dataservices/rdf.py
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
from datetime import datetime
|
|
3
|
-
from typing import List, Optional
|
|
4
2
|
from rdflib import RDF, BNode, Graph, Literal, URIRef
|
|
5
3
|
|
|
6
4
|
from udata.core.dataservices.models import Dataservice, HarvestMetadata as HarvestDataserviceMetadata
|
|
7
5
|
from udata.core.dataset.models import Dataset, License
|
|
8
6
|
from udata.core.dataset.rdf import dataset_to_graph_id, sanitize_html
|
|
9
|
-
from udata.
|
|
10
|
-
from udata.rdf import DCATAP, TAG_TO_EU_HVD_CATEGORIES, namespace_manager, DCAT, DCT, contact_point_from_rdf, rdf_value, remote_url_from_rdf, themes_from_rdf, url_from_rdf
|
|
7
|
+
from udata.rdf import namespace_manager, DCAT, DCT, contact_point_from_rdf, rdf_value, remote_url_from_rdf, themes_from_rdf, url_from_rdf
|
|
11
8
|
from udata.uris import endpoint_for
|
|
12
9
|
|
|
13
|
-
def dataservice_from_rdf(graph: Graph, dataservice: Dataservice, node, all_datasets:
|
|
10
|
+
def dataservice_from_rdf(graph: Graph, dataservice: Dataservice, node, all_datasets: list[Dataset]) -> Dataservice :
|
|
14
11
|
'''
|
|
15
12
|
Create or update a dataset from a RDF/DCAT graph
|
|
16
13
|
'''
|
udata/core/dataset/models.py
CHANGED
|
@@ -13,7 +13,6 @@ from pydoc import locate
|
|
|
13
13
|
from stringdist import rdlevenshtein
|
|
14
14
|
from werkzeug.utils import cached_property
|
|
15
15
|
import requests
|
|
16
|
-
from typing import Optional, Tuple
|
|
17
16
|
|
|
18
17
|
from udata.app import cache
|
|
19
18
|
from udata.core import storages
|
|
@@ -964,7 +963,7 @@ class ResourceSchema(object):
|
|
|
964
963
|
def assignable_schemas():
|
|
965
964
|
return [s for s in ResourceSchema.all() if s.get('schema_type') not in NON_ASSIGNABLE_SCHEMA_TYPES]
|
|
966
965
|
|
|
967
|
-
def get_existing_schema_info_by_url(url: str) ->
|
|
966
|
+
def get_existing_schema_info_by_url(url: str) -> tuple[str, str | None] | None:
|
|
968
967
|
'''
|
|
969
968
|
Returns the name and the version if exists
|
|
970
969
|
'''
|
udata/core/dataset/rdf.py
CHANGED
|
@@ -6,7 +6,6 @@ import json
|
|
|
6
6
|
import logging
|
|
7
7
|
|
|
8
8
|
from datetime import date
|
|
9
|
-
from typing import Optional, Union
|
|
10
9
|
from dateutil.parser import parse as parse_dt
|
|
11
10
|
from flask import current_app
|
|
12
11
|
from geomet import wkt
|
|
@@ -149,7 +148,7 @@ def resource_to_rdf(resource, dataset=None, graph=None, is_hvd=False):
|
|
|
149
148
|
return r
|
|
150
149
|
|
|
151
150
|
|
|
152
|
-
def dataset_to_graph_id(dataset: Dataset) ->
|
|
151
|
+
def dataset_to_graph_id(dataset: Dataset) -> URIRef | BNode:
|
|
153
152
|
if dataset.harvest and dataset.harvest.uri:
|
|
154
153
|
return URIRef(dataset.harvest.uri)
|
|
155
154
|
elif dataset.id:
|
|
@@ -585,7 +584,7 @@ def dataset_from_rdf(graph: Graph, dataset=None, node=None):
|
|
|
585
584
|
|
|
586
585
|
return dataset
|
|
587
586
|
|
|
588
|
-
def bbox_to_geojson_multipolygon(bbox_as_str: str) ->
|
|
587
|
+
def bbox_to_geojson_multipolygon(bbox_as_str: str) -> dict | None:
|
|
589
588
|
bbox = bbox_as_str.strip().split(',')
|
|
590
589
|
if len(bbox) != 4:
|
|
591
590
|
return None
|
udata/harvest/api.py
CHANGED
udata/harvest/backends/base.py
CHANGED
|
@@ -2,7 +2,6 @@ import logging
|
|
|
2
2
|
import traceback
|
|
3
3
|
|
|
4
4
|
from datetime import datetime, date, timedelta
|
|
5
|
-
from typing import List, Optional
|
|
6
5
|
from uuid import UUID
|
|
7
6
|
|
|
8
7
|
import requests
|
|
@@ -284,7 +283,7 @@ class BaseBackend(object):
|
|
|
284
283
|
item.ended = datetime.utcnow()
|
|
285
284
|
self.save_job()
|
|
286
285
|
|
|
287
|
-
def update_dataset_harvest_info(self, harvest:
|
|
286
|
+
def update_dataset_harvest_info(self, harvest: HarvestDatasetMetadata | None, remote_id: int):
|
|
288
287
|
if not harvest:
|
|
289
288
|
harvest = HarvestDatasetMetadata()
|
|
290
289
|
|
|
@@ -300,7 +299,7 @@ class BaseBackend(object):
|
|
|
300
299
|
|
|
301
300
|
return harvest
|
|
302
301
|
|
|
303
|
-
def update_dataservice_harvest_info(self, harvest:
|
|
302
|
+
def update_dataservice_harvest_info(self, harvest: HarvestDataserviceMetadata | None, remote_id: int):
|
|
304
303
|
if not harvest:
|
|
305
304
|
harvest = HarvestDataserviceMetadata()
|
|
306
305
|
|
|
@@ -444,7 +443,7 @@ class BaseBackend(object):
|
|
|
444
443
|
|
|
445
444
|
|
|
446
445
|
class LogCatcher(logging.Handler):
|
|
447
|
-
records:
|
|
446
|
+
records: list[logging.LogRecord]
|
|
448
447
|
|
|
449
448
|
def __init__(self):
|
|
450
449
|
self.records = []
|
udata/harvest/backends/dcat.py
CHANGED