invenio-app-rdm 8.0.0.dev9__py2.py3-none-any.whl → 14.0.0b4.dev4__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.
Files changed (515) hide show
  1. invenio_app_rdm/__init__.py +13 -4
  2. invenio_app_rdm/administration/__init__.py +8 -0
  3. invenio_app_rdm/administration/audit_logs/__init__.py +12 -0
  4. invenio_app_rdm/administration/audit_logs/audit_logs.py +81 -0
  5. invenio_app_rdm/administration/domains/__init__.py +22 -0
  6. invenio_app_rdm/administration/domains/domains.py +159 -0
  7. invenio_app_rdm/administration/moderation/__init__.py +11 -0
  8. invenio_app_rdm/administration/moderation/requests.py +175 -0
  9. invenio_app_rdm/administration/records/__init__.py +15 -0
  10. invenio_app_rdm/administration/records/records.py +163 -0
  11. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/audit_logs.html +14 -0
  12. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/domains_search.html +13 -0
  13. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/records/drafts.html +14 -0
  14. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/records/records.html +14 -0
  15. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests.html +14 -0
  16. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests_details.html +93 -0
  17. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/user_moderation.html +14 -0
  18. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/user_moderation_details.html +14 -0
  19. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/users_search.html +14 -0
  20. invenio_app_rdm/administration/user_moderation/__init__.py +11 -0
  21. invenio_app_rdm/administration/user_moderation/user_moderation.py +175 -0
  22. invenio_app_rdm/administration/users/__init__.py +12 -0
  23. invenio_app_rdm/administration/users/users.py +130 -0
  24. invenio_app_rdm/administration/views/__init__.py +11 -0
  25. invenio_app_rdm/administration/views/ui.py +21 -0
  26. invenio_app_rdm/cli.py +95 -0
  27. invenio_app_rdm/communities_ui/__init__.py +9 -0
  28. invenio_app_rdm/communities_ui/searchapp.py +27 -0
  29. invenio_app_rdm/communities_ui/sitemap.py +63 -0
  30. invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/collection.html +60 -0
  31. invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html +43 -0
  32. invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/details/browse/index.html +59 -0
  33. invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/records/index.html +24 -0
  34. invenio_app_rdm/communities_ui/views/__init__.py +13 -0
  35. invenio_app_rdm/communities_ui/views/communities.py +206 -0
  36. invenio_app_rdm/communities_ui/views/ui.py +93 -0
  37. invenio_app_rdm/config.py +1072 -182
  38. invenio_app_rdm/ext.py +157 -0
  39. invenio_app_rdm/fixtures/__init__.py +56 -0
  40. invenio_app_rdm/fixtures/data/oai_sets.yaml +6 -0
  41. invenio_app_rdm/fixtures/oai_sets.py +20 -0
  42. invenio_app_rdm/fixtures/pages/.gitkeep +1 -0
  43. invenio_app_rdm/fixtures/pages.py +76 -0
  44. invenio_app_rdm/records_ui/previewer/__init__.py +9 -0
  45. invenio_app_rdm/records_ui/previewer/iiif_simple.py +51 -0
  46. invenio_app_rdm/records_ui/searchapp.py +46 -232
  47. invenio_app_rdm/records_ui/sitemap.py +44 -0
  48. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html +63 -18
  49. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html +316 -169
  50. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/access-form.html +64 -0
  51. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html +4 -3
  52. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/contact.html +2 -1
  53. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/creatibutors.html +22 -20
  54. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/description.html +7 -5
  55. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/details.html +299 -167
  56. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/doi.html +3 -24
  57. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/meta.html +36 -0
  58. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/citations.html +6 -0
  59. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html +34 -0
  60. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/details.html +20 -15
  61. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/export.html +18 -41
  62. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/external_resources.html +55 -0
  63. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/keywords_subjects.html +9 -5
  64. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +62 -49
  65. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/locations.html +23 -0
  66. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html +33 -6
  67. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/metrics.html +5 -9
  68. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/technical_metadata.html +21 -0
  69. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/versions.html +15 -5
  70. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/stats.html +112 -90
  71. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/subjects.html +21 -19
  72. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/draft_not_found.html +17 -0
  73. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/export.html +3 -2
  74. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/iiif_preview.html +3 -7
  75. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/creatibutors.html +69 -48
  76. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html +234 -49
  77. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/doi.html +36 -0
  78. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/files.html +170 -71
  79. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/locations.html +62 -0
  80. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/stats_popup.html +21 -0
  81. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/version.html +3 -2
  82. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/restricted_with_doi_tombstone.html +33 -0
  83. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/search.html +3 -1
  84. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/tombstone.html +55 -12
  85. invenio_app_rdm/records_ui/utils.py +127 -2
  86. invenio_app_rdm/records_ui/views/__init__.py +114 -38
  87. invenio_app_rdm/records_ui/views/decorators.py +395 -117
  88. invenio_app_rdm/records_ui/views/deposits.py +414 -104
  89. invenio_app_rdm/records_ui/views/filters.py +118 -11
  90. invenio_app_rdm/records_ui/views/records.py +395 -66
  91. invenio_app_rdm/redirector/__init__.py +8 -0
  92. invenio_app_rdm/redirector/resource.py +106 -0
  93. invenio_app_rdm/redirector/views.py +18 -0
  94. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-inclusion/index.html +14 -0
  95. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-invitation/community_dashboard.html +38 -0
  96. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-invitation/user_dashboard.html +26 -0
  97. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-submission/index.html +129 -0
  98. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/file-modification/index.html +88 -0
  99. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/guest-access-request/index.html +66 -0
  100. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/macros/request_header.html +78 -0
  101. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/record-deletion/index.html +95 -0
  102. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity/index.html +49 -0
  103. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity-invitation/index.html +49 -0
  104. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/user-access-request/index.html +59 -0
  105. invenio_app_rdm/requests_ui/views/__init__.py +1 -3
  106. invenio_app_rdm/requests_ui/views/requests.py +345 -53
  107. invenio_app_rdm/requests_ui/views/ui.py +38 -9
  108. invenio_app_rdm/tasks.py +45 -0
  109. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/AuditLogActions.js +136 -0
  110. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewJson.js +35 -0
  111. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js +119 -0
  112. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/index.js +31 -0
  113. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/SearchResultItemLayout.js +87 -0
  114. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/index.js +9 -0
  115. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/CompareRevisionsDropdown.js +89 -0
  116. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUser.js +92 -0
  117. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUserForm.js +199 -0
  118. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js +80 -0
  119. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaAction.js +109 -0
  120. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaForm.js +196 -0
  121. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/index.js +9 -0
  122. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/index.js +27 -0
  123. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/search/SearchResultItemLayout.js +185 -0
  124. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/search/index.js +9 -0
  125. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/drafts/index.js +32 -0
  126. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/CompareRevisions.js +129 -0
  127. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RecordActions.js +75 -0
  128. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RecordResourceActions.js +185 -0
  129. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RemovalReasonsSelect.js +85 -0
  130. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RestoreConfirmation.js +108 -0
  131. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/TombstoneForm.js +212 -0
  132. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/api.js +38 -0
  133. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/index.js +9 -0
  134. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js +30 -0
  135. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/index.js +40 -0
  136. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/AdministrationSearchLayout.js +56 -0
  137. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/RecordSearchLayout.js +84 -0
  138. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/SearchResultItemLayout.js +171 -0
  139. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/filters/DeletionStatusFilter.js +121 -0
  140. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/filters/index.js +9 -0
  141. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/index.js +10 -0
  142. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/RequestsSearchResultItem.js +79 -0
  143. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/RequestsSearchbarLayout.js +48 -0
  144. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/index.js +22 -0
  145. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/ModerationActions.js +103 -0
  146. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/index.js +29 -0
  147. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/SearchResultItemLayout.js +151 -0
  148. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/UserModerationBulkActions.js +0 -0
  149. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/UserModerationSearchLayout.js +56 -0
  150. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/index.js +10 -0
  151. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/UserActions.js +263 -0
  152. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/api.js +42 -0
  153. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/index.js +8 -0
  154. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/routes.js +38 -0
  155. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/index.js +30 -0
  156. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/SearchResultItemLayout.js +202 -0
  157. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/UserSearchLayout.js +81 -0
  158. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/filters/UserStatusFilterComponent.js +114 -0
  159. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/filters/index.js +1 -0
  160. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/index.js +10 -0
  161. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/collectionRecordsSearch/index.js +61 -0
  162. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchAppLayout.js +84 -0
  163. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchBarElement.js +44 -0
  164. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSingleSearchBarElement.js +46 -0
  165. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/components.js +3 -0
  166. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/index.js +66 -0
  167. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/CompactStats.js +52 -0
  168. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/CopyButton.js +61 -39
  169. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/DisplayPartOfCommunities.js +78 -0
  170. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/DisplayVerifiedCommunity.js +54 -0
  171. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/FileModificationUntil.js +45 -0
  172. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion/DeletionModal.js +354 -0
  173. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion/DeletionRadioGroup.js +44 -0
  174. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion.js +81 -0
  175. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js +189 -0
  176. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +788 -307
  177. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/ShareDraftButton.js +65 -0
  178. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/config.js +48 -0
  179. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/index.js +27 -13
  180. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/frontpage/RecordsList.js +165 -0
  181. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/frontpage/index.js +23 -0
  182. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/AccessRequestForm.js +254 -0
  183. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagement.js +179 -0
  184. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagementDropdown.js +186 -0
  185. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/EditButton.js +30 -16
  186. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ExportDropdown.js +68 -0
  187. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ManageButton.js +140 -0
  188. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ManageDefaultBrandingAction/ManageDefaultBrandingAction.js +129 -0
  189. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunitiesModal.js +63 -0
  190. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunitiesSearch.js +89 -0
  191. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunityRequestItem.js +33 -0
  192. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCitationField.js +68 -73
  193. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesList.js +150 -0
  194. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesListModal.js +90 -0
  195. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesSearch.js +109 -0
  196. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesSearchItem.js +58 -0
  197. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/index.js +3 -0
  198. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitySubmission/RecordCommunitySubmissionModal.js +171 -0
  199. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordManagement.js +123 -43
  200. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordVersionsList.js +143 -79
  201. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RemoveFromCommunity/RemoveFromCommunityAction.js +188 -0
  202. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/AccessDropdown.js +93 -0
  203. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/CreateAccessLink.js +111 -0
  204. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchItem.js +170 -0
  205. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchResultContainer.js +236 -0
  206. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksTab.js +106 -0
  207. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessRequests/AccessRequestsTab.js +239 -0
  208. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/AccessUsersGroups.js +178 -0
  209. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/AddUserGroupAccessModal.js +172 -0
  210. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/GroupsTab.js +88 -0
  211. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/PeopleTab.js +88 -0
  212. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/UserGroupAccessSearchResultItem.js +158 -0
  213. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/{ShareButton.js → ShareOptions/ShareButton.js} +23 -6
  214. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/ShareModal.js +252 -0
  215. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/api/api.js +39 -0
  216. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/access.js +24 -0
  217. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/index.js +92 -124
  218. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/theme.js +131 -0
  219. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/overridableRegistry/index.js +13 -0
  220. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/overridableRegistry/mapping.js +12 -0
  221. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/AccessRequestExpiration.js +61 -0
  222. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/index.js +1 -0
  223. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineEdit.js +177 -0
  224. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineRead.js +50 -0
  225. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/overrides/TimelineFeedHeader.js +34 -0
  226. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/components.js +165 -299
  227. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/index.js +48 -20
  228. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/subcommunity/browse.js +28 -0
  229. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js +164 -0
  230. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/base.js +210 -0
  231. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/communities.js +56 -0
  232. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/requests.js +78 -0
  233. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads.js +210 -0
  234. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js +155 -0
  235. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js +154 -0
  236. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/utils.js +85 -74
  237. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/file_uploader/uppy.less +37 -0
  238. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/creatibutors.less +26 -70
  239. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/licenses.less +5 -5
  240. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/previewer/iiif_simple.less +16 -0
  241. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/form.overrides +170 -4
  242. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/form.variables +3 -5
  243. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/grid.overrides +110 -17
  244. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/grid.variables +3 -5
  245. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/menu.overrides +395 -4
  246. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/menu.variables +3 -5
  247. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.overrides +34 -8
  248. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.variables +6 -9
  249. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/table.overrides +185 -0
  250. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/table.variables +1 -0
  251. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/button.overrides +103 -15
  252. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/button.variables +5 -4
  253. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/container.overrides +121 -13
  254. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/container.variables +6 -4
  255. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/header.overrides +61 -4
  256. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/header.variables +3 -5
  257. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/icon.overrides +29 -4
  258. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/icon.variables +3 -5
  259. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/image.overrides +115 -0
  260. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/image.variables +4 -0
  261. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/input.overrides +50 -4
  262. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/input.variables +5 -4
  263. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/label.overrides +116 -0
  264. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/label.variables +0 -0
  265. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/list.overrides +68 -37
  266. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/list.variables +3 -5
  267. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/segment.overrides +80 -7
  268. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/segment.variables +3 -5
  269. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/reset.overrides +3 -5
  270. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/reset.variables +3 -5
  271. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.overrides +557 -5
  272. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.variables +142 -4
  273. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/accordion.overrides +161 -0
  274. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/accordion.variables +9 -0
  275. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/checkbox.overrides +3 -5
  276. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/checkbox.variables +3 -5
  277. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/dropdown.overrides +116 -12
  278. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/dropdown.variables +4 -5
  279. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/modal.overrides +151 -0
  280. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/modal.variables +5 -0
  281. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.overrides +7 -0
  282. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.variables +0 -0
  283. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/tab.overrides +3 -23
  284. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/tab.variables +3 -5
  285. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/transition.overrides +67 -0
  286. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/transition.variables +3 -0
  287. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/theme.less +71 -0
  288. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/card.overrides +168 -0
  289. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/card.variables +2 -0
  290. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/feed.overrides +463 -0
  291. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/feed.variables +1 -0
  292. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/item.overrides +164 -10
  293. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/item.variables +0 -0
  294. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next.js +1 -1
  295. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/_generatedTranslations.js +66 -0
  296. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/messages.po +951 -0
  297. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/translations.json +307 -0
  298. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/messages.po +895 -0
  299. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/translations.json +283 -0
  300. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/messages.po +896 -0
  301. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/translations.json +283 -0
  302. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/messages.po +961 -0
  303. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/translations.json +295 -0
  304. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/messages.po +897 -0
  305. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/translations.json +283 -0
  306. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/messages.po +830 -160
  307. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/translations.json +282 -88
  308. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/messages.po +883 -4
  309. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/translations.json +259 -65
  310. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en/messages.po +1000 -5
  311. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en/translations.json +290 -63
  312. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/messages.po +960 -0
  313. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/translations.json +283 -0
  314. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/messages.po +896 -0
  315. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/translations.json +283 -0
  316. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/messages.po +895 -0
  317. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/translations.json +283 -0
  318. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/messages.po +960 -0
  319. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/translations.json +283 -0
  320. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/messages.po +901 -0
  321. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/translations.json +289 -0
  322. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/messages.po +952 -0
  323. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/translations.json +283 -0
  324. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/index.js +17 -6
  325. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/messages.po +905 -0
  326. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/translations.json +283 -0
  327. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/messages.po +889 -0
  328. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/translations.json +277 -0
  329. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/messages.po +895 -0
  330. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/translations.json +283 -0
  331. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ko/messages.po +889 -0
  332. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ko/translations.json +277 -0
  333. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/messages.po +907 -0
  334. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/translations.json +295 -0
  335. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/messages.po +895 -0
  336. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/translations.json +283 -0
  337. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/messages.po +910 -0
  338. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/translations.json +295 -0
  339. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/messages.po +901 -0
  340. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/translations.json +283 -0
  341. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/messages.po +908 -0
  342. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/translations.json +289 -0
  343. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/messages.po +958 -0
  344. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/translations.json +295 -0
  345. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/messages.po +908 -0
  346. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/translations.json +295 -0
  347. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/messages.po +951 -0
  348. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/translations.json +283 -0
  349. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/messages.po +952 -0
  350. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/translations.json +283 -0
  351. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/messages.po +910 -0
  352. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/translations.json +295 -0
  353. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/messages.po +891 -0
  354. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/translations.json +277 -0
  355. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/messages.po +889 -0
  356. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/translations.json +277 -0
  357. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package.json +5 -8
  358. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/translations.pot +872 -142
  359. invenio_app_rdm/theme/static/images/gnd-icon.svg +27 -0
  360. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/administration_page.html +19 -0
  361. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/default_static_page.html +33 -0
  362. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/files_integrity_report/email/files_integrity_report.html +31 -0
  363. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/footer.html +32 -79
  364. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/frontpage.html +40 -57
  365. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header.html +114 -76
  366. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header_frontpage.html +16 -13
  367. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header_login.html +151 -61
  368. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.de.html +3 -3
  369. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.en.html +12 -7
  370. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.sv.html +254 -0
  371. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/statistics.en.html +197 -0
  372. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/statistics.sv.html +196 -0
  373. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/versioning.en.html +149 -0
  374. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/versioning.sv.html +143 -0
  375. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/intro_section.html +98 -0
  376. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/javascript.html +12 -0
  377. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/macros/records_list.html +50 -0
  378. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page.html +36 -0
  379. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page_cover.html +13 -0
  380. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/robots.txt +15 -0
  381. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/searchbar.html +63 -0
  382. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/settings/notifications.html +17 -0
  383. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/site_footer.html +29 -0
  384. invenio_app_rdm/theme/templates/semantic-ui/invenio_communities/default_static_page.html +26 -0
  385. invenio_app_rdm/theme/templates/semantic-ui/invenio_previewer/latest_record.html +18 -0
  386. invenio_app_rdm/theme/templates/semantic-ui/invenio_previewer/rdm_abstract_previewer.html +30 -0
  387. invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/header.html +147 -0
  388. invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/site_footer.html +42 -0
  389. invenio_app_rdm/theme/views.py +106 -37
  390. invenio_app_rdm/theme/webpack.py +72 -36
  391. invenio_app_rdm/translations/ar/LC_MESSAGES/messages.mo +0 -0
  392. invenio_app_rdm/translations/ar/LC_MESSAGES/messages.po +1389 -0
  393. invenio_app_rdm/translations/bg/LC_MESSAGES/messages.mo +0 -0
  394. invenio_app_rdm/translations/bg/LC_MESSAGES/messages.po +1361 -0
  395. invenio_app_rdm/translations/ca/LC_MESSAGES/messages.mo +0 -0
  396. invenio_app_rdm/translations/ca/LC_MESSAGES/messages.po +1362 -0
  397. invenio_app_rdm/translations/cs/LC_MESSAGES/messages.mo +0 -0
  398. invenio_app_rdm/translations/cs/LC_MESSAGES/messages.po +1398 -0
  399. invenio_app_rdm/translations/da/LC_MESSAGES/messages.mo +0 -0
  400. invenio_app_rdm/translations/da/LC_MESSAGES/messages.po +1363 -0
  401. invenio_app_rdm/translations/de/LC_MESSAGES/messages.mo +0 -0
  402. invenio_app_rdm/translations/de/LC_MESSAGES/messages.po +1085 -372
  403. invenio_app_rdm/translations/el/LC_MESSAGES/messages.mo +0 -0
  404. invenio_app_rdm/translations/el/LC_MESSAGES/messages.po +987 -367
  405. invenio_app_rdm/translations/es/LC_MESSAGES/messages.mo +0 -0
  406. invenio_app_rdm/translations/es/LC_MESSAGES/messages.po +1389 -0
  407. invenio_app_rdm/translations/et/LC_MESSAGES/messages.mo +0 -0
  408. invenio_app_rdm/translations/et/LC_MESSAGES/messages.po +1364 -0
  409. invenio_app_rdm/translations/fa/LC_MESSAGES/messages.mo +0 -0
  410. invenio_app_rdm/translations/fa/LC_MESSAGES/messages.po +1361 -0
  411. invenio_app_rdm/translations/fr/LC_MESSAGES/messages.mo +0 -0
  412. invenio_app_rdm/translations/fr/LC_MESSAGES/messages.po +1390 -0
  413. invenio_app_rdm/translations/hr/LC_MESSAGES/messages.mo +0 -0
  414. invenio_app_rdm/translations/hr/LC_MESSAGES/messages.po +1361 -0
  415. invenio_app_rdm/translations/hu/LC_MESSAGES/messages.mo +0 -0
  416. invenio_app_rdm/translations/hu/LC_MESSAGES/messages.po +1402 -0
  417. invenio_app_rdm/translations/it/LC_MESSAGES/messages.mo +0 -0
  418. invenio_app_rdm/translations/it/LC_MESSAGES/messages.po +1366 -0
  419. invenio_app_rdm/translations/ja/LC_MESSAGES/messages.mo +0 -0
  420. invenio_app_rdm/translations/ja/LC_MESSAGES/messages.po +1361 -0
  421. invenio_app_rdm/translations/ka/LC_MESSAGES/messages.mo +0 -0
  422. invenio_app_rdm/translations/ka/LC_MESSAGES/messages.po +1361 -0
  423. invenio_app_rdm/translations/ko/LC_MESSAGES/messages.mo +0 -0
  424. invenio_app_rdm/translations/ko/LC_MESSAGES/messages.po +1361 -0
  425. invenio_app_rdm/translations/lt/LC_MESSAGES/messages.mo +0 -0
  426. invenio_app_rdm/translations/lt/LC_MESSAGES/messages.po +1361 -0
  427. invenio_app_rdm/translations/messages.pot +1046 -271
  428. invenio_app_rdm/translations/no/LC_MESSAGES/messages.mo +0 -0
  429. invenio_app_rdm/translations/no/LC_MESSAGES/messages.po +1361 -0
  430. invenio_app_rdm/translations/pl/LC_MESSAGES/messages.mo +0 -0
  431. invenio_app_rdm/translations/pl/LC_MESSAGES/messages.po +1361 -0
  432. invenio_app_rdm/translations/pt/LC_MESSAGES/messages.mo +0 -0
  433. invenio_app_rdm/translations/pt/LC_MESSAGES/messages.po +1361 -0
  434. invenio_app_rdm/translations/ro/LC_MESSAGES/messages.mo +0 -0
  435. invenio_app_rdm/translations/ro/LC_MESSAGES/messages.po +1391 -0
  436. invenio_app_rdm/translations/ru/LC_MESSAGES/messages.mo +0 -0
  437. invenio_app_rdm/translations/ru/LC_MESSAGES/messages.po +1384 -0
  438. invenio_app_rdm/translations/sk/LC_MESSAGES/messages.mo +0 -0
  439. invenio_app_rdm/translations/sk/LC_MESSAGES/messages.po +1362 -0
  440. invenio_app_rdm/translations/sv/LC_MESSAGES/messages.mo +0 -0
  441. invenio_app_rdm/translations/sv/LC_MESSAGES/messages.po +1400 -0
  442. invenio_app_rdm/translations/tr/LC_MESSAGES/messages.mo +0 -0
  443. invenio_app_rdm/translations/tr/LC_MESSAGES/messages.po +1340 -63
  444. invenio_app_rdm/translations/uk/LC_MESSAGES/messages.mo +0 -0
  445. invenio_app_rdm/translations/uk/LC_MESSAGES/messages.po +1363 -0
  446. invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
  447. invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.po +1363 -0
  448. invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
  449. invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.po +1361 -0
  450. invenio_app_rdm/upgrade_scripts/fix_migrated_records_from_1_0_to_2_0.py +1 -0
  451. invenio_app_rdm/upgrade_scripts/fix_migrated_records_from_8_0_to_9_0.py +90 -0
  452. invenio_app_rdm/upgrade_scripts/migrate_10_0_to_11_0.py +47 -0
  453. invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py +205 -0
  454. invenio_app_rdm/upgrade_scripts/migrate_12_0_to_13_0.py +235 -0
  455. invenio_app_rdm/upgrade_scripts/migrate_13_0_to_14_0.py +268 -0
  456. invenio_app_rdm/upgrade_scripts/migrate_2_0_to_3_0.py +7 -3
  457. invenio_app_rdm/upgrade_scripts/migrate_3_0_to_4_0.py +4 -6
  458. invenio_app_rdm/upgrade_scripts/migrate_4_0_to_6_0.py +30 -43
  459. invenio_app_rdm/upgrade_scripts/migrate_6_0_to_7_0.py +1 -5
  460. invenio_app_rdm/upgrade_scripts/migrate_7_0_to_8_0.py +7 -11
  461. invenio_app_rdm/upgrade_scripts/migrate_8_0_to_9_0.py +98 -0
  462. invenio_app_rdm/upgrade_scripts/migrate_9_0_to_10_0.py +43 -0
  463. invenio_app_rdm/users/schemas.py +27 -0
  464. invenio_app_rdm/users_ui/__init__.py +9 -0
  465. invenio_app_rdm/users_ui/searchapp.py +53 -0
  466. invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/base.html +21 -0
  467. invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/communities.html +25 -0
  468. invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/header.html +46 -0
  469. invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/requests.html +24 -0
  470. invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/uploads.html +25 -0
  471. invenio_app_rdm/users_ui/views/__init__.py +14 -0
  472. invenio_app_rdm/users_ui/views/dashboard.py +59 -0
  473. invenio_app_rdm/users_ui/views/ui.py +68 -0
  474. invenio_app_rdm/utils/files.py +120 -0
  475. invenio_app_rdm/views.py +21 -0
  476. invenio_app_rdm-14.0.0b4.dev4.dist-info/METADATA +627 -0
  477. invenio_app_rdm-14.0.0b4.dev4.dist-info/RECORD +508 -0
  478. {invenio_app_rdm-8.0.0.dev9.dist-info → invenio_app_rdm-14.0.0b4.dev4.dist-info}/WHEEL +1 -1
  479. invenio_app_rdm-14.0.0b4.dev4.dist-info/entry_points.txt +44 -0
  480. invenio_app_rdm/admin.py +0 -36
  481. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/dashboard.html +0 -47
  482. invenio_app_rdm/records_ui/views/utils.py +0 -27
  483. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/Image.js +0 -36
  484. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareModal.js +0 -257
  485. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/components/base.js +0 -140
  486. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/components/communities.js +0 -200
  487. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/components/requests.js +0 -394
  488. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/components/uploads.js +0 -287
  489. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/index.js +0 -155
  490. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm_requests/menuTabInit.js +0 -24
  491. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/deposit.less +0 -158
  492. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/export_page.less +0 -20
  493. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/footer.less +0 -88
  494. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/frontpage.less +0 -97
  495. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/details.less +0 -53
  496. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/sidebar.less +0 -47
  497. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page.less +0 -423
  498. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/navbar.less +0 -305
  499. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/search.less +0 -52
  500. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme.less +0 -492
  501. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/variables.less +0 -60
  502. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm_requests/theme.less +0 -22
  503. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next-scanner.config.js +0 -63
  504. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package-lock.json +0 -1512
  505. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/compileCatalog.js +0 -39
  506. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/initCatalog.js +0 -20
  507. invenio_app_rdm/theme/templates/semantic-ui/invenio_requests/community-submission/index.html +0 -67
  508. invenio_app_rdm/version.py +0 -23
  509. invenio_app_rdm-8.0.0.dev9.dist-info/AUTHORS.rst +0 -11
  510. invenio_app_rdm-8.0.0.dev9.dist-info/METADATA +0 -74
  511. invenio_app_rdm-8.0.0.dev9.dist-info/RECORD +0 -179
  512. invenio_app_rdm-8.0.0.dev9.dist-info/entry_points.txt +0 -14
  513. /invenio_app_rdm/{translations/.gitkeep → fixtures/data/pages.yaml} +0 -0
  514. {invenio_app_rdm-8.0.0.dev9.dist-info → invenio_app_rdm-14.0.0b4.dev4.dist-info/licenses}/LICENSE +0 -0
  515. {invenio_app_rdm-8.0.0.dev9.dist-info → invenio_app_rdm-14.0.0b4.dev4.dist-info}/top_level.txt +0 -0
invenio_app_rdm/config.py CHANGED
@@ -1,8 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2019-2020 CERN.
3
+ # Copyright (C) 2019-2025 CERN.
4
4
  # Copyright (C) 2019-2020 Northwestern University.
5
- # Copyright (C) 2021 Graz University of Technology.
5
+ # Copyright (C) 2021-2025 Graz University of Technology.
6
+ # Copyright (C) 2022-2025 KTH Royal Institute of Technology.
7
+ # Copyright (C) 2023 TU Wien
6
8
  #
7
9
  # Invenio App RDM is free software; you can redistribute it and/or modify it
8
10
  # under the terms of the MIT License; see LICENSE file for more details.
@@ -31,17 +33,148 @@ WARNING: An instance should NOT install multiple flavour extensions since
31
33
 
32
34
  from datetime import datetime, timedelta
33
35
 
36
+ import invenio_communities.notifications.builders as community_notifications
34
37
  from celery.schedules import crontab
35
38
  from flask_principal import Denial
39
+ from flask_resources import HTTPJSONException, create_error_handler
36
40
  from invenio_access.permissions import any_user
37
- from invenio_vocabularies.config import VOCABULARIES_DATASTREAM_READERS, \
38
- VOCABULARIES_DATASTREAM_TRANSFORMERS, VOCABULARIES_DATASTREAM_WRITERS
39
- from invenio_vocabularies.contrib.names.datastreams import \
40
- VOCABULARIES_DATASTREAM_READERS as NAMES_READERS
41
- from invenio_vocabularies.contrib.names.datastreams import \
42
- VOCABULARIES_DATASTREAM_TRANSFORMERS as NAMES_TRANSFORMERS
43
- from invenio_vocabularies.contrib.names.datastreams import \
44
- VOCABULARIES_DATASTREAM_WRITERS as NAMES_WRITERS
41
+ from invenio_communities.communities.resources.config import community_error_handlers
42
+ from invenio_communities.notifications.builders import (
43
+ CommunityInvitationAcceptNotificationBuilder,
44
+ CommunityInvitationCancelNotificationBuilder,
45
+ CommunityInvitationDeclineNotificationBuilder,
46
+ CommunityInvitationExpireNotificationBuilder,
47
+ CommunityInvitationSubmittedNotificationBuilder,
48
+ )
49
+ from invenio_notifications.backends import EmailNotificationBackend
50
+ from invenio_rdm_records.notifications.builders import (
51
+ CommunityInclusionAcceptNotificationBuilder,
52
+ CommunityInclusionCancelNotificationBuilder,
53
+ CommunityInclusionDeclineNotificationBuilder,
54
+ CommunityInclusionExpireNotificationBuilder,
55
+ CommunityInclusionSubmittedNotificationBuilder,
56
+ GrantUserAccessNotificationBuilder,
57
+ GuestAccessRequestAcceptNotificationBuilder,
58
+ GuestAccessRequestCancelNotificationBuilder,
59
+ GuestAccessRequestDeclineNotificationBuilder,
60
+ GuestAccessRequestSubmitNotificationBuilder,
61
+ GuestAccessRequestSubmittedNotificationBuilder,
62
+ GuestAccessRequestTokenCreateNotificationBuilder,
63
+ RecordDeletionAcceptNotificationBuilder,
64
+ RecordDeletionDeclineNotificationBuilder,
65
+ UserAccessRequestAcceptNotificationBuilder,
66
+ UserAccessRequestCancelNotificationBuilder,
67
+ UserAccessRequestDeclineNotificationBuilder,
68
+ UserAccessRequestSubmitNotificationBuilder,
69
+ )
70
+ from invenio_rdm_records.proxies import current_rdm_records_service
71
+ from invenio_rdm_records.requests.entity_resolvers import (
72
+ EmailResolver,
73
+ RDMRecordServiceResultResolver,
74
+ )
75
+ from invenio_rdm_records.resources.stats.event_builders import build_record_unique_id
76
+ from invenio_rdm_records.services.communities.components import (
77
+ CommunityServiceComponents,
78
+ )
79
+ from invenio_rdm_records.services.errors import (
80
+ InvalidAccessRestrictions,
81
+ InvalidCommunityVisibility,
82
+ )
83
+ from invenio_rdm_records.services.github.release import RDMGithubRelease
84
+ from invenio_rdm_records.services.permissions import RDMRequestsPermissionPolicy
85
+ from invenio_rdm_records.services.stats import permissions_policy_lookup_factory
86
+ from invenio_rdm_records.services.tasks import StatsRDMReindexTask
87
+ from invenio_records_resources.references.entity_resolvers import ServiceResultResolver
88
+ from invenio_requests.notifications.builders import (
89
+ CommentRequestEventCreateNotificationBuilder,
90
+ CommentRequestEventReplyNotificationBuilder,
91
+ )
92
+ from invenio_requests.resources.requests.config import request_error_handlers
93
+ from invenio_requests.services.requests import facets
94
+ from invenio_stats.aggregations import StatAggregator
95
+ from invenio_stats.contrib.event_builders import build_file_unique_id
96
+ from invenio_stats.processors import (
97
+ EventsIndexer,
98
+ anonymize_user,
99
+ filter_robots,
100
+ flag_machines,
101
+ )
102
+ from invenio_stats.queries import TermsQuery
103
+ from invenio_stats.tasks import StatsAggregationTask, StatsEventTask
104
+ from invenio_vocabularies.config import (
105
+ VOCABULARIES_DATASTREAM_READERS,
106
+ VOCABULARIES_DATASTREAM_TRANSFORMERS,
107
+ VOCABULARIES_DATASTREAM_WRITERS,
108
+ )
109
+ from invenio_vocabularies.contrib.affiliations.datastreams import (
110
+ VOCABULARIES_DATASTREAM_READERS as AFFILIATIONS_READERS,
111
+ )
112
+ from invenio_vocabularies.contrib.affiliations.datastreams import (
113
+ VOCABULARIES_DATASTREAM_TRANSFORMERS as AFFILIATIONS_TRANSFORMERS,
114
+ )
115
+ from invenio_vocabularies.contrib.affiliations.datastreams import (
116
+ VOCABULARIES_DATASTREAM_WRITERS as AFFILIATIONS_WRITERS,
117
+ )
118
+ from invenio_vocabularies.contrib.awards.datastreams import (
119
+ VOCABULARIES_DATASTREAM_READERS as AWARDS_READERS,
120
+ )
121
+ from invenio_vocabularies.contrib.awards.datastreams import (
122
+ VOCABULARIES_DATASTREAM_TRANSFORMERS as AWARDS_TRANSFORMERS,
123
+ )
124
+ from invenio_vocabularies.contrib.awards.datastreams import (
125
+ VOCABULARIES_DATASTREAM_WRITERS as AWARDS_WRITERS,
126
+ )
127
+ from invenio_vocabularies.contrib.common.openaire.datastreams import (
128
+ VOCABULARIES_DATASTREAM_READERS as COMMON_OPENAIRE_READERS,
129
+ )
130
+ from invenio_vocabularies.contrib.common.openaire.datastreams import (
131
+ VOCABULARIES_DATASTREAM_TRANSFORMERS as COMMON_OPENAIRE_TRANSFORMERS,
132
+ )
133
+ from invenio_vocabularies.contrib.common.openaire.datastreams import (
134
+ VOCABULARIES_DATASTREAM_WRITERS as COMMON_OPENAIRE_WRITERS,
135
+ )
136
+ from invenio_vocabularies.contrib.common.ror.datastreams import (
137
+ VOCABULARIES_DATASTREAM_READERS as COMMON_ROR_READERS,
138
+ )
139
+ from invenio_vocabularies.contrib.common.ror.datastreams import (
140
+ VOCABULARIES_DATASTREAM_TRANSFORMERS as COMMON_ROR_TRANSFORMERS,
141
+ )
142
+ from invenio_vocabularies.contrib.common.ror.datastreams import (
143
+ VOCABULARIES_DATASTREAM_WRITERS as COMMON_ROR_WRITERS,
144
+ )
145
+ from invenio_vocabularies.contrib.funders.datastreams import (
146
+ VOCABULARIES_DATASTREAM_READERS as FUNDERS_READERS,
147
+ )
148
+ from invenio_vocabularies.contrib.funders.datastreams import (
149
+ VOCABULARIES_DATASTREAM_TRANSFORMERS as FUNDERS_TRANSFORMERS,
150
+ )
151
+ from invenio_vocabularies.contrib.funders.datastreams import (
152
+ VOCABULARIES_DATASTREAM_WRITERS as FUNDERS_WRITERS,
153
+ )
154
+ from invenio_vocabularies.contrib.names.datastreams import (
155
+ VOCABULARIES_DATASTREAM_READERS as NAMES_READERS,
156
+ )
157
+ from invenio_vocabularies.contrib.names.datastreams import (
158
+ VOCABULARIES_DATASTREAM_TRANSFORMERS as NAMES_TRANSFORMERS,
159
+ )
160
+ from invenio_vocabularies.contrib.names.datastreams import (
161
+ VOCABULARIES_DATASTREAM_WRITERS as NAMES_WRITERS,
162
+ )
163
+ from invenio_vocabularies.contrib.subjects.datastreams import (
164
+ VOCABULARIES_DATASTREAM_READERS as SUBJECTS_READERS,
165
+ )
166
+ from invenio_vocabularies.contrib.subjects.datastreams import (
167
+ VOCABULARIES_DATASTREAM_TRANSFORMERS as SUBJECTS_TRANSFORMERS,
168
+ )
169
+ from invenio_vocabularies.contrib.subjects.datastreams import (
170
+ VOCABULARIES_DATASTREAM_WRITERS as SUBJECTS_WRITERS,
171
+ )
172
+ from werkzeug.local import LocalProxy
173
+
174
+ from .communities_ui.sitemap import SitemapSectionOfCommunities
175
+ from .records_ui.sitemap import SitemapSectionOfRDMRecords
176
+ from .theme.views import notification_settings
177
+ from .users.schemas import NotificationsUserSchema, UserPreferencesNotificationsSchema
45
178
 
46
179
  # TODO: Remove when records-rest is out of communities and files
47
180
  RECORDS_REST_ENDPOINTS = {}
@@ -57,7 +190,7 @@ def _(x):
57
190
  # =====
58
191
  # See https://flask.palletsprojects.com/en/1.1.x/config/
59
192
 
60
- APP_ALLOWED_HOSTS = ['0.0.0.0', 'localhost', '127.0.0.1']
193
+ TRUSTED_HOSTS = ["0.0.0.0", "localhost", "127.0.0.1"]
61
194
  """Allowed hosts.
62
195
 
63
196
  Since HAProxy and Nginx route all requests no matter the host header
@@ -87,7 +220,7 @@ SESSION_COOKIE_SAMESITE = "Lax"
87
220
  # =============
88
221
  # https://flask-limiter.readthedocs.io/en/stable/#configuration
89
222
 
90
- RATELIMIT_STORAGE_URL = "redis://localhost:6379/3"
223
+ RATELIMIT_STORAGE_URI = "redis://localhost:6379/3"
91
224
  """Storage for ratelimiter."""
92
225
 
93
226
  # Increase defaults
@@ -99,13 +232,12 @@ RATELIMIT_GUEST_USER = "5000 per hour;500 per minute"
99
232
  # ===========
100
233
  # See https://pythonhosted.org/Flask-Babel/#configuration
101
234
 
102
- BABEL_DEFAULT_LOCALE = 'en'
235
+ BABEL_DEFAULT_LOCALE = "en"
103
236
  """Default locale (language)."""
104
237
 
105
- BABEL_DEFAULT_TIMEZONE = 'Europe/Zurich'
238
+ BABEL_DEFAULT_TIMEZONE = "Europe/Zurich"
106
239
  """Default time zone."""
107
240
 
108
-
109
241
  # Invenio-I18N
110
242
  # ============
111
243
  # See https://invenio-i18n.readthedocs.io/en/latest/configuration.html
@@ -120,54 +252,79 @@ BABEL_DEFAULT_TIMEZONE = 'Europe/Zurich'
120
252
  # =============
121
253
  # See https://invenio-theme.readthedocs.io/en/latest/configuration.html
122
254
 
123
- APP_THEME = ['semantic-ui']
255
+ APP_THEME = ["semantic-ui"]
124
256
  """Application theme."""
125
257
 
126
- BASE_TEMPLATE = 'invenio_theme/page.html'
258
+ BASE_TEMPLATE = "invenio_app_rdm/page.html"
127
259
  """Global base template."""
128
260
 
129
- COVER_TEMPLATE = 'invenio_theme/page_cover.html'
261
+ COVER_TEMPLATE = "invenio_app_rdm/page_cover.html"
130
262
  """Cover page base template (used for e.g. login/sign-up)."""
131
263
 
132
- SETTINGS_TEMPLATE = 'invenio_theme/page_settings.html'
264
+ SETTINGS_TEMPLATE = "invenio_theme/page_settings.html"
133
265
  """Settings base template."""
134
266
 
135
- THEME_FOOTER_TEMPLATE = 'invenio_app_rdm/footer.html'
267
+ THEME_FOOTER_TEMPLATE = "invenio_app_rdm/footer.html"
136
268
  """Footer base template."""
137
269
 
138
270
  THEME_FRONTPAGE = False
139
271
  """Use default frontpage."""
140
272
 
141
- THEME_FRONTPAGE_TITLE = _('The turn-key research data management repository')
273
+ THEME_FRONTPAGE_TITLE = _("The turn-key research data management repository")
142
274
  """Frontpage title."""
143
275
 
144
- THEME_HEADER_TEMPLATE = 'invenio_app_rdm/header.html'
276
+ THEME_HEADER_TEMPLATE = "invenio_app_rdm/header.html"
145
277
  """Header base template."""
146
278
 
147
- THEME_FRONTPAGE_TEMPLATE = 'invenio_app_rdm/frontpage.html'
279
+ THEME_FRONTPAGE_TEMPLATE = "invenio_app_rdm/frontpage.html"
148
280
  """Frontpage template."""
149
281
 
150
- THEME_HEADER_LOGIN_TEMPLATE = 'invenio_app_rdm/header_login.html'
282
+ THEME_HEADER_LOGIN_TEMPLATE = "invenio_app_rdm/header_login.html"
151
283
  """Header login base template."""
152
284
 
153
- THEME_LOGO = 'images/invenio-rdm.svg'
285
+
286
+ def _get_package_version():
287
+ from importlib.metadata import PackageNotFoundError, version
288
+
289
+ from packaging.version import Version
290
+
291
+ try:
292
+ package_version = version("invenio-app-rdm")
293
+ parsed_version = Version(package_version)
294
+ major_minor_version = (
295
+ f"InvenioRDM {parsed_version.major}.{parsed_version.minor}"
296
+ )
297
+ return major_minor_version
298
+ except PackageNotFoundError:
299
+ # default without any version
300
+ return "InvenioRDM"
301
+
302
+
303
+ THEME_GENERATOR = _get_package_version()
304
+ """Generator meta tag to identify the software that generated the page.
305
+
306
+ Set it to `None` to disable the tag.
307
+ """
308
+
309
+ THEME_LOGO = "images/invenio-rdm.svg"
154
310
  """Theme logo."""
155
311
 
156
- THEME_SITENAME = _('InvenioRDM')
312
+ THEME_SITENAME = _("InvenioRDM")
157
313
  """Site name."""
158
314
 
315
+ THEME_TWITTERHANDLE = ""
316
+ """Twitter handle."""
159
317
 
160
- # Invenio-Communities
161
- # ===================
162
-
163
- COMMUNITIES_ENABLED = False
164
- """Control if community views and endpoints are enabled."""
318
+ THEME_SHOW_FRONTPAGE_INTRO_SECTION = True
319
+ """Front page intro section visibility"""
165
320
 
321
+ THEME_JAVASCRIPT_TEMPLATE = "invenio_app_rdm/javascript.html"
166
322
 
167
323
  # Invenio-Files-REST
168
324
  # ==================
169
325
  # See https://invenio-files-rest.readthedocs.io/en/latest/configuration.html
170
326
 
327
+
171
328
  def files_rest_permission_factory(obj, action):
172
329
  """Generate a denying permission."""
173
330
  return Denial(any_user)
@@ -176,43 +333,31 @@ def files_rest_permission_factory(obj, action):
176
333
  FILES_REST_PERMISSION_FACTORY = files_rest_permission_factory
177
334
  """Set default files permission factory."""
178
335
 
336
+ FILES_REST_CHECKSUM_VERIFICATION_URI_PREFIXES = []
337
+ """URI prefixes of files their checksums should be verified"""
179
338
 
180
- # Invenio-IIIF
181
- # =================
182
- # See https://invenio-iiif.readthedocs.io/en/latest/configuration.html
183
-
184
- IIIF_PREVIEW_TEMPLATE = "invenio_app_rdm/records/iiif_preview.html"
185
- """Template for IIIF image preview."""
339
+ # Storage classes
340
+ FILES_REST_STORAGE_CLASS_LIST = {
341
+ "L": "Local",
342
+ "F": "Fetch",
343
+ "R": "Remote",
344
+ }
186
345
 
187
- IIIF_API_DECORATOR_HANDLER = None
188
- IIIF_IMAGE_OPENER_HANDLER = "invenio_rdm_records.resources.iiif:image_opener"
346
+ FILES_REST_DEFAULT_STORAGE_CLASS = "L"
189
347
 
190
- # Invenio-Previewer
191
- # =================
192
- # See https://github.com/inveniosoftware/invenio-previewer/blob/master/invenio_previewer/config.py # noqa
348
+ FILES_REST_DEFAULT_QUOTA_SIZE = 10**10
349
+ """Default quota size is 10Gb."""
193
350
 
194
- PREVIEWER_PREFERENCE = [
195
- 'csv_dthreejs',
196
- # TODO: IIIF checks bucket-level permissions, and thus won't work
197
- # 'iiif_image',
198
- 'simple_image',
199
- 'json_prismjs',
200
- 'xml_prismjs',
201
- 'mistune',
202
- 'pdfjs',
203
- 'ipynb',
204
- 'zip',
205
- 'txt',
206
- ]
207
- """Preferred previewers."""
351
+ FILES_REST_DEFAULT_MAX_FILE_SIZE = FILES_REST_DEFAULT_QUOTA_SIZE
352
+ """Default maximum file size for a bucket in bytes."""
208
353
 
209
354
  # Invenio-Formatter
210
355
  # =================
211
356
 
212
- FORMATTER_BADGES_ALLOWED_TITLES = ['DOI', 'doi']
357
+ FORMATTER_BADGES_ALLOWED_TITLES = ["DOI", "doi"]
213
358
  """List of allowed titles in badges."""
214
359
 
215
- FORMATTER_BADGES_TITLE_MAPPING = {'doi': 'DOI'}
360
+ FORMATTER_BADGES_TITLE_MAPPING = {"doi": "DOI"}
216
361
  """Mapping of titles."""
217
362
 
218
363
  # Invenio-Mail / Flask-Mail
@@ -222,22 +367,26 @@ FORMATTER_BADGES_TITLE_MAPPING = {'doi': 'DOI'}
222
367
  MAIL_SUPPRESS_SEND = True
223
368
  """Disable email sending by default."""
224
369
 
370
+ MAIL_DEFAULT_SENDER = "info@inveniosoftware.org"
371
+ """Email address used as sender of account registration emails.
372
+
373
+ `SECURITY_EMAIL_SENDER` will default to this value.
374
+ """
225
375
 
226
376
  # Flask-Collect
227
377
  # =============
228
378
  # See https://github.com/klen/Flask-Collect#setup
229
379
 
230
- COLLECT_STORAGE = 'flask_collect.storage.file'
380
+ COLLECT_STORAGE = "flask_collect.storage.file"
231
381
  """Static files collection method (defaults to copying files)."""
232
382
 
233
-
234
383
  # Invenio-Accounts
235
384
  # ================
236
385
  # (Flask-Security, Flask-Login, Flask-Principal, Flask-KVSession)
237
386
  # See https://invenio-accounts.readthedocs.io/en/latest/configuration.html
238
387
  # See https://flask-security.readthedocs.io/en/3.0.0/configuration.html
239
388
 
240
- ACCOUNTS_SESSION_REDIS_URL = 'redis://localhost:6379/1'
389
+ ACCOUNTS_SESSION_REDIS_URL = "redis://localhost:6379/1"
241
390
  """Redis session storage URL."""
242
391
 
243
392
  ACCOUNTS_USERINFO_HEADERS = True
@@ -248,12 +397,21 @@ MUST ensure that NGINX (or other proxies) removes these headers again before
248
397
  sending the response to the client. Set to False, in case of doubt.
249
398
  """
250
399
 
251
- SECURITY_EMAIL_SENDER = "info@inveniosoftware.org"
252
- """Email address used as sender of account registration emails."""
400
+
401
+ ACCOUNTS_USER_PREFERENCES_SCHEMA = UserPreferencesNotificationsSchema()
402
+ """The schema to use for validation of the user preferences."""
403
+
404
+ # Invenio-Security-Invenio
405
+ # ========================
253
406
 
254
407
  SECURITY_EMAIL_SUBJECT_REGISTER = _("Welcome to Invenio App RDM!")
255
408
  """Email subject for account registration emails."""
256
409
 
410
+ # Invenio-UserProfiles
411
+ # ================
412
+
413
+ USERPROFILES_EXTEND_SECURITY_FORMS = True
414
+ """Extend the registration form with profile fields (name, affiliations)."""
257
415
 
258
416
  # Invenio-Celery / Celery / Flask-Celeryext
259
417
  # =========================================
@@ -265,28 +423,82 @@ BROKER_URL = "amqp://guest:guest@localhost:5672/"
265
423
  """URL of message broker for Celery 3 (default is RabbitMQ)."""
266
424
 
267
425
  CELERY_BEAT_SCHEDULE = {
268
- # 'indexer': {
269
- # 'task': 'invenio_indexer.tasks.process_bulk_queue',
270
- # 'schedule': timedelta(minutes=5),
271
- # },
272
- 'accounts_sessions': {
273
- 'task': 'invenio_accounts.tasks.clean_session_table',
274
- 'schedule': timedelta(minutes=60),
275
- },
276
- 'accounts_ips': {
277
- 'task': 'invenio_accounts.tasks.delete_ips',
278
- 'schedule': timedelta(hours=6),
279
- },
280
- 'draft_resources': {
281
- 'task': (
282
- 'invenio_drafts_resources.services.records.tasks.cleanup_drafts'
283
- ),
284
- 'schedule': timedelta(minutes=60),
426
+ "indexer": {
427
+ "task": "invenio_records_resources.tasks.manage_indexer_queues",
428
+ "schedule": timedelta(seconds=10),
429
+ },
430
+ "accounts_sessions": {
431
+ "task": "invenio_accounts.tasks.clean_session_table",
432
+ "schedule": timedelta(minutes=60),
433
+ },
434
+ "accounts_ips": {
435
+ "task": "invenio_accounts.tasks.delete_ips",
436
+ "schedule": timedelta(hours=6),
437
+ },
438
+ "update_domain_status": {
439
+ "task": "invenio_accounts.tasks.update_domain_status",
440
+ "schedule": timedelta(hours=4),
441
+ },
442
+ "draft_resources": {
443
+ "task": ("invenio_drafts_resources.services.records.tasks.cleanup_drafts"),
444
+ "schedule": timedelta(minutes=60),
445
+ },
446
+ "rdm_records": {
447
+ "task": "invenio_rdm_records.services.tasks.update_expired_embargos",
448
+ "schedule": crontab(minute=2, hour=0),
449
+ },
450
+ "expire_requests": {
451
+ "task": "invenio_requests.tasks.check_expired_requests",
452
+ "schedule": crontab(minute=3, hour=0),
453
+ },
454
+ "file-checks": {
455
+ "task": "invenio_files_rest.tasks.schedule_checksum_verification",
456
+ "schedule": timedelta(hours=1),
457
+ "kwargs": {
458
+ "batch_interval": {"hours": 1},
459
+ "frequency": {"days": 14},
460
+ "max_count": 0,
461
+ # Query taking into account only files with URI prefixes defined by
462
+ # the FILES_REST_CHECKSUM_VERIFICATION_URI_PREFIXES config variable
463
+ "files_query": "invenio_app_rdm.utils.files.checksum_verification_files_query",
464
+ },
465
+ },
466
+ "file-integrity-report": {
467
+ "task": "invenio_app_rdm.tasks.file_integrity_report",
468
+ "schedule": crontab(minute=0, hour=7), # Every day at 07:00 UTC
469
+ },
470
+ # indexing of statistics events & aggregations
471
+ "stats-process-events": {
472
+ **StatsEventTask,
473
+ "schedule": crontab(minute="25,55"), # Every hour at minute 25 and 55
474
+ },
475
+ "stats-aggregate-events": {
476
+ **StatsAggregationTask,
477
+ "schedule": crontab(minute=0), # Every hour at minute 0
478
+ },
479
+ "reindex-stats": StatsRDMReindexTask, # Every hour at minute 10
480
+ # Invenio communities provides some caching that has the potential to be never removed,
481
+ # therefore, we need a cronjob to ensure that at least once per day we clear the cache
482
+ "clear-cache": {
483
+ "task": "invenio_communities.tasks.clear_cache",
484
+ "schedule": crontab(minute=0, hour=1), # Every day at 01:00 UTC
485
+ },
486
+ "clean-access-request-tokens": {
487
+ "task": "invenio_rdm_records.requests.access.tasks.clean_expired_request_access_tokens",
488
+ "schedule": crontab(minute=4, hour=0),
489
+ },
490
+ "delete-job-logs": {
491
+ "task": "invenio_jobs.logging.tasks.delete_logs",
492
+ "schedule": crontab(minute=5, hour=0),
493
+ },
494
+ "update_sitemap": {
495
+ "task": "invenio_sitemap.tasks.update_sitemap_cache",
496
+ "schedule": crontab(minute=0, hour=2),
497
+ },
498
+ "update-collections-size": {
499
+ "task": "invenio_collections.tasks.update_collections_size",
500
+ "schedule": timedelta(hours=1),
285
501
  },
286
- 'rdm_records': {
287
- 'task': 'invenio_rdm_records.services.tasks.update_expired_embargos',
288
- 'schedule': crontab(minute=2, hour=0),
289
- }
290
502
  }
291
503
  """Scheduled tasks configuration (aka cronjobs)."""
292
504
 
@@ -296,14 +508,13 @@ CELERY_BROKER_URL = BROKER_URL
296
508
  CELERY_RESULT_BACKEND = "redis://localhost:6379/2"
297
509
  """URL of backend for result storage (default is Redis)."""
298
510
 
299
-
300
511
  # Flask-SQLAlchemy
301
512
  # ================
302
513
  # See https://flask-sqlalchemy.palletsprojects.com/en/2.x/config/
303
514
 
304
- SQLALCHEMY_DATABASE_URI = \
305
- 'postgresql+psycopg2://invenio-app-rdm:invenio-app-rdm@localhost/' \
306
- 'invenio-app-rdm'
515
+ SQLALCHEMY_DATABASE_URI = (
516
+ "postgresql+psycopg2://invenio-app-rdm:invenio-app-rdm@localhost/invenio-app-rdm"
517
+ )
307
518
  """Database URI including user and password.
308
519
 
309
520
  Default value is provided to make module testing easier.
@@ -312,7 +523,6 @@ Default value is provided to make module testing easier.
312
523
  SQLALCHEMY_ECHO = False
313
524
  """Enable to see all SQL queries."""
314
525
 
315
-
316
526
  SQLALCHEMY_ENGINE_OPTIONS = {
317
527
  "pool_pre_ping": False,
318
528
  "pool_recycle": 3600,
@@ -376,7 +586,6 @@ See https://docs.sqlalchemy.org/en/latest/core/engines.html.
376
586
  # setting.
377
587
  DB_VERSIONING_USER_MODEL = None
378
588
 
379
-
380
589
  # Invenio-JSONSchemas/Invenio-Records
381
590
  # ===================================
382
591
  # See https://invenio-jsonschemas.readthedocs.io/en/latest/configuration.html
@@ -387,7 +596,7 @@ JSONSCHEMAS_REGISTER_ENDPOINTS_API = False
387
596
  JSONSCHEMAS_REGISTER_ENDPOINTS_UI = False
388
597
  """Don't' register schema endpoints."""
389
598
 
390
- JSONSCHEMAS_HOST = 'unused'
599
+ JSONSCHEMAS_HOST = "unused"
391
600
  # This variable is set to something different than localhost to avoid a warning
392
601
  # being issued. The value is however not used, because of the two variables
393
602
  # set below.
@@ -399,9 +608,7 @@ Note that when using a custom ref resolver class you should also set
399
608
  ``RECORDS_REFRESOLVER_STORE`` to point to a JSONSchema ref resolver store.
400
609
  """
401
610
 
402
- RECORDS_REFRESOLVER_STORE = (
403
- "invenio_jsonschemas.proxies.current_refresolver_store"
404
- )
611
+ RECORDS_REFRESOLVER_STORE = "invenio_jsonschemas.proxies.current_refresolver_store"
405
612
  """JSONSchemas ref resolver store.
406
613
 
407
614
  Used together with ``RECORDS_REFRESOLVER_CLS`` to provide a specific
@@ -413,55 +620,79 @@ ref resolver store.
413
620
  # See https://github.com/inveniosoftware/invenio-oaiserver/blob/master/invenio_oaiserver/config.py # noqa
414
621
  # (Using GitHub because documentation site out-of-sync at time of writing)
415
622
 
416
- OAISERVER_ID_PREFIX = 'oai:invenio-app-rdm.org:'
623
+ OAISERVER_ID_PREFIX = "oai:invenio-app-rdm.org:"
417
624
  """The prefix that will be applied to the generated OAI-PMH ids."""
418
625
 
419
- OAISERVER_SEARCH_CLS = 'invenio_rdm_records.oai:OAIRecordSearch'
626
+ OAISERVER_SEARCH_CLS = "invenio_rdm_records.oai:OAIRecordSearch"
420
627
  """Class for record search."""
421
628
 
422
- OAISERVER_ID_FETCHER = 'invenio_rdm_records.oai:oaiid_fetcher'
629
+ OAISERVER_ID_FETCHER = "invenio_rdm_records.oai:oaiid_fetcher"
423
630
  """OAI ID fetcher function."""
424
631
 
425
632
  OAISERVER_METADATA_FORMATS = {
426
- 'oai_dc': {
427
- 'serializer': (
428
- 'invenio_rdm_records.oai:dublincore_etree'
429
- ),
430
- 'schema': 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd',
431
- 'namespace': 'http://www.openarchives.org/OAI/2.0/oai_dc/',
633
+ "marcxml": {
634
+ "serializer": "invenio_rdm_records.oai:marcxml_etree",
635
+ "schema": "https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd",
636
+ "namespace": "https://www.loc.gov/standards/marcxml/",
637
+ },
638
+ "oai_dc": {
639
+ "serializer": "invenio_rdm_records.oai:dublincore_etree",
640
+ "schema": "http://www.openarchives.org/OAI/2.0/oai_dc.xsd",
641
+ "namespace": "http://www.openarchives.org/OAI/2.0/oai_dc/",
642
+ },
643
+ "dcat": {
644
+ "serializer": "invenio_rdm_records.oai:dcat_etree",
645
+ "schema": "http://schema.datacite.org/meta/kernel-4/metadata.xsd",
646
+ "namespace": "https://www.w3.org/ns/dcat",
647
+ },
648
+ "marc21": {
649
+ "serializer": "invenio_rdm_records.oai:marcxml_etree",
650
+ "schema": "https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd",
651
+ "namespace": "https://www.loc.gov/standards/marcxml/",
652
+ },
653
+ "datacite": {
654
+ "serializer": "invenio_rdm_records.oai:datacite_etree",
655
+ "schema": "http://schema.datacite.org/meta/kernel-4.5/metadata.xsd",
656
+ "namespace": "http://datacite.org/schema/kernel-4",
432
657
  },
433
- 'datacite': {
434
- 'serializer': 'invenio_rdm_records.oai:datacite_etree',
435
- 'schema': 'http://schema.datacite.org/'
436
- 'meta/nonexistant/nonexistant.xsd',
437
- 'namespace': 'http://datacite.org/schema/nonexistant',
658
+ "oai_datacite": {
659
+ "serializer": "invenio_rdm_records.oai:oai_datacite_etree",
660
+ "schema": "http://schema.datacite.org/oai/oai-1.1/oai.xsd",
661
+ "namespace": "http://schema.datacite.org/oai/oai-1.1/",
438
662
  },
439
- 'oai_datacite': {
440
- 'serializer': ('invenio_rdm_records.oai:oai_datacite_etree'),
441
- 'schema': 'http://schema.datacite.org/oai/oai-1.1/oai.xsd',
442
- 'namespace': 'http://schema.datacite.org/oai/oai-1.1/',
663
+ "datacite4": {
664
+ "serializer": "invenio_rdm_records.oai:datacite_etree",
665
+ "schema": "http://schema.datacite.org/meta/kernel-4.5/metadata.xsd",
666
+ "namespace": "http://datacite.org/schema/kernel-4",
667
+ },
668
+ "oai_datacite4": {
669
+ "serializer": ("invenio_rdm_records.oai:oai_datacite_etree"),
670
+ "schema": "http://schema.datacite.org/oai/oai-1.1/oai.xsd",
671
+ "namespace": "http://schema.datacite.org/oai/oai-1.1/",
443
672
  },
444
673
  }
445
674
 
446
- OAISERVER_LAST_UPDATE_KEY = 'updated'
675
+ OAISERVER_LAST_UPDATE_KEY = "updated"
447
676
  """Record update key."""
448
677
 
449
678
  OAISERVER_CREATED_KEY = "created"
450
679
  """Record created key."""
451
680
 
452
- OAISERVER_RECORD_CLS = 'invenio_rdm_records.records.api:RDMRecord'
681
+ OAISERVER_RECORD_CLS = "invenio_rdm_records.records.api:RDMRecord"
453
682
  """Record retrieval class."""
454
683
 
455
- OAISERVER_RECORD_SETS_FETCHER = 'invenio_oaiserver.utils:record_sets_fetcher'
684
+ OAISERVER_RECORD_SETS_FETCHER = "invenio_oaiserver.percolator:find_sets_for_record"
456
685
  """Record's OAI sets function."""
457
686
 
458
- OAISERVER_RECORD_INDEX = 'rdmrecords-records'
459
- """Specify an Elastic index with records that should be exposed via OAI-PMH."""
687
+ OAISERVER_RECORD_INDEX = LocalProxy(
688
+ lambda: current_rdm_records_service.record_cls.index._name
689
+ )
690
+
691
+ """Specify a search index with records that should be exposed via OAI-PMH."""
460
692
 
461
- OAISERVER_GETRECORD_FETCHER = 'invenio_rdm_records.oai:getrecord_fetcher'
693
+ OAISERVER_GETRECORD_FETCHER = "invenio_rdm_records.oai:getrecord_fetcher"
462
694
  """Record data fetcher for serialization."""
463
695
 
464
-
465
696
  # Flask-DebugToolbar
466
697
  # ==================
467
698
  # See https://flask-debugtoolbar.readthedocs.io/en/latest/#configuration
@@ -471,7 +702,6 @@ OAISERVER_GETRECORD_FETCHER = 'invenio_rdm_records.oai:getrecord_fetcher'
471
702
  DEBUG_TB_INTERCEPT_REDIRECTS = False
472
703
  """Switches off incept of redirects by Flask-DebugToolbar."""
473
704
 
474
-
475
705
  # Flask-Caching
476
706
  # =============
477
707
  # See https://flask-caching.readthedocs.io/en/latest/index.html#configuring-flask-caching # noqa
@@ -482,6 +712,10 @@ CACHE_REDIS_URL = "redis://localhost:6379/0"
482
712
  CACHE_TYPE = "flask_caching.backends.redis"
483
713
  """Use Redis caching object."""
484
714
 
715
+ # Invenio-Access
716
+ # ==============
717
+ # See https://invenio-access.readthedocs.io/en/latest/configuration.html
718
+
485
719
  ACCESS_CACHE = "invenio_cache:current_cache"
486
720
  """Use the cache for permmissions caching."""
487
721
 
@@ -489,15 +723,8 @@ ACCESS_CACHE = "invenio_cache:current_cache"
489
723
  # ==============
490
724
  # See https://invenio-search.readthedocs.io/en/latest/configuration.html
491
725
 
492
- SEARCH_ELASTIC_HOSTS = [{"host": "localhost", "port": 9200}]
493
- """Elasticsearch hosts."""
494
-
495
- # Invenio-Indexer
496
- # ===============
497
- # See https://invenio-indexer.readthedocs.io/en/latest/configuration.html
498
-
499
- INDEXER_DEFAULT_INDEX = "rdmrecords-records-record-v4.0.0"
500
- """Default index to use if no schema is defined."""
726
+ SEARCH_HOSTS = [{"host": "localhost", "port": 9200}]
727
+ """Search hosts."""
501
728
 
502
729
  # Invenio-Base
503
730
  # ============
@@ -506,61 +733,84 @@ INDEXER_DEFAULT_INDEX = "rdmrecords-records-record-v4.0.0"
506
733
  WSGI_PROXIES = 2
507
734
  """Correct number of proxies in front of your application."""
508
735
 
509
- # Invenio-Admin
510
- # =============
511
-
512
- # Admin interface is deprecated and should not be used.
513
- ADMIN_PERMISSION_FACTORY = 'invenio_app_rdm.admin.permission_factory'
514
-
515
736
  # Invenio-REST
516
- # ------------
737
+ # ============
738
+
517
739
  REST_CSRF_ENABLED = True
518
- # TODO: remove when https://github.com/inveniosoftware/invenio-rest/issues/125
519
- # is solved
520
- CSRF_HEADER = "X-CSRFToken"
521
740
 
522
741
  # Invenio-Vocabularies
523
- # =============
742
+ # ====================
524
743
 
525
744
  VOCABULARIES_DATASTREAM_READERS = {
526
745
  **VOCABULARIES_DATASTREAM_READERS,
527
746
  **NAMES_READERS,
747
+ **COMMON_OPENAIRE_READERS,
748
+ **COMMON_ROR_READERS,
749
+ **AWARDS_READERS,
750
+ **FUNDERS_READERS,
751
+ **AFFILIATIONS_READERS,
752
+ **SUBJECTS_READERS,
528
753
  }
529
754
  """Data Streams readers."""
530
755
 
531
756
  VOCABULARIES_DATASTREAM_TRANSFORMERS = {
532
757
  **VOCABULARIES_DATASTREAM_TRANSFORMERS,
533
758
  **NAMES_TRANSFORMERS,
759
+ **COMMON_OPENAIRE_TRANSFORMERS,
760
+ **COMMON_ROR_TRANSFORMERS,
761
+ **AWARDS_TRANSFORMERS,
762
+ **FUNDERS_TRANSFORMERS,
763
+ **AFFILIATIONS_TRANSFORMERS,
764
+ **SUBJECTS_TRANSFORMERS,
534
765
  }
535
766
  """Data Streams transformers."""
536
767
 
537
768
  VOCABULARIES_DATASTREAM_WRITERS = {
538
769
  **VOCABULARIES_DATASTREAM_WRITERS,
539
770
  **NAMES_WRITERS,
771
+ **FUNDERS_WRITERS,
772
+ **AWARDS_WRITERS,
773
+ **AFFILIATIONS_WRITERS,
774
+ **COMMON_OPENAIRE_WRITERS,
775
+ **COMMON_ROR_WRITERS,
776
+ **SUBJECTS_WRITERS,
540
777
  }
541
778
  """Data Streams writers."""
542
779
 
543
780
  # Invenio-APP-RDM
544
781
  # ===============
545
782
 
546
- SEARCH_UI_SEARCH_TEMPLATE = 'invenio_app_rdm/records/search.html'
547
- """Search page's base template."""
783
+ SEARCH_UI_SEARCH_TEMPLATE = "invenio_app_rdm/records/search.html"
784
+ """Search page's base template.
548
785
 
549
- _DASHBOARD_ROUTES = ["uploads", "communities", "requests"]
786
+ Previous invenio-search-ui, now is picked by the instance records/ext.py.
787
+ """
788
+
789
+ APP_RDM_DEPOSIT_FORM_TEMPLATE = "invenio_app_rdm/records/deposit.html"
790
+ """Deposit page's form template."""
791
+
792
+ APP_RDM_USER_DASHBOARD_ROUTES = {
793
+ "uploads": "/me/uploads",
794
+ "communities": "/me/communities",
795
+ "requests": "/me/requests",
796
+ }
550
797
 
551
798
  APP_RDM_ROUTES = {
552
799
  "index": "/",
800
+ "robots": "/robots.txt",
553
801
  "help_search": "/help/search",
554
- "record_search": "/search2",
802
+ "help_statistics": "/help/statistics",
803
+ "help_versioning": "/help/versioning",
804
+ "record_search": "/search",
555
805
  "record_detail": "/records/<pid_value>",
556
806
  "record_export": "/records/<pid_value>/export/<export_format>",
557
807
  "record_file_preview": "/records/<pid_value>/preview/<path:filename>",
558
808
  "record_file_download": "/records/<pid_value>/files/<path:filename>",
809
+ "record_thumbnail": "/records/<pid_value>/thumb<int:size>",
810
+ "record_media_file_download": "/records/<pid_value>/media-files/<path:filename>",
559
811
  "record_from_pid": "/<any({schemes}):pid_scheme>/<path:pid_value>",
560
812
  "record_latest": "/records/<pid_value>/latest",
561
813
  "dashboard_home": "/me",
562
- "dashboard_item": "/me/<any({routes}):dashboard_name>".format(
563
- routes=",".join(_DASHBOARD_ROUTES)),
564
814
  "deposit_create": "/uploads/new",
565
815
  "deposit_edit": "/uploads/<pid_value>",
566
816
  }
@@ -569,51 +819,145 @@ APP_RDM_RECORD_EXPORTERS = {
569
819
  "json": {
570
820
  "name": _("JSON"),
571
821
  "serializer": ("flask_resources.serializers:JSONSerializer"),
822
+ "params": {"options": {"indent": 2, "sort_keys": True}},
572
823
  "content-type": "application/json",
573
- "filename": "{id}.json"
824
+ "filename": "{id}.json",
825
+ },
826
+ "json-ld": {
827
+ "name": _("JSON-LD"),
828
+ "serializer": (
829
+ "invenio_rdm_records.resources.serializers:SchemaorgJSONLDSerializer"
830
+ ),
831
+ "content-type": "application/ld+json",
832
+ "filename": "{id}.json",
574
833
  },
575
834
  "csl": {
576
835
  "name": _("CSL"),
577
- "serializer": ("invenio_rdm_records.resources.serializers:"
578
- "CSLJSONSerializer"),
836
+ "serializer": ("invenio_rdm_records.resources.serializers:CSLJSONSerializer"),
837
+ "params": {"options": {"indent": 2, "sort_keys": True}},
579
838
  "content-type": "application/vnd.citationstyles.csl+json",
580
- "filename": "{id}.json"
839
+ "filename": "{id}.json",
581
840
  },
582
841
  "datacite-json": {
583
842
  "name": _("DataCite JSON"),
584
- "serializer": ("invenio_rdm_records.resources.serializers:"
585
- "DataCite43JSONSerializer"),
843
+ "serializer": (
844
+ "invenio_rdm_records.resources.serializers:DataCite45JSONSerializer"
845
+ ),
846
+ "params": {"options": {"indent": 2, "sort_keys": True}},
586
847
  "content-type": "application/vnd.datacite.datacite+json",
587
- "filename": "{id}.json"
848
+ "filename": "{id}.json",
588
849
  },
589
850
  "datacite-xml": {
590
851
  "name": _("DataCite XML"),
591
- "serializer": ("invenio_rdm_records.resources.serializers:"
592
- "DataCite43XMLSerializer"),
593
- "content-type": "application/vnd.datacite.datacite+json",
594
- "filename": "{id}.xml"
852
+ "serializer": (
853
+ "invenio_rdm_records.resources.serializers:DataCite45XMLSerializer"
854
+ ),
855
+ "params": {},
856
+ "content-type": "application/vnd.datacite.datacite+xml",
857
+ "filename": "{id}.xml",
595
858
  },
596
859
  "dublincore": {
597
860
  "name": _("Dublin Core XML"),
598
- "serializer": ("invenio_rdm_records.resources.serializers:"
599
- "DublinCoreXMLSerializer"),
861
+ "serializer": (
862
+ "invenio_rdm_records.resources.serializers:DublinCoreXMLSerializer"
863
+ ),
864
+ "params": {},
600
865
  "content-type": "application/x-dc+xml",
601
- "filename": "{id}.xml"
866
+ "filename": "{id}.xml",
867
+ },
868
+ "marcxml": {
869
+ "name": _("MARCXML"),
870
+ "serializer": ("invenio_rdm_records.resources.serializers:MARCXMLSerializer"),
871
+ "params": {},
872
+ "content-type": "application/marcxml+xml",
873
+ "filename": "{id}.xml",
874
+ },
875
+ "bibtex": {
876
+ "name": _("BibTeX"),
877
+ "serializer": ("invenio_rdm_records.resources.serializers:BibtexSerializer"),
878
+ "params": {},
879
+ "content-type": "application/x-bibtex",
880
+ "filename": "{id}.bib",
881
+ },
882
+ "geojson": {
883
+ "name": _("GeoJSON"),
884
+ "serializer": ("invenio_rdm_records.resources.serializers:GeoJSONSerializer"),
885
+ "params": {"options": {"indent": 2, "sort_keys": True}},
886
+ "content-type": "application/vnd.geo+json",
887
+ "filename": "{id}.geojson",
888
+ },
889
+ "dcat-ap": {
890
+ "name": _("DCAT"),
891
+ "serializer": "invenio_rdm_records.resources.serializers:DCATSerializer",
892
+ "params": {},
893
+ "content-type": "application/dcat+xml",
894
+ "filename": "{id}.xml",
895
+ },
896
+ "codemeta": {
897
+ "name": _("Codemeta"),
898
+ "serializer": "invenio_rdm_records.resources.serializers:CodemetaSerializer",
899
+ "params": {},
900
+ "content-type": "application/ld+json",
901
+ "filename": "{id}.json",
902
+ },
903
+ "cff": {
904
+ "name": _("Citation File Format"),
905
+ "serializer": "invenio_rdm_records.resources.serializers:CFFSerializer",
906
+ "params": {},
907
+ "content-type": "application/x-yaml",
908
+ "filename": "{id}.yaml",
909
+ },
910
+ "datapackage": {
911
+ "name": _("Data Package JSON"),
912
+ "serializer": "invenio_rdm_records.resources.serializers:DataPackageSerializer",
913
+ "params": {},
914
+ "content-type": "application/ld+json",
915
+ "filename": "{id}.json",
602
916
  },
603
917
  }
604
918
 
919
+ APP_RDM_RECORD_LANDING_PAGE_EXTERNAL_LINKS = []
920
+ """ Default format used for adding badges to a record.
921
+
922
+ Make sure the 'render' field points to a valid render function in invenio_app_rdm.records_ui.utils.
923
+ Example implementation can also be found in invenio_app_rdm.records_ui.utils.
924
+
925
+ APP_RDM_RECORD_LANDING_PAGE_EXTERNAL_LINKS = [
926
+ {
927
+ "id": "github",
928
+ "render": github_link_render,
929
+ },
930
+ {
931
+ "id": "openaire",
932
+ "render": openaire_link_render,
933
+ },
934
+ }
935
+
936
+ def github_link_render(record):
937
+ ...
938
+ """
939
+
605
940
  APP_RDM_RECORDS_EXPORT_URL = "/records/<pid_value>/export/<export_format>"
606
941
 
942
+ APP_RDM_DEPOSIT_NG_FILES_UI_ENABLED = False
943
+ """
944
+ Feature toggle to enable the next-generation (NG) file uploader UI in the deposit form.
945
+
946
+ When enabled, the deposit form will use the new Uppy.io-based file uploader, replacing the current file upload interface.
947
+ """
948
+
607
949
  APP_RDM_DEPOSIT_FORM_DEFAULTS = {
608
950
  "publication_date": lambda: datetime.now().strftime("%Y-%m-%d"),
609
951
  "rights": [
610
952
  {
611
953
  "id": "cc-by-4.0",
612
954
  "title": "Creative Commons Attribution 4.0 International",
613
- "description": ("The Creative Commons Attribution license allows "
614
- "re-distribution and re-use of a licensed work "
615
- "on the condition that the creator is "
616
- "appropriately credited."),
955
+ "description": (
956
+ "The Creative Commons Attribution license allows "
957
+ "re-distribution and re-use of a licensed work "
958
+ "on the condition that the creator is "
959
+ "appropriately credited."
960
+ ),
617
961
  "link": "https://creativecommons.org/licenses/by/4.0/legalcode",
618
962
  }
619
963
  ],
@@ -627,7 +971,7 @@ If the value is callable, its return value will be used for the field
627
971
  (e.g. lambda/function for dynamic calculation of values).
628
972
  """
629
973
 
630
- APP_RDM_DEPOSIT_FORM_AUTOCOMPLETE_NAMES = 'search'
974
+ APP_RDM_DEPOSIT_FORM_AUTOCOMPLETE_NAMES = "search"
631
975
  """Behavior for autocomplete names search field for creators/contributors.
632
976
 
633
977
  Available options:
@@ -638,42 +982,588 @@ Available options:
638
982
  - ``off``: Only show person form (no search field).
639
983
  """
640
984
 
641
- RDM_CITATION_STYLES = [
642
- ('apa', _('APA')),
643
- ('harvard-cite-them-right', _('Harvard')),
644
- ('modern-language-association', _('MLA')),
645
- ('vancouver', _('Vancouver')),
646
- ('chicago-fullnote-bibliography', _('Chicago')),
647
- ('ieee', _('IEEE')),
648
- ]
649
- """List of citation style """
985
+ APP_RDM_DEPOSIT_FORM_QUOTA = {
986
+ "maxFiles": 100,
987
+ "maxStorage": FILES_REST_DEFAULT_QUOTA_SIZE,
988
+ }
989
+ """Deposit file upload quota """
650
990
 
651
- RDM_CITATION_STYLES_DEFAULT = 'apa'
652
- """Default citation style"""
991
+ APP_RDM_DISPLAY_DECIMAL_FILE_SIZES = True
992
+ """Display the file sizes in powers of 1000 (KB, ...) or 1024 (KiB, ...)."""
993
+
994
+ APP_RDM_DEPOSIT_FORM_PUBLISH_MODAL_EXTRA = ""
995
+ """Additional text/html to be displayed in the publish and submit for review modal."""
996
+
997
+ APP_RDM_RECORD_LANDING_PAGE_TEMPLATE = "invenio_app_rdm/records/detail.html"
998
+
999
+ APP_RDM_RECORD_LANDING_PAGE_FAIR_SIGNPOSTING_LEVEL_1_ENABLED = False
1000
+
1001
+ APP_RDM_RECORD_THUMBNAIL_SIZES = [10, 50, 100, 250, 750, 1200]
1002
+ """Allowed record thumbnail sizes."""
653
1003
 
654
1004
  APP_RDM_DETAIL_SIDE_BAR_TEMPLATES = [
655
1005
  "invenio_app_rdm/records/details/side_bar/manage_menu.html",
656
1006
  "invenio_app_rdm/records/details/side_bar/metrics.html",
657
1007
  "invenio_app_rdm/records/details/side_bar/versions.html",
1008
+ "invenio_app_rdm/records/details/side_bar/external_resources.html",
1009
+ "invenio_app_rdm/records/details/side_bar/communities.html",
658
1010
  "invenio_app_rdm/records/details/side_bar/keywords_subjects.html",
659
1011
  "invenio_app_rdm/records/details/side_bar/details.html",
1012
+ "invenio_app_rdm/records/details/side_bar/locations.html",
660
1013
  "invenio_app_rdm/records/details/side_bar/licenses.html",
1014
+ "invenio_app_rdm/records/details/side_bar/citations.html",
661
1015
  "invenio_app_rdm/records/details/side_bar/export.html",
1016
+ "invenio_app_rdm/records/details/side_bar/technical_metadata.html",
662
1017
  ]
663
1018
  """Template names for detail view sidebar components"""
664
1019
 
1020
+ APP_RDM_FILES_INTEGRITY_REPORT_TEMPLATE = (
1021
+ "invenio_app_rdm/files_integrity_report/email/files_integrity_report.html"
1022
+ )
1023
+ """Files integrity report template"""
1024
+
1025
+ APP_RDM_FILES_INTEGRITY_REPORT_SUBJECT = "Files integrity report"
1026
+ """Files integrity report subject"""
1027
+
1028
+ APP_RDM_ADMIN_EMAIL_RECIPIENT = "info@inveniosoftware.org"
1029
+ """Admin e-mail"""
1030
+
1031
+ APP_RDM_IDENTIFIER_SCHEMES_UI = {
1032
+ "orcid": {
1033
+ "url_prefix": "http://orcid.org/",
1034
+ "icon": "images/orcid.svg",
1035
+ "label": "ORCID",
1036
+ },
1037
+ "ror": {
1038
+ "url_prefix": "https://ror.org/",
1039
+ "icon": "images/ror-icon.svg",
1040
+ "label": "ROR",
1041
+ },
1042
+ "gnd": {
1043
+ "url_prefix": "http://d-nb.info/gnd/",
1044
+ "icon": "images/gnd-icon.svg",
1045
+ "label": "GND",
1046
+ },
1047
+ }
1048
+ """Identifier Schemes UI config"""
1049
+
1050
+ # Invenio-Communities
1051
+ # ===================
1052
+
1053
+ COMMUNITIES_SERVICE_COMPONENTS = CommunityServiceComponents
1054
+
1055
+ COMMUNITIES_ERROR_HANDLERS = {
1056
+ **community_error_handlers,
1057
+ InvalidCommunityVisibility: create_error_handler(
1058
+ lambda e: HTTPJSONException(
1059
+ code=400,
1060
+ description=e.reason,
1061
+ )
1062
+ ),
1063
+ }
1064
+
1065
+ COMMUNITIES_RECORDS_SEARCH = {
1066
+ "facets": ["access_status", "resource_type", "language"],
1067
+ "sort": ["bestmatch", "newest", "oldest", "version"],
1068
+ }
1069
+ """Community requests search configuration (i.e list of community requests)"""
1070
+
1071
+ COMMUNITIES_SHOW_BROWSE_MENU_ENTRY = False
1072
+ """Toggle to show or hide the 'Browse' menu entry for communities."""
1073
+
1074
+ # Invenio-RDM-Records
1075
+ # ===================
1076
+
1077
+ RDM_REQUESTS_ROUTES = {
1078
+ "user-dashboard-request-details": "/me/requests/<uuid:request_pid_value>",
1079
+ "community-dashboard-request-details": "/communities/<pid_value>/requests/<uuid:request_pid_value>",
1080
+ "community-dashboard-invitation-details": "/communities/<pid_value>/invitations/<uuid:request_pid_value>",
1081
+ }
1082
+
1083
+ RDM_COMMUNITIES_ROUTES = {
1084
+ "community-detail": "/communities/<pid_value>/records",
1085
+ "community-home": "/communities/<pid_value>/",
1086
+ "community-browse": "/communities/<pid_value>/browse",
1087
+ "community-static-page": "/communities/<pid_value>/pages/<path:page_slug>",
1088
+ "community-collection": "/communities/<pid_value>/collections/<tree_slug>/<collection_slug>",
1089
+ }
1090
+
665
1091
  RDM_SEARCH_USER_COMMUNITIES = {
666
- 'facets': ['visibility', 'type'],
667
- 'sort': ['bestmatch', 'newest', 'oldest'],
1092
+ "facets": ["visibility", "type"],
1093
+ "sort": ["bestmatch", "newest", "oldest"],
668
1094
  }
669
1095
  """User communities search configuration (i.e list of user communities)"""
670
1096
 
671
1097
  RDM_SEARCH_USER_REQUESTS = {
672
- 'facets': ['type', 'status'],
673
- 'sort': ['bestmatch', 'newest', 'oldest'],
1098
+ "facets": ["type", "status"],
1099
+ "sort": ["bestmatch", "newest", "oldest", "newestactivity", "oldestactivity"],
674
1100
  }
675
1101
  """User requests search configuration (i.e list of user requests)"""
676
1102
 
677
- RDM_REQUESTS_ROUTES = {
678
- 'user-dashboard-community-submission': '/me/requests/<pid_value>',
1103
+ # citation
1104
+
1105
+ RDM_CITATION_STYLES = [
1106
+ ("apa", _("APA")),
1107
+ ("harvard-cite-them-right", _("Harvard")),
1108
+ ("modern-language-association", _("MLA")),
1109
+ ("vancouver", _("Vancouver")),
1110
+ ("chicago-fullnote-bibliography", _("Chicago")),
1111
+ ("ieee", _("IEEE")),
1112
+ ]
1113
+ """List of citation style """
1114
+
1115
+ RDM_CITATION_STYLES_DEFAULT = "apa"
1116
+ """Default citation style"""
1117
+
1118
+ # Invenio-IIIF
1119
+ # ============
1120
+ # See https://invenio-iiif.readthedocs.io/en/latest/configuration.html
1121
+
1122
+ IIIF_PREVIEW_TEMPLATE = "invenio_app_rdm/records/iiif_preview.html"
1123
+ """Template for IIIF image preview."""
1124
+
1125
+ IIIF_API_DECORATOR_HANDLER = None
1126
+
1127
+ IIIF_SIMPLE_PREVIEWER_NATIVE_EXTENSIONS = ["gif", "png"]
1128
+ """Images are converted to JPEG for preview, unless listed here."""
1129
+
1130
+ IIIF_SIMPLE_PREVIEWER_SIZE = "!800,800"
1131
+ """Size of image in IIIF preview window. Must be a valid IIIF Image API size parameter."""
1132
+
1133
+ IIIF_FORMATS = {
1134
+ "pdf": "application/pdf",
1135
+ "gif": "image/gif",
1136
+ "jp2": "image/jp2",
1137
+ "jpeg": "image/jpeg",
1138
+ "jpg": "image/jpeg",
1139
+ "png": "image/png",
1140
+ "tif": "image/tiff",
1141
+ "tiff": "image/tiff",
1142
+ }
1143
+ """Controls which formats are supported by the Flask-IIIF server."""
1144
+
1145
+ IIIF_FORMATS_PIL_MAP = {
1146
+ "gif": "gif",
1147
+ "jp2": "jpeg2000",
1148
+ "jpeg": "jpeg",
1149
+ "jpg": "jpeg",
1150
+ "png": "png",
1151
+ "tif": "tiff",
1152
+ "tiff": "tiff",
1153
+ }
1154
+ """Mapping of IIIF formats to PIL-compatible formats."""
1155
+
1156
+ # Invenio-Previewer
1157
+ # =================
1158
+ # See https://github.com/inveniosoftware/invenio-previewer/blob/master/invenio_previewer/config.py # noqa
1159
+
1160
+ PREVIEWER_PREFERENCE = [
1161
+ "csv_papaparsejs",
1162
+ "pdfjs",
1163
+ "iiif_simple",
1164
+ "simple_image",
1165
+ "json_prismjs",
1166
+ "xml_prismjs",
1167
+ "mistune",
1168
+ "video_videojs",
1169
+ "audio_videojs",
1170
+ "ipynb",
1171
+ "zip",
1172
+ "txt",
1173
+ ]
1174
+ """Preferred previewers."""
1175
+
1176
+ PREVIEWER_ABSTRACT_TEMPLATE = "invenio_previewer/rdm_abstract_previewer.html"
1177
+ """Override the abstract template with an RDM-specific one."""
1178
+
1179
+ RECORDS_RESOURCES_IMAGE_FORMATS = ["." + ext for ext in IIIF_FORMATS.keys()]
1180
+ """RECORDS_RESOURCES_IMAGE_FORMATS must contain all possible IIIF formats to ensure their metadata is extracted."""
1181
+
1182
+ # Invenio-Pages
1183
+ # =============
1184
+ # See https://invenio-pages.readthedocs.io/en/latest/configuration.html
1185
+
1186
+ PAGES_DEFAULT_TEMPLATE = "invenio_app_rdm/default_static_page.html"
1187
+ """Default template to render."""
1188
+
1189
+ PAGES_TEMPLATES = [
1190
+ ("invenio_app_rdm/default_static_page.html", "Default"),
1191
+ ("invenio_communities/default_static_page.html", "Community"),
1192
+ ]
1193
+ """List of available templates for pages."""
1194
+
1195
+ APP_RDM_PAGES = {}
1196
+ """Register static pages with predefined initial content from 'pages.yaml' file.
1197
+
1198
+ Example:
1199
+ {
1200
+ "about": "/about",
1201
+ "terms": "/terms",
1202
+ "privacy-policy": "/privacy-policy",
1203
+ }
1204
+ """
1205
+
1206
+ # Invenio-Stats
1207
+ # =============
1208
+ # See https://invenio-stats.readthedocs.io/en/latest/configuration.html
1209
+
1210
+
1211
+ STATS_EVENTS = {
1212
+ "file-download": {
1213
+ "templates": "invenio_rdm_records.records.stats.templates.events.file_download",
1214
+ "event_builders": [
1215
+ "invenio_rdm_records.resources.stats.file_download_event_builder",
1216
+ "invenio_rdm_records.resources.stats.check_if_via_api",
1217
+ ],
1218
+ "cls": EventsIndexer,
1219
+ "params": {
1220
+ "preprocessors": [
1221
+ filter_robots,
1222
+ flag_machines,
1223
+ anonymize_user,
1224
+ build_file_unique_id,
1225
+ ]
1226
+ },
1227
+ },
1228
+ "record-view": {
1229
+ "templates": "invenio_rdm_records.records.stats.templates.events.record_view",
1230
+ "event_builders": [
1231
+ "invenio_rdm_records.resources.stats.record_view_event_builder",
1232
+ "invenio_rdm_records.resources.stats.check_if_via_api",
1233
+ "invenio_rdm_records.resources.stats.drop_if_via_api",
1234
+ ],
1235
+ "cls": EventsIndexer,
1236
+ "params": {
1237
+ "preprocessors": [
1238
+ filter_robots,
1239
+ flag_machines,
1240
+ anonymize_user,
1241
+ build_record_unique_id,
1242
+ ],
1243
+ },
1244
+ },
1245
+ }
1246
+
1247
+ STATS_AGGREGATIONS = {
1248
+ "file-download-agg": {
1249
+ "templates": "invenio_rdm_records.records.stats.templates.aggregations.aggr_file_download",
1250
+ "cls": StatAggregator,
1251
+ "params": {
1252
+ "event": "file-download",
1253
+ "field": "unique_id",
1254
+ "interval": "day",
1255
+ "index_interval": "month",
1256
+ "copy_fields": {
1257
+ "file_id": "file_id",
1258
+ "file_key": "file_key",
1259
+ "bucket_id": "bucket_id",
1260
+ "recid": "recid",
1261
+ "parent_recid": "parent_recid",
1262
+ },
1263
+ "metric_fields": {
1264
+ "unique_count": (
1265
+ "cardinality",
1266
+ "unique_session_id",
1267
+ {"precision_threshold": 1000},
1268
+ ),
1269
+ "volume": ("sum", "size", {}),
1270
+ },
1271
+ },
1272
+ },
1273
+ "record-view-agg": {
1274
+ "templates": "invenio_rdm_records.records.stats.templates.aggregations.aggr_record_view",
1275
+ "cls": StatAggregator,
1276
+ "params": {
1277
+ "event": "record-view",
1278
+ "field": "unique_id",
1279
+ "interval": "day",
1280
+ "index_interval": "month",
1281
+ "copy_fields": {
1282
+ "recid": "recid",
1283
+ "parent_recid": "parent_recid",
1284
+ "via_api": "via_api",
1285
+ },
1286
+ "metric_fields": {
1287
+ "unique_count": (
1288
+ "cardinality",
1289
+ "unique_session_id",
1290
+ {"precision_threshold": 1000},
1291
+ ),
1292
+ },
1293
+ "query_modifiers": [lambda query, **_: query.filter("term", via_api=False)],
1294
+ },
1295
+ },
1296
+ }
1297
+
1298
+ STATS_QUERIES = {
1299
+ "record-view": {
1300
+ "cls": TermsQuery,
1301
+ "permission_factory": None,
1302
+ "params": {
1303
+ "index": "stats-record-view",
1304
+ "doc_type": "record-view-day-aggregation",
1305
+ "copy_fields": {
1306
+ "recid": "recid",
1307
+ "parent_recid": "parent_recid",
1308
+ },
1309
+ "query_modifiers": [],
1310
+ "required_filters": {
1311
+ "recid": "recid",
1312
+ },
1313
+ "metric_fields": {
1314
+ "views": ("sum", "count", {}),
1315
+ "unique_views": ("sum", "unique_count", {}),
1316
+ },
1317
+ },
1318
+ },
1319
+ "record-view-all-versions": {
1320
+ "cls": TermsQuery,
1321
+ "permission_factory": None,
1322
+ "params": {
1323
+ "index": "stats-record-view",
1324
+ "doc_type": "record-view-day-aggregation",
1325
+ "copy_fields": {
1326
+ "parent_recid": "parent_recid",
1327
+ },
1328
+ "query_modifiers": [],
1329
+ "required_filters": {
1330
+ "parent_recid": "parent_recid",
1331
+ },
1332
+ "metric_fields": {
1333
+ "views": ("sum", "count", {}),
1334
+ "unique_views": ("sum", "unique_count", {}),
1335
+ },
1336
+ },
1337
+ },
1338
+ "record-download": {
1339
+ "cls": TermsQuery,
1340
+ "permission_factory": None,
1341
+ "params": {
1342
+ "index": "stats-file-download",
1343
+ "doc_type": "file-download-day-aggregation",
1344
+ "copy_fields": {
1345
+ "recid": "recid",
1346
+ "parent_recid": "parent_recid",
1347
+ },
1348
+ "query_modifiers": [],
1349
+ "required_filters": {
1350
+ "recid": "recid",
1351
+ },
1352
+ "metric_fields": {
1353
+ "downloads": ("sum", "count", {}),
1354
+ "unique_downloads": ("sum", "unique_count", {}),
1355
+ "data_volume": ("sum", "volume", {}),
1356
+ },
1357
+ },
1358
+ },
1359
+ "record-download-all-versions": {
1360
+ "cls": TermsQuery,
1361
+ "permission_factory": None,
1362
+ "params": {
1363
+ "index": "stats-file-download",
1364
+ "doc_type": "file-download-day-aggregation",
1365
+ "copy_fields": {
1366
+ "parent_recid": "parent_recid",
1367
+ },
1368
+ "query_modifiers": [],
1369
+ "required_filters": {
1370
+ "parent_recid": "parent_recid",
1371
+ },
1372
+ "metric_fields": {
1373
+ "downloads": ("sum", "count", {}),
1374
+ "unique_downloads": ("sum", "unique_count", {}),
1375
+ "data_volume": ("sum", "volume", {}),
1376
+ },
1377
+ },
1378
+ },
1379
+ }
1380
+
1381
+ STATS_PERMISSION_FACTORY = permissions_policy_lookup_factory
1382
+
1383
+
1384
+ # Invenio-Notifications
1385
+ # =================
1386
+ # See https://github.com/inveniosoftware/invenio-notifications/blob/master/invenio_notifications/config.py # noqa
1387
+
1388
+
1389
+ NOTIFICATIONS_BACKENDS = {
1390
+ EmailNotificationBackend.id: EmailNotificationBackend(),
1391
+ }
1392
+ """Notification backends."""
1393
+
1394
+
1395
+ NOTIFICATIONS_BUILDERS = {
1396
+ # Access request
1397
+ GuestAccessRequestTokenCreateNotificationBuilder.type: GuestAccessRequestTokenCreateNotificationBuilder,
1398
+ GuestAccessRequestAcceptNotificationBuilder.type: GuestAccessRequestAcceptNotificationBuilder,
1399
+ GuestAccessRequestSubmitNotificationBuilder.type: GuestAccessRequestSubmitNotificationBuilder,
1400
+ GuestAccessRequestSubmittedNotificationBuilder.type: GuestAccessRequestSubmittedNotificationBuilder,
1401
+ GuestAccessRequestCancelNotificationBuilder.type: GuestAccessRequestCancelNotificationBuilder,
1402
+ GuestAccessRequestDeclineNotificationBuilder.type: GuestAccessRequestDeclineNotificationBuilder,
1403
+ UserAccessRequestAcceptNotificationBuilder.type: UserAccessRequestAcceptNotificationBuilder,
1404
+ UserAccessRequestSubmitNotificationBuilder.type: UserAccessRequestSubmitNotificationBuilder,
1405
+ UserAccessRequestDeclineNotificationBuilder.type: UserAccessRequestDeclineNotificationBuilder,
1406
+ UserAccessRequestCancelNotificationBuilder.type: UserAccessRequestCancelNotificationBuilder,
1407
+ # Grant user access
1408
+ GrantUserAccessNotificationBuilder.type: GrantUserAccessNotificationBuilder,
1409
+ # Comment request event
1410
+ CommentRequestEventCreateNotificationBuilder.type: CommentRequestEventCreateNotificationBuilder,
1411
+ CommentRequestEventReplyNotificationBuilder.type: CommentRequestEventReplyNotificationBuilder,
1412
+ community_notifications.SubComReqCommentNotificationBuilder.type: community_notifications.SubComReqCommentNotificationBuilder,
1413
+ community_notifications.SubComInvCommentNotificationBuilder.type: community_notifications.SubComInvCommentNotificationBuilder,
1414
+ # Community inclusion
1415
+ CommunityInclusionAcceptNotificationBuilder.type: CommunityInclusionAcceptNotificationBuilder,
1416
+ CommunityInclusionCancelNotificationBuilder.type: CommunityInclusionCancelNotificationBuilder,
1417
+ CommunityInclusionDeclineNotificationBuilder.type: CommunityInclusionDeclineNotificationBuilder,
1418
+ CommunityInclusionExpireNotificationBuilder.type: CommunityInclusionExpireNotificationBuilder,
1419
+ CommunityInclusionSubmittedNotificationBuilder.type: CommunityInclusionSubmittedNotificationBuilder,
1420
+ # Community invitation
1421
+ CommunityInvitationAcceptNotificationBuilder.type: CommunityInvitationAcceptNotificationBuilder,
1422
+ CommunityInvitationCancelNotificationBuilder.type: CommunityInvitationCancelNotificationBuilder,
1423
+ CommunityInvitationDeclineNotificationBuilder.type: CommunityInvitationDeclineNotificationBuilder,
1424
+ CommunityInvitationExpireNotificationBuilder.type: CommunityInvitationExpireNotificationBuilder,
1425
+ CommunityInvitationSubmittedNotificationBuilder.type: CommunityInvitationSubmittedNotificationBuilder,
1426
+ # Subcommunity request
1427
+ community_notifications.SubCommunityCreate.type: community_notifications.SubCommunityCreate,
1428
+ community_notifications.SubCommunityAccept.type: community_notifications.SubCommunityAccept,
1429
+ community_notifications.SubCommunityDecline.type: community_notifications.SubCommunityDecline,
1430
+ # Subcommunity invitation request
1431
+ community_notifications.SubComInvitationCreate.type: community_notifications.SubComInvitationCreate,
1432
+ community_notifications.SubComInvitationAccept.type: community_notifications.SubComInvitationAccept,
1433
+ community_notifications.SubComInvitationDecline.type: community_notifications.SubComInvitationDecline,
1434
+ community_notifications.SubComInvitationExpire.type: community_notifications.SubComInvitationExpire,
1435
+ # Record deletion
1436
+ RecordDeletionAcceptNotificationBuilder.type: RecordDeletionAcceptNotificationBuilder,
1437
+ RecordDeletionDeclineNotificationBuilder.type: RecordDeletionDeclineNotificationBuilder,
1438
+ }
1439
+ """Notification builders."""
1440
+
1441
+
1442
+ NOTIFICATIONS_ENTITY_RESOLVERS = [
1443
+ EmailResolver(),
1444
+ RDMRecordServiceResultResolver(),
1445
+ ServiceResultResolver(service_id="users", type_key="user"),
1446
+ ServiceResultResolver(service_id="communities", type_key="community"),
1447
+ ServiceResultResolver(service_id="requests", type_key="request"),
1448
+ ServiceResultResolver(service_id="request_events", type_key="request_event"),
1449
+ ServiceResultResolver(service_id="groups", type_key="group"),
1450
+ ]
1451
+ """List of entity resolvers used by notification builders."""
1452
+
1453
+ NOTIFICATIONS_SETTINGS_VIEW_FUNCTION = notification_settings
1454
+ """View function for notification settings."""
1455
+
1456
+
1457
+ # Invenio-Users-Resources
1458
+ # =================
1459
+ # See https://github.com/inveniosoftware/invenio-users-resources/blob/master/invenio_users_resources/config.py # noqa
1460
+
1461
+
1462
+ USERS_RESOURCES_SERVICE_SCHEMA = NotificationsUserSchema
1463
+ """Schema used by the users service."""
1464
+
1465
+
1466
+ # Invenio-Requests
1467
+ # =================
1468
+ # See https://github.com/inveniosoftware/invenio-requests/blob/master/invenio_requests/config.py # noqa
1469
+
1470
+
1471
+ REQUESTS_PERMISSION_POLICY = RDMRequestsPermissionPolicy
1472
+ """The requests permission policy, extended to work with guest access requests."""
1473
+
1474
+
1475
+ REQUESTS_ERROR_HANDLERS = {
1476
+ **request_error_handlers,
1477
+ InvalidAccessRestrictions: create_error_handler(
1478
+ lambda e: HTTPJSONException(
1479
+ code=400,
1480
+ description=e.description,
1481
+ )
1482
+ ),
1483
+ }
1484
+
1485
+
1486
+ # Invenio-Github
1487
+ # =================
1488
+ #
1489
+ GITHUB_RELEASE_CLASS = RDMGithubRelease
1490
+ """Default RDM release class."""
1491
+
1492
+
1493
+ # Flask-Menu
1494
+ # ==========
1495
+ #
1496
+ USER_DASHBOARD_MENU_OVERRIDES = {}
1497
+ """Overrides for "dashboard" menu."""
1498
+
1499
+
1500
+ # Invenio-Administration
1501
+ # ======================
1502
+ #
1503
+ from invenio_app_rdm import __version__
1504
+
1505
+ ADMINISTRATION_DISPLAY_VERSIONS = [("invenio-app-rdm", f"v{__version__}")]
1506
+ """Show the InvenioRDM version in the administration panel."""
1507
+
1508
+ ADMINISTRATION_THEME_BASE_TEMPLATE = "invenio_app_rdm/administration_page.html"
1509
+ """Administration base template."""
1510
+
1511
+
1512
+ APP_RDM_SUBCOMMUNITIES_LABEL = "Subcommunities"
1513
+ """Label for the subcommunities in the community browse page."""
1514
+
1515
+ RDM_DETAIL_SIDE_BAR_MANAGE_ATTRIBUTES_EXTENSION_TEMPLATE = None
1516
+ """Side bar manage attributes extension template."""
1517
+
1518
+ # Invenio-Sitemap
1519
+ # ===============
1520
+ # See https://github.com/inveniosoftware/invenio-sitemap/blob/master/invenio_sitemap/config.py # noqa
1521
+ SITEMAP_SECTIONS = [
1522
+ SitemapSectionOfRDMRecords(),
1523
+ SitemapSectionOfCommunities(),
1524
+ ]
1525
+
1526
+
1527
+ # Moderation requests search configuration
1528
+ # ========================================
1529
+ APP_RDM_MODERATION_REQUEST_SEARCH = {
1530
+ "facets": ["status", "is_open"],
1531
+ "sort": ["bestmatch", "newest", "oldest", "newestactivity", "oldestactivity"],
1532
+ }
1533
+ """Moderation requests search configuration."""
1534
+
1535
+ APP_RDM_MODERATION_REQUEST_SORT_OPTIONS = {
1536
+ "bestmatch": dict(
1537
+ title=_("Best match"),
1538
+ fields=["_score"],
1539
+ ),
1540
+ "newest": dict(
1541
+ title=_("Newest"),
1542
+ fields=["-created"],
1543
+ ),
1544
+ "oldest": dict(
1545
+ title=_("Oldest"),
1546
+ fields=["created"],
1547
+ ),
1548
+ "newestactivity": dict(
1549
+ title=_("Newest activity"),
1550
+ fields=["-last_activity_at"],
1551
+ ),
1552
+ "oldestactivity": dict(
1553
+ title=_("Oldest activity"),
1554
+ fields=["last_activity_at"],
1555
+ ),
1556
+ }
1557
+ """Definitions of available record sort options."""
1558
+
1559
+
1560
+ APP_RDM_MODERATION_REQUEST_FACETS = {
1561
+ "status": {
1562
+ "facet": facets.status,
1563
+ "ui": {
1564
+ "field": "status",
1565
+ },
1566
+ },
1567
+ "is_open": {"facet": facets.is_open, "ui": {"field": "is_open"}},
679
1568
  }
1569
+ """Available facets defined for this module."""