udata 9.0.1.dev29355__py2.py3-none-any.whl → 9.0.1.dev29374__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/csv.py +8 -1
- udata/core/organization/csv.py +5 -3
- udata/core/reuse/csv.py +3 -0
- {udata-9.0.1.dev29355.dist-info → udata-9.0.1.dev29374.dist-info}/METADATA +2 -1
- {udata-9.0.1.dev29355.dist-info → udata-9.0.1.dev29374.dist-info}/RECORD +9 -9
- {udata-9.0.1.dev29355.dist-info → udata-9.0.1.dev29374.dist-info}/LICENSE +0 -0
- {udata-9.0.1.dev29355.dist-info → udata-9.0.1.dev29374.dist-info}/WHEEL +0 -0
- {udata-9.0.1.dev29355.dist-info → udata-9.0.1.dev29374.dist-info}/entry_points.txt +0 -0
- {udata-9.0.1.dev29355.dist-info → udata-9.0.1.dev29374.dist-info}/top_level.txt +0 -0
udata/core/dataset/csv.py
CHANGED
|
@@ -19,6 +19,9 @@ class DatasetCsvAdapter(csv.Adapter):
|
|
|
19
19
|
('url', 'external_url'),
|
|
20
20
|
('organization', 'organization.name'),
|
|
21
21
|
('organization_id', 'organization.id'),
|
|
22
|
+
('owner', 'owner.slug'), # in case it's owned by a user, or introduce 'owner_type'?
|
|
23
|
+
('owner_id', 'owner.id'),
|
|
24
|
+
# 'contact_point', # ?
|
|
22
25
|
'description',
|
|
23
26
|
'frequency',
|
|
24
27
|
'license',
|
|
@@ -26,19 +29,20 @@ class DatasetCsvAdapter(csv.Adapter):
|
|
|
26
29
|
'temporal_coverage.end',
|
|
27
30
|
'spatial.granularity',
|
|
28
31
|
('spatial.zones', serialize_spatial_zones),
|
|
29
|
-
'private',
|
|
30
32
|
('featured', lambda o: o.featured or False),
|
|
31
33
|
'created_at',
|
|
32
34
|
'last_modified',
|
|
33
35
|
('tags', lambda o: ','.join(o.tags)),
|
|
34
36
|
('archived', lambda o: o.archived or False),
|
|
35
37
|
('resources_count', lambda o: len(o.resources)),
|
|
38
|
+
('main_resources_count', lambda o: len([r for r in o.resources if r.type == 'main'])),
|
|
36
39
|
'downloads',
|
|
37
40
|
('harvest.backend', lambda r: r.harvest and r.harvest.backend),
|
|
38
41
|
('harvest.domain', lambda r: r.harvest and r.harvest.domain),
|
|
39
42
|
('harvest.created_at', lambda r: r.harvest and r.harvest.created_at),
|
|
40
43
|
('harvest.modified_at', lambda r: r.harvest and r.harvest.modified_at),
|
|
41
44
|
('quality_score', lambda o: format(o.quality['score'], '.2f')),
|
|
45
|
+
# schema? what is the schema of a dataset?
|
|
42
46
|
)
|
|
43
47
|
|
|
44
48
|
def dynamic_fields(self):
|
|
@@ -85,6 +89,9 @@ class ResourcesCsvAdapter(csv.NestedAdapter):
|
|
|
85
89
|
('downloads', lambda o: int(o.metrics.get('views', 0))),
|
|
86
90
|
('harvest.created_at', lambda o: o.harvest and o.harvest.created_at),
|
|
87
91
|
('harvest.modified_at', lambda o: o.harvest and o.harvest.modified_at),
|
|
92
|
+
('schema_name', 'schema.name'),
|
|
93
|
+
('schema_version', 'schema.version'),
|
|
94
|
+
('preview_url', lambda o: o.preview_url or False),
|
|
88
95
|
)
|
|
89
96
|
attribute = 'resources'
|
|
90
97
|
|
udata/core/organization/csv.py
CHANGED
|
@@ -15,18 +15,20 @@ class OrganizationCsvAdapter(csv.Adapter):
|
|
|
15
15
|
('url', 'external_url'),
|
|
16
16
|
'description',
|
|
17
17
|
('logo', lambda o: o.logo(external=True)),
|
|
18
|
-
('badges', lambda o: [badge.kind for badge in o.badges]),
|
|
18
|
+
('badges', lambda o: ','.join([badge.kind for badge in o.badges])),
|
|
19
19
|
'created_at',
|
|
20
20
|
'last_modified',
|
|
21
|
+
'business_number_id',
|
|
22
|
+
('members_count', lambda o: len(o.members)),
|
|
21
23
|
)
|
|
22
24
|
|
|
23
25
|
def dynamic_fields(self):
|
|
24
26
|
return csv.metric_fields(Organization) + self.get_dynamic_field_downloads()
|
|
25
|
-
|
|
27
|
+
|
|
26
28
|
def get_dynamic_field_downloads(self):
|
|
27
29
|
downloads_counts = self.get_downloads_counts()
|
|
28
30
|
return [('downloads', lambda o: downloads_counts.get(str(o.id), 0))]
|
|
29
|
-
|
|
31
|
+
|
|
30
32
|
def get_downloads_counts(self):
|
|
31
33
|
'''
|
|
32
34
|
Prefetch all the resources' downloads for all selected organization into memory
|
udata/core/reuse/csv.py
CHANGED
|
@@ -15,10 +15,13 @@ class ReuseCsvAdapter(csv.Adapter):
|
|
|
15
15
|
('remote_url', 'url'),
|
|
16
16
|
('organization', 'organization.name'),
|
|
17
17
|
('organization_id', 'organization.id'),
|
|
18
|
+
('owner', 'owner.slug'), # in case it's owned by a user
|
|
19
|
+
('owner_id', 'owner.id'),
|
|
18
20
|
('image', lambda r: r.image(external=True)),
|
|
19
21
|
('featured', lambda r: r.featured or False),
|
|
20
22
|
'created_at',
|
|
21
23
|
'last_modified',
|
|
24
|
+
'topic',
|
|
22
25
|
('tags', lambda r: ','.join(r.tags)),
|
|
23
26
|
('datasets', lambda r: ','.join([str(d.id) for d in r.datasets])),
|
|
24
27
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: udata
|
|
3
|
-
Version: 9.0.1.
|
|
3
|
+
Version: 9.0.1.dev29374
|
|
4
4
|
Summary: Open data portal
|
|
5
5
|
Home-page: https://github.com/opendatateam/udata
|
|
6
6
|
Author: Opendata Team
|
|
@@ -146,6 +146,7 @@ It is collectively taken care of by members of the
|
|
|
146
146
|
- Allow dataservices to be discussed and followed [#3049](https://github.com/opendatateam/udata/pull/3049)
|
|
147
147
|
- Add purge-dataservices job [#3049](https://github.com/opendatateam/udata/pull/3049)
|
|
148
148
|
- Harvest all the available polygons from a spatial coverage [#3039](https://github.com/opendatateam/udata/pull/3039)
|
|
149
|
+
- Refactor catalog exports [#3052](https://github.com/opendatateam/udata/pull/3052)
|
|
149
150
|
|
|
150
151
|
## 8.0.1 (2024-05-28)
|
|
151
152
|
|
|
@@ -91,7 +91,7 @@ udata/core/dataset/api_fields.py,sha256=Cgd_BPlAhP0nTzocOZWWEM-LvKcgCxYE2x00oAiK
|
|
|
91
91
|
udata/core/dataset/apiv2.py,sha256=NmfixLd7Q8WNEAKxpJWubD2QzsxgJwJo69z8kNtU__Y,15896
|
|
92
92
|
udata/core/dataset/commands.py,sha256=dbK7gMYH4G6pOPiYtmL3yomzg5MGqTaG97_UM9Smu_k,3712
|
|
93
93
|
udata/core/dataset/constants.py,sha256=Twml-I5mGiIdTkiDV1D4bXqi_TcNhcEc-QFxorUKHM4,3138
|
|
94
|
-
udata/core/dataset/csv.py,sha256=
|
|
94
|
+
udata/core/dataset/csv.py,sha256=5GeszpHXf1svuAQeNu0hWlNiZDWXyhCrAKRfHqBpDq4,3671
|
|
95
95
|
udata/core/dataset/events.py,sha256=DI71VfRc1eDTtgWQ3TJx5gtUw2MO0O_CVLCKLq0OIF0,3207
|
|
96
96
|
udata/core/dataset/exceptions.py,sha256=uI_NvZRZMr_MtYQBYdLD8tk-BIUeDDfMMcrWwqV7mi8,494
|
|
97
97
|
udata/core/dataset/factories.py,sha256=fHPgEUUpqGw7p7K5wGg-wA6Q0-Pc9eNbzAQK-va8zMM,9120
|
|
@@ -139,7 +139,7 @@ udata/core/organization/api_fields.py,sha256=Xotv1Eqd3fnxhlC0cssSEG4mfiRfLKPQK_k
|
|
|
139
139
|
udata/core/organization/apiv2.py,sha256=VAU_y9Zz-VhBgS-LWVbGOEZdSt3b44nZd5bzTV2wU8g,3206
|
|
140
140
|
udata/core/organization/commands.py,sha256=FaSYxyWfQDR5tWvrAXmwcF2VMREOC13XTK8DD4vp_sY,1623
|
|
141
141
|
udata/core/organization/constants.py,sha256=XGVnItrJTG0hcVKRK5sPmx44KHC9r_EKtj_y0MmBt0o,563
|
|
142
|
-
udata/core/organization/csv.py,sha256=
|
|
142
|
+
udata/core/organization/csv.py,sha256=Z3Ly7TcnP_gGOdGSjryW8BabG9Al_z-CxyRLu7sS1hY,1576
|
|
143
143
|
udata/core/organization/factories.py,sha256=5BABVcDhEChRhJsDfCDm8WyJG4l9j3H1_OFZa3VtlVs,646
|
|
144
144
|
udata/core/organization/forms.py,sha256=JXXv4tQGbIbICti7RXLVZdnc6VujATmLhDrHIsFxBME,3550
|
|
145
145
|
udata/core/organization/metrics.py,sha256=45NDcsFV-oJJQUuq6AyIDXjR-RNubwYWF5-Ke8KrPDY,777
|
|
@@ -165,7 +165,7 @@ udata/core/reuse/api.py,sha256=72oJxmwziqvuFhxcuXy-5ckhQo39t65hp4eqvSqbQ6o,10237
|
|
|
165
165
|
udata/core/reuse/api_fields.py,sha256=aU5L7-jzywSZlO4cq2DfvvYmfmGMWcBimp959AVV3Zg,4871
|
|
166
166
|
udata/core/reuse/apiv2.py,sha256=Op4f6pSMdUuLcCwNadojJfHfU6UYohrzSxlJbRn3wHc,824
|
|
167
167
|
udata/core/reuse/constants.py,sha256=pbCR1xX9v4tdewlOx8bgNmy1-5V9OXIbpNjJivnQ--A,1215
|
|
168
|
-
udata/core/reuse/csv.py,sha256=
|
|
168
|
+
udata/core/reuse/csv.py,sha256=bOKS3LYGmQHj-qPkvxZVnbIju_sYDYjehGCM3Bj75lM,843
|
|
169
169
|
udata/core/reuse/factories.py,sha256=lTABDzgyxDhgTQhjsJb54B0TtTyu2uXlcN_1fU29G_8,862
|
|
170
170
|
udata/core/reuse/forms.py,sha256=UI3dYNgx9r9QxN-f2voxIXE_Dsx7lpLxuOsmc0VtXj4,1805
|
|
171
171
|
udata/core/reuse/metrics.py,sha256=uh0CxErJ8OxrQvajCSfKvQRbhB9rXKzTZ1AhyEMQvP0,161
|
|
@@ -684,9 +684,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=uttB2K8VsqzkEQG-5HfTtFms_3LtV9
|
|
|
684
684
|
udata/translations/pt/LC_MESSAGES/udata.po,sha256=8Ql1Lp7Z9KLnvp-qRxw-NhFu1p35Xj-q6Jg9JHsYhcw,43733
|
|
685
685
|
udata/translations/sr/LC_MESSAGES/udata.mo,sha256=US8beNIMPxP5h-zD_jfP1TheDDd4DdRVS5UIiY5XVZ8,28553
|
|
686
686
|
udata/translations/sr/LC_MESSAGES/udata.po,sha256=TM0yMDvKRljyOzgZZMlTX6OfpF6OC4Ngf_9Zc8n6ayA,50313
|
|
687
|
-
udata-9.0.1.
|
|
688
|
-
udata-9.0.1.
|
|
689
|
-
udata-9.0.1.
|
|
690
|
-
udata-9.0.1.
|
|
691
|
-
udata-9.0.1.
|
|
692
|
-
udata-9.0.1.
|
|
687
|
+
udata-9.0.1.dev29374.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
688
|
+
udata-9.0.1.dev29374.dist-info/METADATA,sha256=sBeaxrnX2bcwU0BzBtUrpALaEvcvw--hsMmb8Fuwans,124111
|
|
689
|
+
udata-9.0.1.dev29374.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
690
|
+
udata-9.0.1.dev29374.dist-info/entry_points.txt,sha256=3SKiqVy4HUqxf6iWspgMqH8d88Htk6KoLbG1BU-UddQ,451
|
|
691
|
+
udata-9.0.1.dev29374.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
|
|
692
|
+
udata-9.0.1.dev29374.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|