udata 10.8.2.dev37076__py2.py3-none-any.whl → 10.8.3__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.

Files changed (59) hide show
  1. udata/__init__.py +1 -1
  2. udata/core/activity/models.py +23 -1
  3. udata/core/dataset/api_fields.py +2 -0
  4. udata/core/dataset/apiv2.py +4 -0
  5. udata/core/dataset/constants.py +1 -0
  6. udata/core/dataset/csv.py +1 -0
  7. udata/core/dataset/forms.py +6 -0
  8. udata/core/dataset/metrics.py +34 -0
  9. udata/core/dataset/models.py +10 -0
  10. udata/core/dataset/tasks.py +0 -11
  11. udata/core/metrics/__init__.py +1 -0
  12. udata/core/metrics/commands.py +3 -0
  13. udata/core/organization/csv.py +9 -26
  14. udata/core/organization/metrics.py +2 -0
  15. udata/core/organization/models.py +14 -9
  16. udata/core/user/metrics.py +2 -0
  17. udata/harvest/backends/dcat.py +161 -165
  18. udata/harvest/tests/dcat/catalog.xml +1 -0
  19. udata/harvest/tests/test_dcat_backend.py +19 -6
  20. udata/settings.py +1 -1
  21. udata/static/chunks/{13.2d06442dd9a05d9777b5.js → 13.d9c1735d14038b94c17e.js} +2 -2
  22. udata/static/chunks/{13.2d06442dd9a05d9777b5.js.map → 13.d9c1735d14038b94c17e.js.map} +1 -1
  23. udata/static/chunks/{17.e8e4caaad5cb0cc0bacc.js → 17.81c57c0dedf812e43013.js} +2 -2
  24. udata/static/chunks/{17.e8e4caaad5cb0cc0bacc.js.map → 17.81c57c0dedf812e43013.js.map} +1 -1
  25. udata/static/chunks/{19.f03a102365af4315f9db.js → 19.8d03c06efcac6884bebe.js} +3 -3
  26. udata/static/chunks/{19.f03a102365af4315f9db.js.map → 19.8d03c06efcac6884bebe.js.map} +1 -1
  27. udata/static/chunks/{5.0fa1408dae4e76b87b2e.js → 5.343ca020a2d38cec1a14.js} +3 -3
  28. udata/static/chunks/{5.0fa1408dae4e76b87b2e.js.map → 5.343ca020a2d38cec1a14.js.map} +1 -1
  29. udata/static/chunks/{6.d663709d877baa44a71e.js → 6.a3b07de9dd2ca2d24e85.js} +3 -3
  30. udata/static/chunks/{6.d663709d877baa44a71e.js.map → 6.a3b07de9dd2ca2d24e85.js.map} +1 -1
  31. udata/static/chunks/{8.778091d55cd8ea39af6b.js → 8.b966402f5d680d4bdf4a.js} +2 -2
  32. udata/static/chunks/{8.778091d55cd8ea39af6b.js.map → 8.b966402f5d680d4bdf4a.js.map} +1 -1
  33. udata/static/common.js +1 -1
  34. udata/static/common.js.map +1 -1
  35. udata/tests/dataset/test_dataset_model.py +63 -1
  36. udata/tests/organization/test_csv_adapter.py +3 -15
  37. udata/tests/reuse/test_reuse_model.py +6 -4
  38. udata/translations/ar/LC_MESSAGES/udata.mo +0 -0
  39. udata/translations/ar/LC_MESSAGES/udata.po +62 -54
  40. udata/translations/de/LC_MESSAGES/udata.mo +0 -0
  41. udata/translations/de/LC_MESSAGES/udata.po +62 -54
  42. udata/translations/es/LC_MESSAGES/udata.mo +0 -0
  43. udata/translations/es/LC_MESSAGES/udata.po +62 -54
  44. udata/translations/fr/LC_MESSAGES/udata.mo +0 -0
  45. udata/translations/fr/LC_MESSAGES/udata.po +62 -54
  46. udata/translations/it/LC_MESSAGES/udata.mo +0 -0
  47. udata/translations/it/LC_MESSAGES/udata.po +62 -54
  48. udata/translations/pt/LC_MESSAGES/udata.mo +0 -0
  49. udata/translations/pt/LC_MESSAGES/udata.po +62 -54
  50. udata/translations/sr/LC_MESSAGES/udata.mo +0 -0
  51. udata/translations/sr/LC_MESSAGES/udata.po +62 -54
  52. udata/translations/udata.pot +63 -56
  53. udata/utils.py +16 -0
  54. {udata-10.8.2.dev37076.dist-info → udata-10.8.3.dist-info}/METADATA +15 -3
  55. {udata-10.8.2.dev37076.dist-info → udata-10.8.3.dist-info}/RECORD +59 -58
  56. {udata-10.8.2.dev37076.dist-info → udata-10.8.3.dist-info}/LICENSE +0 -0
  57. {udata-10.8.2.dev37076.dist-info → udata-10.8.3.dist-info}/WHEEL +0 -0
  58. {udata-10.8.2.dev37076.dist-info → udata-10.8.3.dist-info}/entry_points.txt +0 -0
  59. {udata-10.8.2.dev37076.dist-info → udata-10.8.3.dist-info}/top_level.txt +0 -0
@@ -6,10 +6,10 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: udata 10.8.2.dev0\n"
9
+ "Project-Id-Version: udata 10.8.3.dev0\n"
10
10
  "Report-Msgid-Bugs-To: i18n@opendata.team\n"
11
- "POT-Creation-Date: 2025-07-28 16:59+0200\n"
12
- "PO-Revision-Date: 2025-07-28 16:59+0200\n"
11
+ "POT-Creation-Date: 2025-08-20 12:14+0200\n"
12
+ "PO-Revision-Date: 2025-08-20 12:14+0200\n"
13
13
  "Last-Translator: Open Data Team <i18n@opendata.team>\n"
14
14
  "Language: en\n"
15
15
  "Language-Team: Open Data Team <i18n@opendata.team>\n"
@@ -52,7 +52,7 @@ msgstr ""
52
52
  msgid "Invalid URL \"{url}\": {reason}"
53
53
  msgstr ""
54
54
 
55
- #: udata/tests/api/test_datasets_api.py:1129 udata/tests/test_model.py:403
55
+ #: udata/tests/api/test_datasets_api.py:1125 udata/tests/test_model.py:403
56
56
  #: udata/uris.py:57
57
57
  #, python-brace-format
58
58
  msgid "Invalid URL \"{url}\""
@@ -241,8 +241,8 @@ msgstr ""
241
241
  msgid "The organization web contact form"
242
242
  msgstr ""
243
243
 
244
- #: udata/core/contact_point/forms.py:20 udata/core/dataset/forms.py:116
245
- #: udata/core/dataset/forms.py:179 udata/core/discussions/forms.py:13
244
+ #: udata/core/contact_point/forms.py:20 udata/core/dataset/forms.py:117
245
+ #: udata/core/dataset/forms.py:185 udata/core/discussions/forms.py:13
246
246
  #: udata/core/discussions/forms.py:29 udata/core/topic/forms.py:14
247
247
  #: udata/harvest/forms.py:87
248
248
  msgid "Publish as"
@@ -292,12 +292,12 @@ msgstr ""
292
292
  msgid "dataservice"
293
293
  msgstr ""
294
294
 
295
- #: udata/core/dataservices/models.py:241 udata/core/dataset/models.py:589
295
+ #: udata/core/dataservices/models.py:241 udata/core/dataset/models.py:593
296
296
  #: udata/mongo/datetime_fields.py:60
297
297
  msgid "Creation date"
298
298
  msgstr ""
299
299
 
300
- #: udata/core/dataservices/models.py:247 udata/core/dataset/models.py:594
300
+ #: udata/core/dataservices/models.py:247 udata/core/dataset/models.py:598
301
301
  #: udata/mongo/datetime_fields.py:66
302
302
  msgid "Last modification date"
303
303
  msgstr ""
@@ -462,23 +462,23 @@ msgstr ""
462
462
  msgid "Remote file"
463
463
  msgstr ""
464
464
 
465
- #: udata/core/dataset/forms.py:33
465
+ #: udata/core/dataset/forms.py:34
466
466
  msgid "Checksum value"
467
467
  msgstr ""
468
468
 
469
- #: udata/core/dataset/forms.py:44
469
+ #: udata/core/dataset/forms.py:45
470
470
  msgid "URL of the schema"
471
471
  msgstr ""
472
472
 
473
- #: udata/core/dataset/forms.py:45
473
+ #: udata/core/dataset/forms.py:46
474
474
  msgid "Name of the schema"
475
475
  msgstr ""
476
476
 
477
- #: udata/core/dataset/forms.py:46
477
+ #: udata/core/dataset/forms.py:47
478
478
  msgid "Version of the schema"
479
479
  msgstr ""
480
480
 
481
- #: udata/core/dataset/forms.py:65 udata/core/dataset/forms.py:146
481
+ #: udata/core/dataset/forms.py:66 udata/core/dataset/forms.py:147
482
482
  #: udata/core/discussions/forms.py:14 udata/core/discussions/forms.py:25
483
483
  #: udata/core/site/forms.py:12 udata/templates/mail/discussion_closed.html:26
484
484
  #: udata/templates/mail/new_discussion.html:25
@@ -486,119 +486,127 @@ msgstr ""
486
486
  msgid "Title"
487
487
  msgstr ""
488
488
 
489
- #: udata/core/dataset/forms.py:68 udata/core/dataset/forms.py:150
489
+ #: udata/core/dataset/forms.py:69 udata/core/dataset/forms.py:151
490
490
  #: udata/core/jobs/forms.py:28 udata/core/organization/forms.py:50
491
491
  #: udata/core/topic/forms.py:17 udata/harvest/forms.py:80
492
492
  msgid "Description"
493
493
  msgstr ""
494
494
 
495
- #: udata/core/dataset/forms.py:71
495
+ #: udata/core/dataset/forms.py:72
496
496
  msgid "File type"
497
497
  msgstr ""
498
498
 
499
- #: udata/core/dataset/forms.py:75
499
+ #: udata/core/dataset/forms.py:76
500
500
  msgid "Whether the resource is an uploaded file, a remote file or an API"
501
501
  msgstr ""
502
502
 
503
- #: udata/core/dataset/forms.py:78
503
+ #: udata/core/dataset/forms.py:79
504
504
  msgid "Type"
505
505
  msgstr ""
506
506
 
507
- #: udata/core/dataset/forms.py:82
507
+ #: udata/core/dataset/forms.py:83
508
508
  msgid "Resource type (documentation, API...)"
509
509
  msgstr ""
510
510
 
511
- #: udata/core/dataset/forms.py:84 udata/harvest/forms.py:82
511
+ #: udata/core/dataset/forms.py:85 udata/harvest/forms.py:82
512
512
  msgid "URL"
513
513
  msgstr ""
514
514
 
515
- #: udata/core/dataset/forms.py:86
515
+ #: udata/core/dataset/forms.py:87
516
516
  msgid "Format"
517
517
  msgstr ""
518
518
 
519
- #: udata/core/dataset/forms.py:91
519
+ #: udata/core/dataset/forms.py:92
520
520
  msgid "Mime type"
521
521
  msgstr ""
522
522
 
523
- #: udata/core/dataset/forms.py:92
523
+ #: udata/core/dataset/forms.py:93
524
524
  msgid "The mime type associated to the extension. (ex: text/plain)"
525
525
  msgstr ""
526
526
 
527
- #: udata/core/dataset/forms.py:95
527
+ #: udata/core/dataset/forms.py:96
528
528
  msgid "Size"
529
529
  msgstr ""
530
530
 
531
- #: udata/core/dataset/forms.py:95
531
+ #: udata/core/dataset/forms.py:96
532
532
  msgid "The file size in bytes"
533
533
  msgstr ""
534
534
 
535
- #: udata/core/dataset/forms.py:114
535
+ #: udata/core/dataset/forms.py:115
536
536
  msgid "Related dataset"
537
537
  msgstr ""
538
538
 
539
- #: udata/core/dataset/forms.py:138 udata/tests/api/test_datasets_api.py:1041
539
+ #: udata/core/dataset/forms.py:139 udata/tests/api/test_datasets_api.py:1037
540
540
  msgid "Wrong contact point id or contact point ownership mismatch"
541
541
  msgstr ""
542
542
 
543
- #: udata/core/dataset/forms.py:148 udata/core/organization/forms.py:48
543
+ #: udata/core/dataset/forms.py:149 udata/core/organization/forms.py:48
544
544
  msgid "Acronym"
545
545
  msgstr ""
546
546
 
547
- #: udata/core/dataset/forms.py:148
547
+ #: udata/core/dataset/forms.py:149
548
548
  msgid "An optional acronym"
549
549
  msgstr ""
550
550
 
551
- #: udata/core/dataset/forms.py:152
551
+ #: udata/core/dataset/forms.py:153
552
552
  msgid "The details about the dataset (collection process, specifics...)."
553
553
  msgstr ""
554
554
 
555
- #: udata/core/dataset/forms.py:154
555
+ #: udata/core/dataset/forms.py:156
556
+ msgid "Short description"
557
+ msgstr ""
558
+
559
+ #: udata/core/dataset/forms.py:158
560
+ msgid "A short description of the dataset."
561
+ msgstr ""
562
+
563
+ #: udata/core/dataset/forms.py:160
556
564
  msgid "License"
557
565
  msgstr ""
558
566
 
559
- #: udata/core/dataset/forms.py:156
567
+ #: udata/core/dataset/forms.py:162
560
568
  msgid "Update frequency"
561
569
  msgstr ""
562
570
 
563
- #: udata/core/dataset/forms.py:161
571
+ #: udata/core/dataset/forms.py:167
564
572
  msgid "The frequency at which data are updated."
565
573
  msgstr ""
566
574
 
567
- #: udata/core/dataset/forms.py:163
575
+ #: udata/core/dataset/forms.py:169
568
576
  msgid "Expected frequency date"
569
577
  msgstr ""
570
578
 
571
- #: udata/core/dataset/forms.py:167
579
+ #: udata/core/dataset/forms.py:173
572
580
  msgid "Temporal coverage"
573
581
  msgstr ""
574
582
 
575
- #: udata/core/dataset/forms.py:167
583
+ #: udata/core/dataset/forms.py:173
576
584
  msgid "The period covered by the data"
577
585
  msgstr ""
578
586
 
579
- #: udata/core/dataset/forms.py:170 udata/core/spatial/forms.py:85
587
+ #: udata/core/dataset/forms.py:176 udata/core/spatial/forms.py:85
580
588
  #: udata/core/topic/forms.py:23
581
589
  msgid "Spatial coverage"
582
590
  msgstr ""
583
591
 
584
- #: udata/core/dataset/forms.py:170 udata/core/topic/forms.py:23
592
+ #: udata/core/dataset/forms.py:176 udata/core/topic/forms.py:23
585
593
  msgid "The geographical area covered by the data."
586
594
  msgstr ""
587
595
 
588
- #: udata/core/dataset/forms.py:172 udata/core/post/forms.py:26
596
+ #: udata/core/dataset/forms.py:178 udata/core/post/forms.py:26
589
597
  #: udata/core/site/forms.py:13 udata/core/topic/forms.py:26
590
598
  msgid "Tags"
591
599
  msgstr ""
592
600
 
593
- #: udata/core/dataset/forms.py:172
601
+ #: udata/core/dataset/forms.py:178
594
602
  msgid "Some taxonomy keywords"
595
603
  msgstr ""
596
604
 
597
- #: udata/core/dataset/forms.py:174 udata/core/topic/forms.py:27
605
+ #: udata/core/dataset/forms.py:180 udata/core/topic/forms.py:27
598
606
  msgid "Private"
599
607
  msgstr ""
600
608
 
601
- #: udata/core/dataset/forms.py:175
609
+ #: udata/core/dataset/forms.py:181
602
610
  msgid "Restrict the dataset visibility to you or your organization only."
603
611
  msgstr ""
604
612
 
@@ -606,38 +614,38 @@ msgstr ""
606
614
  msgid "Pivotal data"
607
615
  msgstr ""
608
616
 
609
- #: udata/core/dataset/models.py:139
617
+ #: udata/core/dataset/models.py:142
610
618
  msgid "A schema must contains a name or an URL when a version is provided."
611
619
  msgstr ""
612
620
 
613
- #: udata/core/dataset/models.py:171 udata/tests/api/test_datasets_api.py:1137
614
- #: udata/tests/api/test_datasets_api.py:1148
621
+ #: udata/core/dataset/models.py:174 udata/tests/api/test_datasets_api.py:1133
622
+ #: udata/tests/api/test_datasets_api.py:1144
615
623
  #, python-brace-format
616
624
  msgid "Schema name \"{schema}\" is not an allowed value. Allowed values: {values}"
617
625
  msgstr ""
618
626
 
619
- #: udata/core/dataset/models.py:190 udata/tests/api/test_datasets_api.py:1160
627
+ #: udata/core/dataset/models.py:193 udata/tests/api/test_datasets_api.py:1156
620
628
  #, python-brace-format
621
629
  msgid ""
622
630
  "Version \"{version}\" is not an allowed value for the schema \"{name}\". "
623
631
  "Allowed versions: {values}"
624
632
  msgstr ""
625
633
 
626
- #: udata/core/dataset/models.py:467 udata/core/dataset/rdf.py:567
634
+ #: udata/core/dataset/models.py:470 udata/core/dataset/rdf.py:567
627
635
  #: udata/tests/dataset/test_dataset_rdf.py:709
628
636
  #: udata/tests/dataset/test_dataset_rdf.py:722
629
637
  msgid "Nameless resource"
630
638
  msgstr ""
631
639
 
632
- #: udata/core/dataset/models.py:568
640
+ #: udata/core/dataset/models.py:572
633
641
  msgid "Future date of update"
634
642
  msgstr ""
635
643
 
636
- #: udata/core/dataset/models.py:600
644
+ #: udata/core/dataset/models.py:604
637
645
  msgid "Last update of the dataset resources"
638
646
  msgstr ""
639
647
 
640
- #: udata/core/dataset/models.py:653
648
+ #: udata/core/dataset/models.py:659
641
649
  msgid "dataset"
642
650
  msgstr ""
643
651
 
@@ -725,17 +733,17 @@ msgid "Refused"
725
733
  msgstr ""
726
734
 
727
735
  #: udata/core/organization/forms.py:25
728
- #: udata/tests/api/test_organizations_api.py:159
736
+ #: udata/tests/api/test_organizations_api.py:164
729
737
  msgid "A siret number is made of 14 digits"
730
738
  msgstr ""
731
739
 
732
740
  #: udata/core/organization/forms.py:36
733
- #: udata/tests/api/test_organizations_api.py:171
741
+ #: udata/tests/api/test_organizations_api.py:176
734
742
  msgid "A siret number is only made of digits"
735
743
  msgstr ""
736
744
 
737
745
  #: udata/core/organization/forms.py:39
738
- #: udata/tests/api/test_organizations_api.py:165
746
+ #: udata/tests/api/test_organizations_api.py:170
739
747
  msgid "Invalid Siret number"
740
748
  msgstr ""
741
749
 
@@ -945,7 +953,7 @@ msgstr ""
945
953
  msgid "Connected device"
946
954
  msgstr ""
947
955
 
948
- #: udata/core/reuse/constants.py:15 udata/tests/reuse/test_reuse_model.py:108
956
+ #: udata/core/reuse/constants.py:15 udata/tests/reuse/test_reuse_model.py:110
949
957
  msgid "Health"
950
958
  msgstr ""
951
959
 
@@ -1322,11 +1330,11 @@ msgstr ""
1322
1330
  msgid "Archived"
1323
1331
  msgstr ""
1324
1332
 
1325
- #: udata/harvest/backends/dcat.py:338
1333
+ #: udata/harvest/backends/dcat.py:414
1326
1334
  msgid "Remote URL prefix"
1327
1335
  msgstr ""
1328
1336
 
1329
- #: udata/harvest/backends/dcat.py:341
1337
+ #: udata/harvest/backends/dcat.py:417
1330
1338
  msgid "A prefix used to build the remote URL of the harvested items."
1331
1339
  msgstr ""
1332
1340
 
@@ -1784,4 +1792,3 @@ msgstr ""
1784
1792
  #: udata/tests/search/test_adapter.py:33
1785
1793
  msgid "Heavily reused"
1786
1794
  msgstr ""
1787
-
udata/utils.py CHANGED
@@ -37,6 +37,22 @@ def multi_to_dict(multi):
37
37
  )
38
38
 
39
39
 
40
+ def get_field_value_from_path(document, field_path: str):
41
+ # The field_path is a pattern of dot-separated nested field as returned
42
+ # by mongoengine.base.document._get_changed_fields
43
+ # Inspired from mongoengine.base.document._clear_changed_fields iteration
44
+ doc_field = document
45
+ for part in field_path.split("."):
46
+ if isinstance(doc_field, list) and part.isdigit():
47
+ doc_field = doc_field[int(part)]
48
+ elif isinstance(doc_field, dict):
49
+ doc_field = doc_field.get(part, None)
50
+ else:
51
+ field_name = doc_field._reverse_db_field_map.get(part, part)
52
+ doc_field = getattr(doc_field, field_name, None)
53
+ return doc_field
54
+
55
+
40
56
  FIRST_CAP_RE = re.compile("(.)([A-Z][a-z]+)")
41
57
  ALL_CAP_RE = re.compile("([a-z0-9])([A-Z])")
42
58
  UUID_LENGTH = 36
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: udata
3
- Version: 10.8.2.dev37076
3
+ Version: 10.8.3
4
4
  Summary: Open data portal
5
5
  Home-page: https://github.com/opendatateam/udata
6
6
  Author: Opendata Team
@@ -141,7 +141,19 @@ It is collectively taken care of by members of the
141
141
 
142
142
  # Changelog
143
143
 
144
- ## Current (in progress)
144
+ ## 10.8.3 (2025-08-20)
145
+
146
+ - Count dataservices and reuses for datasets based on signal [#3335](https://github.com/opendatateam/udata/pull/3335)
147
+ :warning: the job `update-datasets-reuses-metrics` disappears, you should unschedule it before installing this version
148
+ - Consolidate CSW harvesting logic [#3378](https://github.com/opendatateam/udata/pull/3378)
149
+ :warning: Config setting `HARVEST_ISO19139_XSL_URL` is renamed to `HARVEST_ISO19139_XSLT_URL`.
150
+ - Compute organization aggregate metrics only once at the end of harvest [#3391](https://github.com/opendatateam/udata/pull/3391)
151
+ - Cache dcat harvest pages to avoid two rounds of requests [#3398](https://github.com/opendatateam/udata/pull/3398)
152
+ - Ignore Dataset.accessService when processing DataService [#3399](https://github.com/opendatateam/udata/pull/3399)
153
+ - Add dataset field `description_short` [#3397](https://github.com/opendatateam/udata/pull/3397)
154
+ - Optimize csv organization export [#3401](https://github.com/opendatateam/udata/pull/3401)
155
+
156
+ ## 10.8.2 (2025-07-31)
145
157
 
146
158
  - Add integrity checks on non existent list field instead of empty [#3242](https://github.com/opendatateam/udata/pull/3242)
147
159
  - Migrate udata-metrics [#3386](https://github.com/opendatateam/udata/pull/3386/)
@@ -150,7 +162,7 @@ It is collectively taken care of by members of the
150
162
  - Deactivate cache to check for existing slugs [#3390](https://github.com/opendatateam/udata/pull/3390)
151
163
  - Fix not returning 404 for harvest sources [#3382](https://github.com/opendatateam/udata/pull/3382/)
152
164
  - Add missing trailing slashes on some endpoints [#3392](https://github.com/opendatateam/udata/pull/3392/)
153
- - Make organization name filter case insensitive [#3392](https://github.com/opendatateam/udata/pull/3395)
165
+ - Make organization name filter case insensitive [#3395](https://github.com/opendatateam/udata/pull/3395)
154
166
  - Harvest metadata documents are no longer dynamic [#3396](https://github.com/opendatateam/udata/pull/3396)
155
167
 
156
168
  ## 10.8.1 (2025-07-25)