invenio-app-rdm 13.0.0b1.dev28__py2.py3-none-any.whl → 13.0.0b1.dev29__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.
@@ -17,6 +17,6 @@
17
17
  #
18
18
  # See PEP 0440 for details - https://www.python.org/dev/peps/pep-0440
19
19
 
20
- __version__ = "13.0.0b1.dev28"
20
+ __version__ = "13.0.0b1.dev29"
21
21
 
22
22
  __all__ = ("__version__",)
@@ -178,7 +178,7 @@ def record_detail(
178
178
  )
179
179
  except ValidationError:
180
180
  abort(404)
181
- # inject parent doi format for new drafts so we can show in preview
181
+ # inject parent doi format for new drafts so we can show in preview if parent doi is required
182
182
  if current_app.config["DATACITE_ENABLED"]:
183
183
  service = current_rdm_records.records_service
184
184
  datacite_provider = [
@@ -187,11 +187,27 @@ def record_detail(
187
187
  if p == "doi" and "datacite" in v
188
188
  ]
189
189
  if datacite_provider:
190
- datacite_provider = datacite_provider[0]
191
- parent_doi = datacite_provider.client.generate_doi(
192
- record._record.parent
190
+ should_mint_parent_doi = True
191
+ is_doi_required = (
192
+ current_app.config.get("RDM_PARENT_PERSISTENT_IDENTIFIERS", {})
193
+ .get("doi", {})
194
+ .get("required")
193
195
  )
194
- record_ui["ui"]["new_draft_parent_doi"] = parent_doi
196
+ if not is_doi_required:
197
+ # check if the draft has a reserved doi and mint parent doi only in that case
198
+ record_doi = record._record.pids.get("doi", {})
199
+ is_doi_reserved = record_doi.get(
200
+ "provider", ""
201
+ ) == "datacite" and record_doi.get("identifier")
202
+ if not is_doi_reserved:
203
+ should_mint_parent_doi = False
204
+
205
+ if should_mint_parent_doi:
206
+ datacite_provider = datacite_provider[0]
207
+ parent_doi = datacite_provider.client.generate_doi(
208
+ record._record.parent
209
+ )
210
+ record_ui["ui"]["new_draft_parent_doi"] = parent_doi
195
211
 
196
212
  # emit a record view stats event
197
213
  emitter = current_stats.get_event_emitter("record-view")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: invenio-app-rdm
3
- Version: 13.0.0b1.dev28
3
+ Version: 13.0.0b1.dev29
4
4
  Summary: Invenio Research Data Management.
5
5
  Home-page: https://github.com/inveniosoftware/invenio-app-rdm
6
6
  Author: CERN
@@ -97,6 +97,15 @@ https://inveniordm.docs.cern.ch
97
97
  Changes
98
98
  =======
99
99
 
100
+ Version v13.0.0b1.dev29 (released 2025-01-23)
101
+
102
+ - preview: do not mint parent doi if doi is not reserved and doi is optional
103
+
104
+ Version v13.0.0b1.dev28 (released 2025-01-21)
105
+
106
+ - pids: pass optional DOI transitions in the upload form
107
+ - deposit: force no caching in the response headers
108
+
100
109
  Version v13.0.0b1.dev27 (released 2025-01-16)
101
110
 
102
111
  - Revert "config: add record and membership comment notifications"
@@ -1,4 +1,4 @@
1
- invenio_app_rdm/__init__.py,sha256=7HyqB4G_tTbpxQtOpkBwfja70Zk-A_5X9H2lYM8V5UE,700
1
+ invenio_app_rdm/__init__.py,sha256=PKiiXUchwHsmP64ActLU6bHi4qWIJxVdxx-OONLUtHc,700
2
2
  invenio_app_rdm/cli.py,sha256=G6QqNU2W6n6ICtTMnpeKFXIsdorncDmVXwwwsGH5F2k,2746
3
3
  invenio_app_rdm/config.py,sha256=huHWP7FzjvRb7r_VOL33A9LQWKdmkUVJyEJaibKp3d4,50265
4
4
  invenio_app_rdm/ext.py,sha256=PkZhATGJDgYqBJQh41NdvBZWR83mgI3Eej6rj10UVJE,5278
@@ -83,7 +83,7 @@ invenio_app_rdm/records_ui/views/__init__.py,sha256=4NxQNADuvMsblEsGd3zkKXSNR5_4
83
83
  invenio_app_rdm/records_ui/views/decorators.py,sha256=_TYUGedQAHvEugusIG8xk8xPWHxfw9v4HZR_0dL-tH0,13371
84
84
  invenio_app_rdm/records_ui/views/deposits.py,sha256=ZQSlYugqZX1jnS0GFNtJQVq2_KyDS_ECzp1S26qDGAs,21337
85
85
  invenio_app_rdm/records_ui/views/filters.py,sha256=Rm55fXJv97cqq8B_6KCe-3PxxHUH4VRu-jd9fTea6r4,6994
86
- invenio_app_rdm/records_ui/views/records.py,sha256=60pWASXnJS6t6yisq3QqnsNGCOaMDFPgCgErxXPUKuE,15455
86
+ invenio_app_rdm/records_ui/views/records.py,sha256=2TDbBW2GdX7HuO0KQu116GqGhXIXLqcGqvrFP-Pyn0w,16269
87
87
  invenio_app_rdm/redirector/__init__.py,sha256=AYCTGmfbmkHW3YJXMqXlWBXcBrUsta-QmL9ULX2bjwA,243
88
88
  invenio_app_rdm/redirector/resource.py,sha256=XuH6ZK0HVE5LdXoorlm8aI3deizvnZ5gFa9d1ihYosk,3312
89
89
  invenio_app_rdm/redirector/views.py,sha256=CTJ3EGEFKfc0lFwNb9pwH7MbMLiqaWnF8LA3xGIwahc,563
@@ -519,9 +519,9 @@ invenio_app_rdm/users_ui/views/__init__.py,sha256=SMdY2NJj9GICfr3Xuok7qdNYVtA2bJ
519
519
  invenio_app_rdm/users_ui/views/dashboard.py,sha256=iUn2PrODAwb8ugmMosJKAjPhUzjCiWiAWoXQr9RUFuc,1793
520
520
  invenio_app_rdm/users_ui/views/ui.py,sha256=W_eXM8dLVIrNHQB2UEh37C9BYoHauft6RyvcDNFHovA,1742
521
521
  invenio_app_rdm/utils/files.py,sha256=CruDyO2gDVadSlWEJD-WHpWHeOQ0juh-Ei9jz3D9yjc,3923
522
- invenio_app_rdm-13.0.0b1.dev28.dist-info/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
523
- invenio_app_rdm-13.0.0b1.dev28.dist-info/METADATA,sha256=ZeW18bcqUAiGhh73TMovpEsFGQLXuUrUrA2GtTpPSp8,9272
524
- invenio_app_rdm-13.0.0b1.dev28.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
525
- invenio_app_rdm-13.0.0b1.dev28.dist-info/entry_points.txt,sha256=r1vTqYNABeWqRMWitzyR9FnBsAy-KYZKZCp95IziyLY,2070
526
- invenio_app_rdm-13.0.0b1.dev28.dist-info/top_level.txt,sha256=quZejDUw2vLfKQboNIuVLJ9fxZifdnCT_s2PNf1dfmk,16
527
- invenio_app_rdm-13.0.0b1.dev28.dist-info/RECORD,,
522
+ invenio_app_rdm-13.0.0b1.dev29.dist-info/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
523
+ invenio_app_rdm-13.0.0b1.dev29.dist-info/METADATA,sha256=5TDHA565wd33k9XBmNgNjxJP5EDZd5KBLe_DTLfD1rM,9554
524
+ invenio_app_rdm-13.0.0b1.dev29.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
525
+ invenio_app_rdm-13.0.0b1.dev29.dist-info/entry_points.txt,sha256=r1vTqYNABeWqRMWitzyR9FnBsAy-KYZKZCp95IziyLY,2070
526
+ invenio_app_rdm-13.0.0b1.dev29.dist-info/top_level.txt,sha256=quZejDUw2vLfKQboNIuVLJ9fxZifdnCT_s2PNf1dfmk,16
527
+ invenio_app_rdm-13.0.0b1.dev29.dist-info/RECORD,,