udata 8.0.1.dev28979__py2.py3-none-any.whl → 8.0.1.dev28986__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/dataset/rdf.py +21 -1
- udata/harvest/tests/dcat/catalog.xml +1 -0
- udata/harvest/tests/test_dcat_backend.py +3 -0
- udata/settings.py +4 -1
- {udata-8.0.1.dev28979.dist-info → udata-8.0.1.dev28986.dist-info}/METADATA +2 -1
- {udata-8.0.1.dev28979.dist-info → udata-8.0.1.dev28986.dist-info}/RECORD +10 -10
- {udata-8.0.1.dev28979.dist-info → udata-8.0.1.dev28986.dist-info}/LICENSE +0 -0
- {udata-8.0.1.dev28979.dist-info → udata-8.0.1.dev28986.dist-info}/WHEEL +0 -0
- {udata-8.0.1.dev28979.dist-info → udata-8.0.1.dev28986.dist-info}/entry_points.txt +0 -0
- {udata-8.0.1.dev28979.dist-info → udata-8.0.1.dev28986.dist-info}/top_level.txt +0 -0
udata/core/dataset/rdf.py
CHANGED
|
@@ -76,6 +76,16 @@ EU_RDF_REQUENCIES = {
|
|
|
76
76
|
EUFREQ.NEVER: 'punctual',
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
# Map High Value Datasets URIs to keyword categories
|
|
80
|
+
EU_HVD_CATEGORIES = {
|
|
81
|
+
"http://data.europa.eu/bna/c_164e0bf5": "Météorologiques",
|
|
82
|
+
"http://data.europa.eu/bna/c_a9135398": "Entreprises et propriété d'entreprises",
|
|
83
|
+
"http://data.europa.eu/bna/c_ac64a52d": "Géospatiales",
|
|
84
|
+
"http://data.europa.eu/bna/c_b79e35eb": "Mobilité",
|
|
85
|
+
"http://data.europa.eu/bna/c_dd313021": "Observation de la terre et environnement",
|
|
86
|
+
"http://data.europa.eu/bna/c_e1da4e07": "Statistiques"
|
|
87
|
+
}
|
|
88
|
+
|
|
79
89
|
|
|
80
90
|
class HTMLDetector(HTMLParser):
|
|
81
91
|
def __init__(self, *args, **kwargs):
|
|
@@ -469,9 +479,19 @@ def remote_url_from_rdf(rdf):
|
|
|
469
479
|
|
|
470
480
|
|
|
471
481
|
def theme_labels_from_rdf(rdf):
|
|
482
|
+
'''
|
|
483
|
+
Get theme labels to use as keywords.
|
|
484
|
+
Map HVD keywords from known URIs resources if HVD support is activated.
|
|
485
|
+
'''
|
|
472
486
|
for theme in rdf.objects(DCAT.theme):
|
|
473
487
|
if isinstance(theme, RdfResource):
|
|
474
|
-
|
|
488
|
+
uri = theme.identifier.toPython()
|
|
489
|
+
if current_app.config['HVD_SUPPORT'] and uri in EU_HVD_CATEGORIES:
|
|
490
|
+
label = EU_HVD_CATEGORIES[uri]
|
|
491
|
+
# Additionnally yield hvd keyword
|
|
492
|
+
yield 'hvd'
|
|
493
|
+
else:
|
|
494
|
+
label = rdf_value(theme, SKOS.prefLabel)
|
|
475
495
|
else:
|
|
476
496
|
label = theme.toPython()
|
|
477
497
|
if label:
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
<dcterms:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2016-12-14T18:59:02.737480</dcterms:issued>
|
|
24
24
|
<dcterms:description>Dataset 3 description</dcterms:description>
|
|
25
25
|
<dcat:keyword>Tag 1</dcat:keyword>
|
|
26
|
+
<dcat:theme rdf:resource="http://data.europa.eu/bna/c_dd313021"/>
|
|
26
27
|
<dcat:distribution rdf:resource="datasets/3/resources/1"/>
|
|
27
28
|
<dct:license>Licence Ouverte Version 2.0</dct:license>
|
|
28
29
|
<dct:accessRights rdf:resource="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1e"/>
|
|
@@ -440,6 +440,9 @@ class DcatBackendTest:
|
|
|
440
440
|
assert dataset.extras["harvest"]["dct:accessRights"] == "http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1e"
|
|
441
441
|
assert dataset.extras["harvest"]["dct:provenance"] == ["Description de la provenance des données"]
|
|
442
442
|
|
|
443
|
+
assert 'observation-de-la-terre-et-environnement' in dataset.tags
|
|
444
|
+
assert 'hvd' in dataset.tags
|
|
445
|
+
|
|
443
446
|
dataset = Dataset.objects.get(harvest__dct_identifier='1')
|
|
444
447
|
# test html abstract description support
|
|
445
448
|
assert dataset.description == '# h1 title\n\n## h2 title\n\n **and bold text**'
|
udata/settings.py
CHANGED
|
@@ -269,7 +269,10 @@ class Defaults(object):
|
|
|
269
269
|
# S3 connection details
|
|
270
270
|
S3_URL = None
|
|
271
271
|
S3_ACCESS_KEY_ID = None
|
|
272
|
-
S3_SECRET_ACCESS_KEY = None
|
|
272
|
+
S3_SECRET_ACCESS_KEY = None
|
|
273
|
+
|
|
274
|
+
# Specific support for hvd (map HVD categories URIs to keywords)
|
|
275
|
+
HVD_SUPPORT = True
|
|
273
276
|
|
|
274
277
|
ACTIVATE_TERRITORIES = False
|
|
275
278
|
# The order is important to compute parents/children, smaller first.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: udata
|
|
3
|
-
Version: 8.0.1.
|
|
3
|
+
Version: 8.0.1.dev28986
|
|
4
4
|
Summary: Open data portal
|
|
5
5
|
Home-page: https://github.com/opendatateam/udata
|
|
6
6
|
Author: Opendata Team
|
|
@@ -140,6 +140,7 @@ It is collectively taken care of by members of the
|
|
|
140
140
|
- Add dataservices in beta [#2986](https://github.com/opendatateam/udata/pull/2986)
|
|
141
141
|
- Remove deprecated `metrics_for` route [#3022](https://github.com/opendatateam/udata/pull/3022)
|
|
142
142
|
- Fix spatial coverage fetching perfs. Need to schedule `compute-geozones-metrics` [#3018](https://github.com/opendatateam/udata/pull/3018)
|
|
143
|
+
- Convert known HVD categories used as theme to keywords [#3014](https://github.com/opendatateam/udata/pull/3014)
|
|
143
144
|
- Allow for series in CSW ISO 19139 DCAT backend [#3028](https://github.com/opendatateam/udata/pull/3028)
|
|
144
145
|
|
|
145
146
|
## 8.0.0 (2024-04-23)
|
|
@@ -12,7 +12,7 @@ udata/mail.py,sha256=dAMcbEtk5e54alpQezvF5adDrRPgdaT36QEdHD_5v50,2145
|
|
|
12
12
|
udata/rdf.py,sha256=QiHcK2iklbtPkl6UFdBxTj0oaiY41en9k-kmbIVJ8Xw,9893
|
|
13
13
|
udata/routing.py,sha256=Qhpf5p97fs1SoJXtDctc1FPk0MeOKLn_C0Z1dP4ZNJA,7234
|
|
14
14
|
udata/sentry.py,sha256=KiZz0PpmYpZMvykH9UAbHpF4xBY0Q-8DeiEbXEHDUdw,2683
|
|
15
|
-
udata/settings.py,sha256=
|
|
15
|
+
udata/settings.py,sha256=hoyo2YffL6eEKn90tjtraTMmEMRKfFxiIaDyMv69HMo,17390
|
|
16
16
|
udata/sitemap.py,sha256=pjtR2lU3gRHvK8l1Lw8B9wrqMMTYC5adUfFh0pUp_Q4,977
|
|
17
17
|
udata/tags.py,sha256=8MvgyjfUz8O71tCV0V1fQV4_0C2P-SLFrm2IA2QfNDs,595
|
|
18
18
|
udata/tasks.py,sha256=Dyjoxp6_IuPZSnKi6KmaFrFvnyCM5EF5g_W-jG0qYIo,4930
|
|
@@ -97,7 +97,7 @@ udata/core/dataset/forms.py,sha256=VJCsGtgzhQgLW-M-J4ObpQ8o6c_saC3TTc1Js33m3sQ,6
|
|
|
97
97
|
udata/core/dataset/models.py,sha256=Z9Sqf-Aly67BB5ESwz3H4qxJvG3zy03Goz6enL55HyE,36022
|
|
98
98
|
udata/core/dataset/permissions.py,sha256=3F2J7le3_rEYNhh88o3hSRWHAAt01_yHJM6RPmvCrRo,1090
|
|
99
99
|
udata/core/dataset/preview.py,sha256=puPKT3fBD7ezAcT6owh0JK1_rGNDFZOqgT223qGn3LY,2597
|
|
100
|
-
udata/core/dataset/rdf.py,sha256=
|
|
100
|
+
udata/core/dataset/rdf.py,sha256=y4XBB8nlm_xmqwWGrtiRJj3UZT8DtzCREw4jchOaGsg,23731
|
|
101
101
|
udata/core/dataset/search.py,sha256=Ca23ljX7TZiKZKiAZQIH5xwS2tjXQcTDzieAJd-E22c,5314
|
|
102
102
|
udata/core/dataset/signals.py,sha256=TK6dfrOUitZZkGGOh6XmhYqYvIjzZpI70JTLV4k-JRM,161
|
|
103
103
|
udata/core/dataset/tasks.py,sha256=UYdm_O9hA0yo7cCNQFvZE9pGzUshkc3Wr4Gpel2aupU,8434
|
|
@@ -283,7 +283,7 @@ udata/harvest/tests/factories.py,sha256=CbQORC1OJ1_Agtv_3LjCXysNumjMYlROwZPSEAHo
|
|
|
283
283
|
udata/harvest/tests/test_actions.py,sha256=7xSpouCAcf5p_bd38zHCyPN7sKWUUZXA7IlpI-yNVrQ,27603
|
|
284
284
|
udata/harvest/tests/test_api.py,sha256=QXhseHfnkBEmMbIJzroMdDYGLDj6Njal1s-2sn0xhEM,14888
|
|
285
285
|
udata/harvest/tests/test_base_backend.py,sha256=JA8Df1Eu-lEPLZfxyK81bsmT6exOjV_3PtKHJekAp5g,12092
|
|
286
|
-
udata/harvest/tests/test_dcat_backend.py,sha256=
|
|
286
|
+
udata/harvest/tests/test_dcat_backend.py,sha256=9Ghhe9faOJipLdz5mEUlZP7ZpCgJk0zTN2VREqZTzAA,32574
|
|
287
287
|
udata/harvest/tests/test_filters.py,sha256=V2HFZlexIJa6r1DX6g2ktvIgjg4gSY11QPfPOd3_Oug,2370
|
|
288
288
|
udata/harvest/tests/test_models.py,sha256=p2VazyrPXSArBuf8Kf19TGPcQ86SnOGCGmvjcMOw0s0,924
|
|
289
289
|
udata/harvest/tests/test_notifications.py,sha256=ZwtwioittW3XcZc0x6zbHjs1dVaAxPytlVymnJa5w0E,817
|
|
@@ -297,7 +297,7 @@ udata/harvest/tests/csw_dcat/geonetworkv4-page-3.xml,sha256=fsN0E4TVd_ts-sYA612y
|
|
|
297
297
|
udata/harvest/tests/csw_dcat/geonetworkv4-page-5.xml,sha256=0VmPp1kspik7YAmOFyr-3yJLzWGA6kuQp_x_w-W385o,21213
|
|
298
298
|
udata/harvest/tests/dcat/bnodes.jsonld,sha256=Leqny-ccp30564yojQYYckw_HKbhR0f5qUCaavc2ruE,7964
|
|
299
299
|
udata/harvest/tests/dcat/bnodes.xml,sha256=xuOcd9uEDRlvn9HOVqEPz-Pe3g4DCygTIChZZiA4jac,9470
|
|
300
|
-
udata/harvest/tests/dcat/catalog.xml,sha256=
|
|
300
|
+
udata/harvest/tests/dcat/catalog.xml,sha256=W7CIXfylswAFpKlTYo2sZjFvk8Y588Nf4zbs1xBQCbc,9313
|
|
301
301
|
udata/harvest/tests/dcat/evian.json,sha256=EeJT9NKrV4hfGfnkJVZG4gJaSLtzjNUBKu9rFO1KgHk,16646
|
|
302
302
|
udata/harvest/tests/dcat/flat.jsonld,sha256=BAw08MDhtW9Px3q6RAoTIqO_OwJmAwBS9EpC8BY_x98,8459
|
|
303
303
|
udata/harvest/tests/dcat/geonetwork.xml,sha256=9_pksE74Zzkbgs9okj6hEbo8CJS0FZjEnIdvopKfm7k,7928
|
|
@@ -681,9 +681,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=uttB2K8VsqzkEQG-5HfTtFms_3LtV9
|
|
|
681
681
|
udata/translations/pt/LC_MESSAGES/udata.po,sha256=8Ql1Lp7Z9KLnvp-qRxw-NhFu1p35Xj-q6Jg9JHsYhcw,43733
|
|
682
682
|
udata/translations/sr/LC_MESSAGES/udata.mo,sha256=US8beNIMPxP5h-zD_jfP1TheDDd4DdRVS5UIiY5XVZ8,28553
|
|
683
683
|
udata/translations/sr/LC_MESSAGES/udata.po,sha256=TM0yMDvKRljyOzgZZMlTX6OfpF6OC4Ngf_9Zc8n6ayA,50313
|
|
684
|
-
udata-8.0.1.
|
|
685
|
-
udata-8.0.1.
|
|
686
|
-
udata-8.0.1.
|
|
687
|
-
udata-8.0.1.
|
|
688
|
-
udata-8.0.1.
|
|
689
|
-
udata-8.0.1.
|
|
684
|
+
udata-8.0.1.dev28986.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
685
|
+
udata-8.0.1.dev28986.dist-info/METADATA,sha256=D9Ntnf3UP9wGHm8xaoPl-VQT87nvchm0NErxx3EAyBY,122601
|
|
686
|
+
udata-8.0.1.dev28986.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
687
|
+
udata-8.0.1.dev28986.dist-info/entry_points.txt,sha256=3SKiqVy4HUqxf6iWspgMqH8d88Htk6KoLbG1BU-UddQ,451
|
|
688
|
+
udata-8.0.1.dev28986.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
|
|
689
|
+
udata-8.0.1.dev28986.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|