udata 10.4.1.dev35201__py2.py3-none-any.whl → 10.4.2.dev35220__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/__init__.py CHANGED
@@ -4,5 +4,5 @@
4
4
  udata
5
5
  """
6
6
 
7
- __version__ = "10.4.1.dev"
7
+ __version__ = "10.4.2.dev"
8
8
  __description__ = "Open data portal"
udata/core/dataset/csv.py CHANGED
@@ -40,7 +40,6 @@ class DatasetCsvAdapter(csv.Adapter):
40
40
  ("resources_count", lambda o: len(o.resources)),
41
41
  ("main_resources_count", lambda o: len([r for r in o.resources if r.type == "main"])),
42
42
  ("resources_formats", lambda o: ",".join(set(r.format for r in o.resources if r.format))),
43
- "downloads",
44
43
  ("harvest.backend", lambda r: r.harvest and r.harvest.backend),
45
44
  ("harvest.domain", lambda r: r.harvest and r.harvest.domain),
46
45
  ("harvest.created_at", lambda r: r.harvest and r.harvest.created_at),
@@ -897,10 +897,6 @@ class Dataset(WithMetrics, DatasetBadgeMixin, Owned, db.Document):
897
897
 
898
898
  return result
899
899
 
900
- @property
901
- def downloads(self):
902
- return sum(resource.metrics.get("views", 0) for resource in self.resources)
903
-
904
900
  @staticmethod
905
901
  def normalize_score(score):
906
902
  """
@@ -21,7 +21,10 @@ class DatasetCSVAdapterTest:
21
21
  "created_at": date_created,
22
22
  "modified_at": date_modified,
23
23
  "uri": "http://domain.gouv.fr/dataset/uri",
24
- }
24
+ },
25
+ metrics={
26
+ "views": 42,
27
+ },
25
28
  )
26
29
  ],
27
30
  harvest={
@@ -41,6 +44,8 @@ class DatasetCSVAdapterTest:
41
44
  assert date_modified.isoformat() in d_row
42
45
  # dataset harvest dates should not be here
43
46
  assert another_date.isoformat() not in d_row
47
+ # assert resource metrics downloads
48
+ assert 42 in d_row
44
49
 
45
50
  def test_datasets_csv_adapter(self):
46
51
  date_created = datetime(2022, 12, 31)
@@ -87,10 +92,8 @@ class DatasetCSVAdapterTest:
87
92
  assert harvest_dataset_values["harvest.domain"] == "example.com"
88
93
  assert harvest_dataset_values["harvest.remote_url"] == "https://www.example.com/"
89
94
  assert harvest_dataset_values["resources_count"] == 0
90
- assert harvest_dataset_values["downloads"] == 0
91
95
 
92
96
  resources_dataset_values = csv[str(resources_dataset.id)]
93
97
  assert resources_dataset_values["resources_count"] == 3
94
98
  assert resources_dataset_values["main_resources_count"] == 1
95
99
  assert set(resources_dataset_values["resources_formats"].split(",")) == set(["csv", "json"])
96
- assert resources_dataset_values["downloads"] == 1337 + 42
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: udata
3
- Version: 10.4.1.dev35201
3
+ Version: 10.4.2.dev35220
4
4
  Summary: Open data portal
5
5
  Home-page: https://github.com/opendatateam/udata
6
6
  Author: Opendata Team
@@ -141,6 +141,11 @@ It is collectively taken care of by members of the
141
141
 
142
142
  ## Current (in progress)
143
143
 
144
+ - Nothing yet
145
+
146
+ ## 10.4.1 (2025-05-20)
147
+
148
+ - Remove duplicate `downloads` in dataset csv adapter [#3319](https://github.com/opendatateam/udata/pull/3319)
144
149
  - Add missing default for license full object [#3317](https://github.com/opendatateam/udata/pull/3317/)
145
150
  - Check for slugs in followers API [#3320](https://github.com/opendatateam/udata/pull/3320)
146
151
  - Fix missing ID in dataset reuses mask [#3321](https://github.com/opendatateam/udata/pull/3321)
@@ -1,6 +1,6 @@
1
1
  tasks/__init__.py,sha256=nfgZ5nkcoluXMIk52P4-8Rj6xL0Qlm_xSUfWW2aHZfI,8161
2
2
  tasks/helpers.py,sha256=70fS9tI_m0DTWmKx9Zl5-LG-nxdz_ZaPyvvsFkN2r48,1091
3
- udata/__init__.py,sha256=TJuxXysCOIQCP5B24Cf6NCp8W7HDJPxPwkcRPeJ4X2k,102
3
+ udata/__init__.py,sha256=0fVQ-23gwR6A7HgpFUf8QrKCTDV2JoN-W2eh-M_MhJE,102
4
4
  udata/api_fields.py,sha256=nv_Nl1Mi-XQ8V08fxmscer13jsNNJgSOOIQEh1itsLQ,30679
5
5
  udata/app.py,sha256=xjk2D3EgboYBpTwBwdIxd2klt2yMoWMyCrkry5fz0LA,7292
6
6
  udata/assets.py,sha256=H5Hrc2vnKM0IFLyWfLXmJ2Kj35w1i8W1D8Cgy8_cUj4,657
@@ -99,12 +99,12 @@ udata/core/dataset/api_fields.py,sha256=SLuzWoPdMLPX28WQ9DRGUPKS27vlltiFeiTo6jXa
99
99
  udata/core/dataset/apiv2.py,sha256=YOCNqQh7_OODcrzqJqdAPc0CoB9vG0DVcFiJNl9yBwQ,20749
100
100
  udata/core/dataset/commands.py,sha256=__hPAk_6iHtgMnEG51ux0vbNWJHxUjXhi1ukH4hF5jY,3714
101
101
  udata/core/dataset/constants.py,sha256=fKn21GzRShZv6pzKy3TvEK1cevQ9H3dOFE-xTRuE0lA,2971
102
- udata/core/dataset/csv.py,sha256=aNJOytbFbH8OCYr6hyaSaqFSa94Xb3dvBd3QGZHJRsA,3633
102
+ udata/core/dataset/csv.py,sha256=OmfHUX5d325XJva2lqHNEBJz3vROfEqkiu1rBfS6Reg,3612
103
103
  udata/core/dataset/events.py,sha256=bSM0nFEX14r4JHc-bAM-7OOuD3JAxUIpw9GgXbOsUyw,4078
104
104
  udata/core/dataset/exceptions.py,sha256=uKiayLSpSzsnLvClObS6hOO0qXEqvURKN7_w8eimQNU,498
105
105
  udata/core/dataset/factories.py,sha256=fRDWDlybR_ud4pDs1-ntWuYHKtV9LMHeBOBp2SmTT6M,9006
106
106
  udata/core/dataset/forms.py,sha256=7KUxuFcEGT0MUe0cZCiZtsnZhvGgvEd68pe13NgeSMI,6292
107
- udata/core/dataset/models.py,sha256=2c6vjr5KPq6Pqg6MK5pRFrXzpTIXtRC2zRxDlxiFTL8,40834
107
+ udata/core/dataset/models.py,sha256=lu-EFDSWa8qz81LbI39F1XsTO5Tv2QfEbEp5ieq-WIE,40710
108
108
  udata/core/dataset/permissions.py,sha256=zXQ6kU-Ni3Pl5tDtat-ZPupug9InsNeCN7xRLc2Vcrc,1097
109
109
  udata/core/dataset/preview.py,sha256=IwCqiNTjjXbtA_SSKF52pwnzKKEz0GyYM95QNn2Dkog,2561
110
110
  udata/core/dataset/rdf.py,sha256=HkjzcWgq9AfPvUGMRI7-ufRrgnlfBmP8crbgRhg6Lz4,31789
@@ -653,7 +653,7 @@ udata/tests/dataservice/test_csv_adapter.py,sha256=UyDPiqKIDwe0AdXLKLpSsBqe4ZJsf
653
653
  udata/tests/dataservice/test_dataservice_rdf.py,sha256=VLFgdclFoIhmctfMEgTxvuNlRxcI1yDkZWE-lbEYGdQ,2984
654
654
  udata/tests/dataservice/test_dataservice_tasks.py,sha256=9XUoYLb_p3dzmgLfswaXjMG2civP0i1kzzP4VdJWE0k,1614
655
655
  udata/tests/dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
656
- udata/tests/dataset/test_csv_adapter.py,sha256=CSAHEur5-183fRsD_cBgsHnLuohn0DOb9zkVT1q0PNo,3866
656
+ udata/tests/dataset/test_csv_adapter.py,sha256=7U83RiuSKNVgX-mV45Txp9a828mnWE4eKrU7K-36Dbs,3906
657
657
  udata/tests/dataset/test_dataset_actions.py,sha256=bgDjVYjOvu3sX_FCTCzf2snZYSprsqor2nAhIVuokSs,722
658
658
  udata/tests/dataset/test_dataset_commands.py,sha256=zMPJG2wYwKBee2zI65kmboxf59Zqa84DDjT8V5wj9uo,801
659
659
  udata/tests/dataset/test_dataset_events.py,sha256=hlrpoOiBbnX_COUI9Pzdqlp45GZZDqu5piwupbnPiTI,3601
@@ -726,9 +726,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=ViV14tUmjSydHS0TWG_mFikKQfyUaT
726
726
  udata/translations/pt/LC_MESSAGES/udata.po,sha256=rzAD_MVoV54TmN3w1ECz3H2Ru5pM7hWMVH03SkY28Q8,47250
727
727
  udata/translations/sr/LC_MESSAGES/udata.mo,sha256=EHX1_D-Uglj38832G7BrA0QC5IuY3p8dKqi9T0DgPmE,29169
728
728
  udata/translations/sr/LC_MESSAGES/udata.po,sha256=3PMnbVhKVJh6Q8ABi1ZTZ8Dcf-sMjngLJZqLbonJoec,54225
729
- udata-10.4.1.dev35201.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
730
- udata-10.4.1.dev35201.dist-info/METADATA,sha256=KyBd59eD9z2ifJGnDzxBDkz9hw0mY69JJXtL9XdgQf4,146345
731
- udata-10.4.1.dev35201.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
732
- udata-10.4.1.dev35201.dist-info/entry_points.txt,sha256=ETvkR4r6G1duBsh_V_fGWENQy17GTFuobi95MYBAl1A,498
733
- udata-10.4.1.dev35201.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
734
- udata-10.4.1.dev35201.dist-info/RECORD,,
729
+ udata-10.4.2.dev35220.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
730
+ udata-10.4.2.dev35220.dist-info/METADATA,sha256=pG1WCtLJtBkkdPYsFLgnowV_s9tGwVNAUQyGAsxXRFI,146495
731
+ udata-10.4.2.dev35220.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
732
+ udata-10.4.2.dev35220.dist-info/entry_points.txt,sha256=ETvkR4r6G1duBsh_V_fGWENQy17GTFuobi95MYBAl1A,498
733
+ udata-10.4.2.dev35220.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
734
+ udata-10.4.2.dev35220.dist-info/RECORD,,