udata 9.0.1.dev29780__py2.py3-none-any.whl → 9.0.1.dev29790__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/core/dataservices/factories.py +15 -1
- udata/core/dataservices/rdf.py +5 -5
- udata/tests/site/test_site_rdf.py +2 -2
- {udata-9.0.1.dev29780.dist-info → udata-9.0.1.dev29790.dist-info}/METADATA +2 -2
- {udata-9.0.1.dev29780.dist-info → udata-9.0.1.dev29790.dist-info}/RECORD +9 -9
- {udata-9.0.1.dev29780.dist-info → udata-9.0.1.dev29790.dist-info}/LICENSE +0 -0
- {udata-9.0.1.dev29780.dist-info → udata-9.0.1.dev29790.dist-info}/WHEEL +0 -0
- {udata-9.0.1.dev29780.dist-info → udata-9.0.1.dev29790.dist-info}/entry_points.txt +0 -0
- {udata-9.0.1.dev29780.dist-info → udata-9.0.1.dev29790.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import factory
|
|
2
2
|
|
|
3
|
-
from udata.core.dataservices.models import Dataservice
|
|
3
|
+
from udata.core.dataservices.models import Dataservice, HarvestMetadata
|
|
4
4
|
from udata.core.organization.factories import OrganizationFactory
|
|
5
5
|
from udata.factories import ModelFactory
|
|
6
6
|
|
|
7
|
+
class HarvestMetadataFactory(ModelFactory):
|
|
8
|
+
class Meta:
|
|
9
|
+
model = HarvestMetadata
|
|
10
|
+
|
|
11
|
+
backend = 'csw-dcat'
|
|
12
|
+
domain = 'data.gouv.fr'
|
|
13
|
+
|
|
14
|
+
source_id = factory.Faker('unique_string')
|
|
15
|
+
source_url = factory.Faker('url')
|
|
16
|
+
|
|
17
|
+
remote_id = factory.Faker('unique_string')
|
|
18
|
+
remote_url = factory.Faker('url')
|
|
19
|
+
|
|
20
|
+
uri = factory.Faker('url')
|
|
7
21
|
|
|
8
22
|
class DataserviceFactory(ModelFactory):
|
|
9
23
|
class Meta:
|
udata/core/dataservices/rdf.py
CHANGED
|
@@ -59,14 +59,14 @@ def dataservice_from_rdf(graph: Graph, dataservice: Dataservice, node, all_datas
|
|
|
59
59
|
return dataservice
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
def dataservice_to_rdf(dataservice, graph=None):
|
|
62
|
+
def dataservice_to_rdf(dataservice: Dataservice, graph=None):
|
|
63
63
|
'''
|
|
64
64
|
Map a dataservice domain model to a DCAT/RDF graph
|
|
65
65
|
'''
|
|
66
66
|
# Use the unlocalized permalink to the dataset as URI when available
|
|
67
67
|
# unless there is already an upstream URI
|
|
68
|
-
if dataservice.harvest and dataservice.harvest.
|
|
69
|
-
id = URIRef(dataservice.harvest.
|
|
68
|
+
if dataservice.harvest and dataservice.harvest.uri:
|
|
69
|
+
id = URIRef(dataservice.harvest.uri)
|
|
70
70
|
elif dataservice.id:
|
|
71
71
|
id = URIRef(endpoint_for('dataservices.show_redirect', 'api.dataservice',
|
|
72
72
|
dataservice=dataservice.id, _external=True))
|
|
@@ -76,8 +76,8 @@ def dataservice_to_rdf(dataservice, graph=None):
|
|
|
76
76
|
id = BNode()
|
|
77
77
|
|
|
78
78
|
# Expose upstream identifier if present
|
|
79
|
-
if dataservice.harvest
|
|
80
|
-
identifier = dataservice.harvest.
|
|
79
|
+
if dataservice.harvest:
|
|
80
|
+
identifier = dataservice.harvest.remote_id
|
|
81
81
|
else:
|
|
82
82
|
identifier = dataservice.id
|
|
83
83
|
graph = graph or Graph(namespace_manager=namespace_manager)
|
|
@@ -6,7 +6,7 @@ from rdflib import URIRef, Literal, Graph
|
|
|
6
6
|
from rdflib.namespace import RDF, FOAF
|
|
7
7
|
from rdflib.resource import Resource
|
|
8
8
|
|
|
9
|
-
from udata.core.dataservices.factories import DataserviceFactory
|
|
9
|
+
from udata.core.dataservices.factories import DataserviceFactory, HarvestMetadataFactory
|
|
10
10
|
from udata.core.dataset.factories import DatasetFactory
|
|
11
11
|
from udata.core.dataset.models import Dataset
|
|
12
12
|
from udata.core.organization.factories import OrganizationFactory
|
|
@@ -251,7 +251,7 @@ class SiteRdfViewsTest:
|
|
|
251
251
|
dataset_b = DatasetFactory.create()
|
|
252
252
|
dataset_c = DatasetFactory.create()
|
|
253
253
|
|
|
254
|
-
dataservice_a = DataserviceFactory.create(datasets=[dataset_a.id])
|
|
254
|
+
dataservice_a = DataserviceFactory.create(datasets=[dataset_a.id], harvest=HarvestMetadataFactory())
|
|
255
255
|
dataservice_b = DataserviceFactory.create(datasets=[dataset_b.id])
|
|
256
256
|
dataservice_x = DataserviceFactory.create(datasets=[dataset_a.id, dataset_c.id])
|
|
257
257
|
dataservice_y = DataserviceFactory.create(datasets=[])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: udata
|
|
3
|
-
Version: 9.0.1.
|
|
3
|
+
Version: 9.0.1.dev29790
|
|
4
4
|
Summary: Open data portal
|
|
5
5
|
Home-page: https://github.com/opendatateam/udata
|
|
6
6
|
Author: Opendata Team
|
|
@@ -150,7 +150,7 @@ It is collectively taken care of by members of the
|
|
|
150
150
|
- Update markdown base settings [#3067](https://github.com/opendatateam/udata/pull/3067)
|
|
151
151
|
- Prevent tagging as spam owners' messages [#3071](https://github.com/opendatateam/udata/pull/3071)[#3076](https://github.com/opendatateam/udata/pull/3076)
|
|
152
152
|
- Add api endpoint /me/org_topics/ [#3070](https://github.com/opendatateam/udata/pull/3070)
|
|
153
|
-
- Expose dataservices in RDF catalog [#3058](https://github.com/opendatateam/udata/pull/3058)
|
|
153
|
+
- Expose dataservices in RDF catalog [#3058](https://github.com/opendatateam/udata/pull/3058) [#3075](https://github.com/opendatateam/udata/pull/3075)
|
|
154
154
|
- CORS: always returns 204 on OPTIONS request [#3046](https://github.com/opendatateam/udata/pull/3046)
|
|
155
155
|
|
|
156
156
|
## 9.0.0 (2024-06-07)
|
|
@@ -80,10 +80,10 @@ udata/core/contact_point/forms.py,sha256=ggLhSJ1IRn5MclrhydckjAxwr4fFZxgAD4huSSu
|
|
|
80
80
|
udata/core/contact_point/models.py,sha256=NlNKureCpzgTLJuGviZPjNx-ABYRp4j2L-ur9Gmixao,324
|
|
81
81
|
udata/core/dataservices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
82
|
udata/core/dataservices/api.py,sha256=rjCU55NNGgCDRlurfhJUT2byBGJWN5coM8b7AApzEew,3090
|
|
83
|
-
udata/core/dataservices/factories.py,sha256=
|
|
83
|
+
udata/core/dataservices/factories.py,sha256=KVh7YxDpIfTcve3OgkAwJib0z4tyKFlTImOVnv9SzBk,873
|
|
84
84
|
udata/core/dataservices/models.py,sha256=zMhzjnXm1p5GHZU1lYgMqft5u7iFyX0BIvNB1hM4D6Q,5868
|
|
85
85
|
udata/core/dataservices/permissions.py,sha256=X9Bh8e0pnx6OgeEf6NowXZUiwyreUa6UY479B16cCqs,175
|
|
86
|
-
udata/core/dataservices/rdf.py,sha256=
|
|
86
|
+
udata/core/dataservices/rdf.py,sha256=M0mhwJ1WO_0iHP_F_fhA3GMPTUlYI4aZRQcvreNw7vM,4593
|
|
87
87
|
udata/core/dataservices/tasks.py,sha256=NOWcTPoLasMrrvq9EkwQMGlUbQQmi_l3s815K-mtZTM,971
|
|
88
88
|
udata/core/dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
89
|
udata/core/dataset/actions.py,sha256=3pzBg_qOR-w7fwPpTOKUHXWC9lkjALbOn1UQFmmT-s0,1199
|
|
@@ -673,7 +673,7 @@ udata/tests/site/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
673
673
|
udata/tests/site/test_site_api.py,sha256=XIjRH-iiwKdwmX145bQflxOatfIChi5RLikIMwJSbjQ,2276
|
|
674
674
|
udata/tests/site/test_site_metrics.py,sha256=Sn9dQORwe-fvoyA7ZAnF63Cq5CwUGq1myH8Xe0EtfDA,2263
|
|
675
675
|
udata/tests/site/test_site_model.py,sha256=nAx9JjEKdfjdw1Kj5Rs7P5FEePoATtCuOYPiSXEnVD0,1313
|
|
676
|
-
udata/tests/site/test_site_rdf.py,sha256=
|
|
676
|
+
udata/tests/site/test_site_rdf.py,sha256=2d_MVXXb2fCg9mdlV6RlFU-g-xL3y0o5Ldp0IX5YYRk,12753
|
|
677
677
|
udata/tests/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
678
678
|
udata/tests/user/test_user_rdf.py,sha256=HrKirMURUXS9N3If_NMb8qnfJ4kE9IZymR1SPcNvlF0,1851
|
|
679
679
|
udata/tests/workers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -696,9 +696,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=Unzt8KXSviSWugimc9ficxraqJDz-h
|
|
|
696
696
|
udata/translations/pt/LC_MESSAGES/udata.po,sha256=O5E1eImTcE3v3m5Ub0UM9lKwK7bFGQ8_NLr1tZ4wjvs,44979
|
|
697
697
|
udata/translations/sr/LC_MESSAGES/udata.mo,sha256=S2A9-Kq5YBc9klsEimF4JRm7ePxhcaM4_zeVEx3Em98,28500
|
|
698
698
|
udata/translations/sr/LC_MESSAGES/udata.po,sha256=a1c8DmzuWc-b-3kgXZl9n9aIODfttOYCN1F0pE6tPlA,51548
|
|
699
|
-
udata-9.0.1.
|
|
700
|
-
udata-9.0.1.
|
|
701
|
-
udata-9.0.1.
|
|
702
|
-
udata-9.0.1.
|
|
703
|
-
udata-9.0.1.
|
|
704
|
-
udata-9.0.1.
|
|
699
|
+
udata-9.0.1.dev29790.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
700
|
+
udata-9.0.1.dev29790.dist-info/METADATA,sha256=7gvo89de7GLNG7N_A3oaMJXuQUxSPnDfuNasT6hl3W8,125639
|
|
701
|
+
udata-9.0.1.dev29790.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
702
|
+
udata-9.0.1.dev29790.dist-info/entry_points.txt,sha256=3SKiqVy4HUqxf6iWspgMqH8d88Htk6KoLbG1BU-UddQ,451
|
|
703
|
+
udata-9.0.1.dev29790.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
|
|
704
|
+
udata-9.0.1.dev29790.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|