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.
- invenio_app_rdm/__init__.py +13 -4
- invenio_app_rdm/administration/__init__.py +8 -0
- invenio_app_rdm/administration/audit_logs/__init__.py +12 -0
- invenio_app_rdm/administration/audit_logs/audit_logs.py +81 -0
- invenio_app_rdm/administration/domains/__init__.py +22 -0
- invenio_app_rdm/administration/domains/domains.py +159 -0
- invenio_app_rdm/administration/moderation/__init__.py +11 -0
- invenio_app_rdm/administration/moderation/requests.py +175 -0
- invenio_app_rdm/administration/records/__init__.py +15 -0
- invenio_app_rdm/administration/records/records.py +163 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/audit_logs.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/domains_search.html +13 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/records/drafts.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/records/records.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests_details.html +93 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/user_moderation.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/user_moderation_details.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/users_search.html +14 -0
- invenio_app_rdm/administration/user_moderation/__init__.py +11 -0
- invenio_app_rdm/administration/user_moderation/user_moderation.py +175 -0
- invenio_app_rdm/administration/users/__init__.py +12 -0
- invenio_app_rdm/administration/users/users.py +130 -0
- invenio_app_rdm/administration/views/__init__.py +11 -0
- invenio_app_rdm/administration/views/ui.py +21 -0
- invenio_app_rdm/cli.py +95 -0
- invenio_app_rdm/communities_ui/__init__.py +9 -0
- invenio_app_rdm/communities_ui/searchapp.py +27 -0
- invenio_app_rdm/communities_ui/sitemap.py +63 -0
- invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/collection.html +60 -0
- invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html +43 -0
- invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/details/browse/index.html +59 -0
- invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/records/index.html +24 -0
- invenio_app_rdm/communities_ui/views/__init__.py +13 -0
- invenio_app_rdm/communities_ui/views/communities.py +206 -0
- invenio_app_rdm/communities_ui/views/ui.py +93 -0
- invenio_app_rdm/config.py +1072 -182
- invenio_app_rdm/ext.py +157 -0
- invenio_app_rdm/fixtures/__init__.py +56 -0
- invenio_app_rdm/fixtures/data/oai_sets.yaml +6 -0
- invenio_app_rdm/fixtures/oai_sets.py +20 -0
- invenio_app_rdm/fixtures/pages/.gitkeep +1 -0
- invenio_app_rdm/fixtures/pages.py +76 -0
- invenio_app_rdm/records_ui/previewer/__init__.py +9 -0
- invenio_app_rdm/records_ui/previewer/iiif_simple.py +51 -0
- invenio_app_rdm/records_ui/searchapp.py +46 -232
- invenio_app_rdm/records_ui/sitemap.py +44 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html +63 -18
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html +316 -169
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/access-form.html +64 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html +4 -3
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/contact.html +2 -1
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/creatibutors.html +22 -20
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/description.html +7 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/details.html +299 -167
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/doi.html +3 -24
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/meta.html +36 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/citations.html +6 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html +34 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/details.html +20 -15
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/export.html +18 -41
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/external_resources.html +55 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/keywords_subjects.html +9 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +62 -49
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/locations.html +23 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html +33 -6
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/metrics.html +5 -9
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/technical_metadata.html +21 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/versions.html +15 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/stats.html +112 -90
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/subjects.html +21 -19
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/draft_not_found.html +17 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/export.html +3 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/iiif_preview.html +3 -7
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/creatibutors.html +69 -48
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html +234 -49
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/doi.html +36 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/files.html +170 -71
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/locations.html +62 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/stats_popup.html +21 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/version.html +3 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/restricted_with_doi_tombstone.html +33 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/search.html +3 -1
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/tombstone.html +55 -12
- invenio_app_rdm/records_ui/utils.py +127 -2
- invenio_app_rdm/records_ui/views/__init__.py +114 -38
- invenio_app_rdm/records_ui/views/decorators.py +395 -117
- invenio_app_rdm/records_ui/views/deposits.py +414 -104
- invenio_app_rdm/records_ui/views/filters.py +118 -11
- invenio_app_rdm/records_ui/views/records.py +395 -66
- invenio_app_rdm/redirector/__init__.py +8 -0
- invenio_app_rdm/redirector/resource.py +106 -0
- invenio_app_rdm/redirector/views.py +18 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-inclusion/index.html +14 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-invitation/community_dashboard.html +38 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-invitation/user_dashboard.html +26 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-submission/index.html +129 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/file-modification/index.html +88 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/guest-access-request/index.html +66 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/macros/request_header.html +78 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/record-deletion/index.html +95 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity/index.html +49 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity-invitation/index.html +49 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/user-access-request/index.html +59 -0
- invenio_app_rdm/requests_ui/views/__init__.py +1 -3
- invenio_app_rdm/requests_ui/views/requests.py +345 -53
- invenio_app_rdm/requests_ui/views/ui.py +38 -9
- invenio_app_rdm/tasks.py +45 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/AuditLogActions.js +136 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewJson.js +35 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js +119 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/index.js +31 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/SearchResultItemLayout.js +87 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/CompareRevisionsDropdown.js +89 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUser.js +92 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUserForm.js +199 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js +80 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaAction.js +109 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaForm.js +196 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/index.js +27 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/search/SearchResultItemLayout.js +185 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/search/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/drafts/index.js +32 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/CompareRevisions.js +129 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RecordActions.js +75 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RecordResourceActions.js +185 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RemovalReasonsSelect.js +85 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RestoreConfirmation.js +108 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/TombstoneForm.js +212 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/api.js +38 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js +30 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/index.js +40 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/AdministrationSearchLayout.js +56 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/RecordSearchLayout.js +84 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/SearchResultItemLayout.js +171 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/filters/DeletionStatusFilter.js +121 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/filters/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/index.js +10 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/RequestsSearchResultItem.js +79 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/RequestsSearchbarLayout.js +48 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/index.js +22 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/ModerationActions.js +103 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/index.js +29 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/SearchResultItemLayout.js +151 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/UserModerationBulkActions.js +0 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/UserModerationSearchLayout.js +56 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/index.js +10 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/UserActions.js +263 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/api.js +42 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/index.js +8 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/routes.js +38 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/index.js +30 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/SearchResultItemLayout.js +202 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/UserSearchLayout.js +81 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/filters/UserStatusFilterComponent.js +114 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/filters/index.js +1 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/index.js +10 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/collectionRecordsSearch/index.js +61 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchAppLayout.js +84 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchBarElement.js +44 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSingleSearchBarElement.js +46 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/components.js +3 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/index.js +66 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/CompactStats.js +52 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/CopyButton.js +61 -39
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/DisplayPartOfCommunities.js +78 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/DisplayVerifiedCommunity.js +54 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/FileModificationUntil.js +45 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion/DeletionModal.js +354 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion/DeletionRadioGroup.js +44 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion.js +81 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js +189 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +788 -307
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/ShareDraftButton.js +65 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/config.js +48 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/index.js +27 -13
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/frontpage/RecordsList.js +165 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/frontpage/index.js +23 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/AccessRequestForm.js +254 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagement.js +179 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagementDropdown.js +186 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/EditButton.js +30 -16
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ExportDropdown.js +68 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ManageButton.js +140 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ManageDefaultBrandingAction/ManageDefaultBrandingAction.js +129 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunitiesModal.js +63 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunitiesSearch.js +89 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunityRequestItem.js +33 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCitationField.js +68 -73
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesList.js +150 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesListModal.js +90 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesSearch.js +109 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesSearchItem.js +58 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/index.js +3 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitySubmission/RecordCommunitySubmissionModal.js +171 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordManagement.js +123 -43
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordVersionsList.js +143 -79
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RemoveFromCommunity/RemoveFromCommunityAction.js +188 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/AccessDropdown.js +93 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/CreateAccessLink.js +111 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchItem.js +170 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchResultContainer.js +236 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksTab.js +106 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessRequests/AccessRequestsTab.js +239 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/AccessUsersGroups.js +178 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/AddUserGroupAccessModal.js +172 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/GroupsTab.js +88 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/PeopleTab.js +88 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/UserGroupAccessSearchResultItem.js +158 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/{ShareButton.js → ShareOptions/ShareButton.js} +23 -6
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/ShareModal.js +252 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/api/api.js +39 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/access.js +24 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/index.js +92 -124
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/theme.js +131 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/overridableRegistry/index.js +13 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/overridableRegistry/mapping.js +12 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/AccessRequestExpiration.js +61 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/index.js +1 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineEdit.js +177 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineRead.js +50 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/overrides/TimelineFeedHeader.js +34 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/components.js +165 -299
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/index.js +48 -20
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/subcommunity/browse.js +28 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js +164 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/base.js +210 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/communities.js +56 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/requests.js +78 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads.js +210 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js +155 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js +154 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/utils.js +85 -74
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/file_uploader/uppy.less +37 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/creatibutors.less +26 -70
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/licenses.less +5 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/previewer/iiif_simple.less +16 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/form.overrides +170 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/form.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/grid.overrides +110 -17
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/grid.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/menu.overrides +395 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/menu.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.overrides +34 -8
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.variables +6 -9
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/table.overrides +185 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/table.variables +1 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/button.overrides +103 -15
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/button.variables +5 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/container.overrides +121 -13
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/container.variables +6 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/header.overrides +61 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/header.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/icon.overrides +29 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/icon.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/image.overrides +115 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/image.variables +4 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/input.overrides +50 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/input.variables +5 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/label.overrides +116 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/label.variables +0 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/list.overrides +68 -37
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/list.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/segment.overrides +80 -7
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/segment.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/reset.overrides +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/reset.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.overrides +557 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.variables +142 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/accordion.overrides +161 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/accordion.variables +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/checkbox.overrides +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/checkbox.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/dropdown.overrides +116 -12
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/dropdown.variables +4 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/modal.overrides +151 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/modal.variables +5 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.overrides +7 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.variables +0 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/tab.overrides +3 -23
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/tab.variables +3 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/transition.overrides +67 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/transition.variables +3 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/theme.less +71 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/card.overrides +168 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/card.variables +2 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/feed.overrides +463 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/feed.variables +1 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/item.overrides +164 -10
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/item.variables +0 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next.js +1 -1
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/_generatedTranslations.js +66 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/messages.po +951 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/translations.json +307 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/messages.po +895 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/messages.po +896 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/messages.po +961 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/translations.json +295 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/messages.po +897 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/messages.po +830 -160
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/translations.json +282 -88
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/messages.po +883 -4
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/translations.json +259 -65
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en/messages.po +1000 -5
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en/translations.json +290 -63
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/messages.po +960 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/messages.po +896 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/messages.po +895 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/messages.po +960 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/messages.po +901 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/translations.json +289 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/messages.po +952 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/index.js +17 -6
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/messages.po +905 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/messages.po +889 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/translations.json +277 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/messages.po +895 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ko/messages.po +889 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ko/translations.json +277 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/messages.po +907 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/translations.json +295 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/messages.po +895 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/messages.po +910 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/translations.json +295 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/messages.po +901 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/messages.po +908 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/translations.json +289 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/messages.po +958 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/translations.json +295 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/messages.po +908 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/translations.json +295 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/messages.po +951 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/messages.po +952 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/translations.json +283 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/messages.po +910 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/translations.json +295 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/messages.po +891 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/translations.json +277 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/messages.po +889 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/translations.json +277 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package.json +5 -8
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/translations.pot +872 -142
- invenio_app_rdm/theme/static/images/gnd-icon.svg +27 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/administration_page.html +19 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/default_static_page.html +33 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/files_integrity_report/email/files_integrity_report.html +31 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/footer.html +32 -79
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/frontpage.html +40 -57
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header.html +114 -76
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header_frontpage.html +16 -13
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header_login.html +151 -61
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.de.html +3 -3
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.en.html +12 -7
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.sv.html +254 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/statistics.en.html +197 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/statistics.sv.html +196 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/versioning.en.html +149 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/versioning.sv.html +143 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/intro_section.html +98 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/javascript.html +12 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/macros/records_list.html +50 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page.html +36 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page_cover.html +13 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/robots.txt +15 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/searchbar.html +63 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/settings/notifications.html +17 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/site_footer.html +29 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_communities/default_static_page.html +26 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_previewer/latest_record.html +18 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_previewer/rdm_abstract_previewer.html +30 -0
- invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/header.html +147 -0
- invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/site_footer.html +42 -0
- invenio_app_rdm/theme/views.py +106 -37
- invenio_app_rdm/theme/webpack.py +72 -36
- invenio_app_rdm/translations/ar/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ar/LC_MESSAGES/messages.po +1389 -0
- invenio_app_rdm/translations/bg/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/bg/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/ca/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ca/LC_MESSAGES/messages.po +1362 -0
- invenio_app_rdm/translations/cs/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/cs/LC_MESSAGES/messages.po +1398 -0
- invenio_app_rdm/translations/da/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/da/LC_MESSAGES/messages.po +1363 -0
- invenio_app_rdm/translations/de/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/de/LC_MESSAGES/messages.po +1085 -372
- invenio_app_rdm/translations/el/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/el/LC_MESSAGES/messages.po +987 -367
- invenio_app_rdm/translations/es/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/es/LC_MESSAGES/messages.po +1389 -0
- invenio_app_rdm/translations/et/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/et/LC_MESSAGES/messages.po +1364 -0
- invenio_app_rdm/translations/fa/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/fa/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/fr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/fr/LC_MESSAGES/messages.po +1390 -0
- invenio_app_rdm/translations/hr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/hr/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/hu/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/hu/LC_MESSAGES/messages.po +1402 -0
- invenio_app_rdm/translations/it/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/it/LC_MESSAGES/messages.po +1366 -0
- invenio_app_rdm/translations/ja/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ja/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/ka/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ka/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/ko/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ko/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/lt/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/lt/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/messages.pot +1046 -271
- invenio_app_rdm/translations/no/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/no/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/pl/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/pl/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/pt/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/pt/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/ro/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ro/LC_MESSAGES/messages.po +1391 -0
- invenio_app_rdm/translations/ru/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ru/LC_MESSAGES/messages.po +1384 -0
- invenio_app_rdm/translations/sk/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/sk/LC_MESSAGES/messages.po +1362 -0
- invenio_app_rdm/translations/sv/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/sv/LC_MESSAGES/messages.po +1400 -0
- invenio_app_rdm/translations/tr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/tr/LC_MESSAGES/messages.po +1340 -63
- invenio_app_rdm/translations/uk/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/uk/LC_MESSAGES/messages.po +1363 -0
- invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.po +1363 -0
- invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/upgrade_scripts/fix_migrated_records_from_1_0_to_2_0.py +1 -0
- invenio_app_rdm/upgrade_scripts/fix_migrated_records_from_8_0_to_9_0.py +90 -0
- invenio_app_rdm/upgrade_scripts/migrate_10_0_to_11_0.py +47 -0
- invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py +205 -0
- invenio_app_rdm/upgrade_scripts/migrate_12_0_to_13_0.py +235 -0
- invenio_app_rdm/upgrade_scripts/migrate_13_0_to_14_0.py +268 -0
- invenio_app_rdm/upgrade_scripts/migrate_2_0_to_3_0.py +7 -3
- invenio_app_rdm/upgrade_scripts/migrate_3_0_to_4_0.py +4 -6
- invenio_app_rdm/upgrade_scripts/migrate_4_0_to_6_0.py +30 -43
- invenio_app_rdm/upgrade_scripts/migrate_6_0_to_7_0.py +1 -5
- invenio_app_rdm/upgrade_scripts/migrate_7_0_to_8_0.py +7 -11
- invenio_app_rdm/upgrade_scripts/migrate_8_0_to_9_0.py +98 -0
- invenio_app_rdm/upgrade_scripts/migrate_9_0_to_10_0.py +43 -0
- invenio_app_rdm/users/schemas.py +27 -0
- invenio_app_rdm/users_ui/__init__.py +9 -0
- invenio_app_rdm/users_ui/searchapp.py +53 -0
- invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/base.html +21 -0
- invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/communities.html +25 -0
- invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/header.html +46 -0
- invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/requests.html +24 -0
- invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/uploads.html +25 -0
- invenio_app_rdm/users_ui/views/__init__.py +14 -0
- invenio_app_rdm/users_ui/views/dashboard.py +59 -0
- invenio_app_rdm/users_ui/views/ui.py +68 -0
- invenio_app_rdm/utils/files.py +120 -0
- invenio_app_rdm/views.py +21 -0
- invenio_app_rdm-14.0.0b4.dev4.dist-info/METADATA +627 -0
- invenio_app_rdm-14.0.0b4.dev4.dist-info/RECORD +508 -0
- {invenio_app_rdm-8.0.0.dev9.dist-info → invenio_app_rdm-14.0.0b4.dev4.dist-info}/WHEEL +1 -1
- invenio_app_rdm-14.0.0b4.dev4.dist-info/entry_points.txt +44 -0
- invenio_app_rdm/admin.py +0 -36
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/dashboard.html +0 -47
- invenio_app_rdm/records_ui/views/utils.py +0 -27
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/Image.js +0 -36
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareModal.js +0 -257
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/components/base.js +0 -140
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/components/communities.js +0 -200
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/components/requests.js +0 -394
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/components/uploads.js +0 -287
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/index.js +0 -155
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm_requests/menuTabInit.js +0 -24
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/deposit.less +0 -158
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/export_page.less +0 -20
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/footer.less +0 -88
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/frontpage.less +0 -97
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/details.less +0 -53
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/sidebar.less +0 -47
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page.less +0 -423
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/navbar.less +0 -305
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/search.less +0 -52
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme.less +0 -492
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/variables.less +0 -60
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm_requests/theme.less +0 -22
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next-scanner.config.js +0 -63
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package-lock.json +0 -1512
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/compileCatalog.js +0 -39
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/initCatalog.js +0 -20
- invenio_app_rdm/theme/templates/semantic-ui/invenio_requests/community-submission/index.html +0 -67
- invenio_app_rdm/version.py +0 -23
- invenio_app_rdm-8.0.0.dev9.dist-info/AUTHORS.rst +0 -11
- invenio_app_rdm-8.0.0.dev9.dist-info/METADATA +0 -74
- invenio_app_rdm-8.0.0.dev9.dist-info/RECORD +0 -179
- invenio_app_rdm-8.0.0.dev9.dist-info/entry_points.txt +0 -14
- /invenio_app_rdm/{translations/.gitkeep → fixtures/data/pages.yaml} +0 -0
- {invenio_app_rdm-8.0.0.dev9.dist-info → invenio_app_rdm-14.0.0b4.dev4.dist-info/licenses}/LICENSE +0 -0
- {invenio_app_rdm-8.0.0.dev9.dist-info → invenio_app_rdm-14.0.0b4.dev4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2025 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio-App-RDM is free software; you can redistribute it and/or modify
|
|
6
|
+
# it under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Record migration script from InvenioRDM 13.0 to 14.0.
|
|
9
|
+
|
|
10
|
+
Disclaimer: This script is intended to be executed *only once*, namely when
|
|
11
|
+
upgrading from InvenioRDM 13.0 to 14.0!
|
|
12
|
+
If this script is executed at any other time, probably the best case scenario
|
|
13
|
+
is that nothing happens!
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
This script has been tested for the following scenarios:
|
|
17
|
+
1. Draft with resource type publication-thesis
|
|
18
|
+
2. Record with resource type publication-thesis with a DOI and no draft
|
|
19
|
+
3. Record with resource type publication-thesis with a no DOI and an existing draft
|
|
20
|
+
4. Records with multiple versions
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from click import secho
|
|
24
|
+
from invenio_access.permissions import system_identity
|
|
25
|
+
from invenio_db import db
|
|
26
|
+
from invenio_drafts_resources.resources.records.errors import DraftNotCreatedError
|
|
27
|
+
from invenio_rdm_records.proxies import current_rdm_records_service as records_service
|
|
28
|
+
from invenio_search.api import RecordsSearchV2
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def run_upgrade(migrate_record, migrate_draft):
|
|
32
|
+
"""Run upgrade on selected records and drafts.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
migrate_record (callable): Function to migrate a record.
|
|
36
|
+
migrate_draft (callable): Function to migrate a draft.
|
|
37
|
+
"""
|
|
38
|
+
errored_record_ids = []
|
|
39
|
+
errored_draft_ids = []
|
|
40
|
+
|
|
41
|
+
# Handle published records
|
|
42
|
+
published_records = (
|
|
43
|
+
RecordsSearchV2(index=records_service.record_cls.index._name)
|
|
44
|
+
.filter(
|
|
45
|
+
"query_string",
|
|
46
|
+
query="metadata.resource_type.id:publication-thesis OR metadata.related_identifiers.resource_type.id:publication-thesis",
|
|
47
|
+
)
|
|
48
|
+
.source(["id"])
|
|
49
|
+
.scan()
|
|
50
|
+
) # Only need to fetch the record IDs to make the query faster
|
|
51
|
+
# Convert the search results to a list to avoid keeping the scroll context open, as it errors out after 15 minutes
|
|
52
|
+
published_record_ids = [result["id"] for result in published_records]
|
|
53
|
+
for record_id in published_record_ids:
|
|
54
|
+
try:
|
|
55
|
+
migrate_record(record_id)
|
|
56
|
+
except Exception as error:
|
|
57
|
+
secho(f"> Error {repr(error)}", fg="red")
|
|
58
|
+
secho(f"Record {record_id} failed to update", fg="red")
|
|
59
|
+
errored_record_ids.append((record_id, error))
|
|
60
|
+
|
|
61
|
+
# Handle draft records
|
|
62
|
+
draft_records = (
|
|
63
|
+
RecordsSearchV2(index=records_service.draft_cls.index._name)
|
|
64
|
+
.filter("term", has_draft=False)
|
|
65
|
+
.filter(
|
|
66
|
+
"query_string",
|
|
67
|
+
query="metadata.resource_type.id:publication-thesis OR metadata.related_identifiers.resource_type.id:publication-thesis",
|
|
68
|
+
)
|
|
69
|
+
.source(["id"])
|
|
70
|
+
.scan()
|
|
71
|
+
)
|
|
72
|
+
# Convert the search results to a list to avoid keeping the scroll context open, as it errors out after 15 minutes
|
|
73
|
+
draft_record_ids = [result["id"] for result in draft_records]
|
|
74
|
+
for draft_id in draft_record_ids:
|
|
75
|
+
try:
|
|
76
|
+
migrate_draft(draft_id)
|
|
77
|
+
except Exception as error:
|
|
78
|
+
secho(f"> Error {repr(error)}", fg="red")
|
|
79
|
+
secho(f"Draft {draft_id} failed to update", fg="red")
|
|
80
|
+
errored_draft_ids.append((draft_id, error))
|
|
81
|
+
|
|
82
|
+
print(f"Errored record IDs:", *errored_record_ids, sep="\n")
|
|
83
|
+
print(f"Errored draft IDs:", *errored_draft_ids, sep="\n")
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def run_update_for_resource_type():
|
|
87
|
+
"""Run update for resource type."""
|
|
88
|
+
|
|
89
|
+
def migrate_resource_type_in_record(record_id):
|
|
90
|
+
"""
|
|
91
|
+
Update resource type from publication-thesis to publication-dissertation.
|
|
92
|
+
|
|
93
|
+
We go through the service layer to automatically trigger the DOI update and re-indexing.
|
|
94
|
+
"""
|
|
95
|
+
secho(f"Updating resource type for record {record_id}", fg="yellow")
|
|
96
|
+
record = records_service.read(system_identity, record_id)
|
|
97
|
+
if record.data["metadata"]["resource_type"][
|
|
98
|
+
"id"
|
|
99
|
+
] != "publication-thesis" and not any(
|
|
100
|
+
related_identifier.get("resource_type", {}).get("id")
|
|
101
|
+
== "publication-thesis"
|
|
102
|
+
for related_identifier in record.data["metadata"].get(
|
|
103
|
+
"related_identifiers", []
|
|
104
|
+
)
|
|
105
|
+
):
|
|
106
|
+
secho(
|
|
107
|
+
f"Skipping record <{record.id}> because it doesn't have resource-type 'publication-thesis'!",
|
|
108
|
+
fg="yellow",
|
|
109
|
+
)
|
|
110
|
+
return
|
|
111
|
+
|
|
112
|
+
try:
|
|
113
|
+
draft = records_service.read_draft(system_identity, record.id)
|
|
114
|
+
# Step 1: Update the resource type in the record via low-level API
|
|
115
|
+
# We need to make sure we don't publish the record with different metadata
|
|
116
|
+
secho(
|
|
117
|
+
f"Record <{record.id}> has an existing draft <{draft.id}>! Updating record via low-level API.",
|
|
118
|
+
fg="yellow",
|
|
119
|
+
)
|
|
120
|
+
# Update the record directly without affecting the draft
|
|
121
|
+
if (
|
|
122
|
+
record._record["metadata"]["resource_type"]["id"]
|
|
123
|
+
== "publication-thesis"
|
|
124
|
+
):
|
|
125
|
+
record._record["metadata"]["resource_type"][
|
|
126
|
+
"id"
|
|
127
|
+
] = "publication-dissertation"
|
|
128
|
+
for related_identifier in record._record["metadata"].get(
|
|
129
|
+
"related_identifiers", []
|
|
130
|
+
):
|
|
131
|
+
if (
|
|
132
|
+
related_identifier.get("resource_type", {}).get("id")
|
|
133
|
+
== "publication-thesis"
|
|
134
|
+
):
|
|
135
|
+
related_identifier["resource_type"][
|
|
136
|
+
"id"
|
|
137
|
+
] = "publication-dissertation"
|
|
138
|
+
# Save the record changes and reindex
|
|
139
|
+
secho(
|
|
140
|
+
f"Record <{record.id}> has been updated... committing changes.",
|
|
141
|
+
fg="green",
|
|
142
|
+
)
|
|
143
|
+
record._record.commit()
|
|
144
|
+
# Step 2: Update the resource type in the draft
|
|
145
|
+
if draft._record["metadata"]["resource_type"]["id"] == "publication-thesis":
|
|
146
|
+
draft._record["metadata"]["resource_type"][
|
|
147
|
+
"id"
|
|
148
|
+
] = "publication-dissertation"
|
|
149
|
+
for related_identifier in draft._record["metadata"].get(
|
|
150
|
+
"related_identifiers", []
|
|
151
|
+
):
|
|
152
|
+
if (
|
|
153
|
+
related_identifier.get("resource_type", {}).get("id")
|
|
154
|
+
== "publication-thesis"
|
|
155
|
+
):
|
|
156
|
+
related_identifier["resource_type"][
|
|
157
|
+
"id"
|
|
158
|
+
] = "publication-dissertation"
|
|
159
|
+
# After updating the record, update the draft's fork_version_id to match the record's new version_id, to avoid conflicts when publishing
|
|
160
|
+
draft._record.fork_version_id = record._record.revision_id
|
|
161
|
+
draft._record.commit()
|
|
162
|
+
# Commit the changes for both the record and the draft in one transaction
|
|
163
|
+
db.session.commit()
|
|
164
|
+
records_service.indexer.index(record._record)
|
|
165
|
+
records_service.indexer.index(draft._record)
|
|
166
|
+
secho(f"Draft <{draft.id}> has been updated successfully.", fg="green")
|
|
167
|
+
# Update DOI metadata if record has DOI
|
|
168
|
+
if hasattr(record, "pids") and record.pids.get("doi", None):
|
|
169
|
+
records_service.pids.register_or_update(
|
|
170
|
+
system_identity, record.id, "doi", parent=False
|
|
171
|
+
)
|
|
172
|
+
secho(
|
|
173
|
+
f"DOI metadata for record {record.id} has been updated successfully.",
|
|
174
|
+
fg="green",
|
|
175
|
+
)
|
|
176
|
+
except DraftNotCreatedError:
|
|
177
|
+
# If the draft didn't exist, we simply edit and publish the record
|
|
178
|
+
draft = records_service.edit(system_identity, record.id)
|
|
179
|
+
if draft.data["metadata"]["resource_type"]["id"] == "publication-thesis":
|
|
180
|
+
draft.data["metadata"]["resource_type"][
|
|
181
|
+
"id"
|
|
182
|
+
] = "publication-dissertation"
|
|
183
|
+
for related_identifier in draft.data["metadata"].get(
|
|
184
|
+
"related_identifiers", []
|
|
185
|
+
):
|
|
186
|
+
if (
|
|
187
|
+
related_identifier.get("resource_type", {}).get("id")
|
|
188
|
+
== "publication-thesis"
|
|
189
|
+
):
|
|
190
|
+
related_identifier["resource_type"][
|
|
191
|
+
"id"
|
|
192
|
+
] = "publication-dissertation"
|
|
193
|
+
updated_draft = records_service.update_draft(
|
|
194
|
+
system_identity, draft.id, draft.data
|
|
195
|
+
)
|
|
196
|
+
record = records_service.publish(system_identity, updated_draft.id)
|
|
197
|
+
|
|
198
|
+
secho(f"Record <{record.id}> has been updated successfully.", fg="green")
|
|
199
|
+
|
|
200
|
+
def migrate_resource_type_in_draft(draft_id):
|
|
201
|
+
"""
|
|
202
|
+
Update resource type from publication-thesis to publication-dissertation.
|
|
203
|
+
|
|
204
|
+
We go through the service layer to automatically trigger the DOI update and re-indexing.
|
|
205
|
+
"""
|
|
206
|
+
secho(f"Updating resource type for draft {draft_id}", fg="yellow")
|
|
207
|
+
draft = records_service.edit(system_identity, draft_id)
|
|
208
|
+
if draft.data["metadata"]["resource_type"][
|
|
209
|
+
"id"
|
|
210
|
+
] != "publication-thesis" and not any(
|
|
211
|
+
related_identifier.get("resource_type", {}).get("id")
|
|
212
|
+
== "publication-thesis"
|
|
213
|
+
for related_identifier in draft.data["metadata"].get(
|
|
214
|
+
"related_identifiers", []
|
|
215
|
+
)
|
|
216
|
+
):
|
|
217
|
+
secho(
|
|
218
|
+
f"Skipping draft <{draft.id}> because it doesn't have resource-type 'publication-thesis'!",
|
|
219
|
+
fg="yellow",
|
|
220
|
+
)
|
|
221
|
+
return
|
|
222
|
+
|
|
223
|
+
if draft.data["metadata"]["resource_type"]["id"] == "publication-thesis":
|
|
224
|
+
draft.data["metadata"]["resource_type"]["id"] = "publication-dissertation"
|
|
225
|
+
for related_identifier in draft.data["metadata"].get("related_identifiers", []):
|
|
226
|
+
if (
|
|
227
|
+
related_identifier.get("resource_type", {}).get("id")
|
|
228
|
+
== "publication-thesis"
|
|
229
|
+
):
|
|
230
|
+
related_identifier["resource_type"]["id"] = "publication-dissertation"
|
|
231
|
+
updated_draft = records_service.update_draft(
|
|
232
|
+
system_identity, draft.id, draft.data
|
|
233
|
+
)
|
|
234
|
+
secho(f"Draft <{updated_draft.id}> has been updated successfully.", fg="green")
|
|
235
|
+
|
|
236
|
+
secho("Resource type update has started.", fg="green")
|
|
237
|
+
|
|
238
|
+
run_upgrade(
|
|
239
|
+
migrate_resource_type_in_record,
|
|
240
|
+
migrate_resource_type_in_draft,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
secho("Resource type update has finished.", fg="green")
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def execute_upgrade():
|
|
247
|
+
"""Execute the upgrade from InvenioRDM 13.0 to 14.0.
|
|
248
|
+
|
|
249
|
+
Please read the disclaimer on this module before thinking about executing
|
|
250
|
+
this function!
|
|
251
|
+
THIS MODULE IS WORK IN PROGRESS, UNTIL official v14 release
|
|
252
|
+
|
|
253
|
+
NOTE:
|
|
254
|
+
since the data upgrade steps are more selective now, the approach how to do
|
|
255
|
+
it has been changed. now the records/drafts which should be updated are
|
|
256
|
+
searched by a filter and then the updates are applied to those
|
|
257
|
+
records/drafts explicitly. this should improve speed and should make it
|
|
258
|
+
easier to upgrade large instances
|
|
259
|
+
|
|
260
|
+
"""
|
|
261
|
+
secho("Starting data migration...", fg="green")
|
|
262
|
+
|
|
263
|
+
run_update_for_resource_type()
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
# if the script is executed on its own, perform the upgrade
|
|
267
|
+
if __name__ == "__main__":
|
|
268
|
+
execute_upgrade()
|
|
@@ -16,8 +16,11 @@ is that nothing happens!
|
|
|
16
16
|
|
|
17
17
|
from invenio_db import db
|
|
18
18
|
from invenio_rdm_records.records.api import RDMDraft, RDMParent, RDMRecord
|
|
19
|
-
from invenio_rdm_records.records.models import
|
|
20
|
-
|
|
19
|
+
from invenio_rdm_records.records.models import (
|
|
20
|
+
RDMDraftMetadata,
|
|
21
|
+
RDMFileDraftMetadata,
|
|
22
|
+
RDMRecordMetadata,
|
|
23
|
+
)
|
|
21
24
|
|
|
22
25
|
|
|
23
26
|
def execute_upgrade():
|
|
@@ -65,7 +68,8 @@ def execute_upgrade():
|
|
|
65
68
|
# Cleanup associated deleted drafts.
|
|
66
69
|
|
|
67
70
|
drafts = RDMDraftMetadata.query.filter(
|
|
68
|
-
RDMDraftMetadata.is_deleted == True
|
|
71
|
+
RDMDraftMetadata.is_deleted == True # noqa
|
|
72
|
+
).all() # noqa
|
|
69
73
|
for d in drafts:
|
|
70
74
|
# Delete all file draft records
|
|
71
75
|
RDMFileDraftMetadata.query.filter_by(record_id=d.id).delete()
|
|
@@ -62,14 +62,12 @@ def execute_upgrade():
|
|
|
62
62
|
record["metadata"]["resource_type"] = dict(id=res_type_vocab)
|
|
63
63
|
|
|
64
64
|
# Migrate resource_type of related_identifiers
|
|
65
|
-
for idx, val in enumerate(
|
|
66
|
-
record["metadata"].get("related_identifiers", [])
|
|
67
|
-
):
|
|
65
|
+
for idx, val in enumerate(record["metadata"].get("related_identifiers", [])):
|
|
68
66
|
if "resource_type" in val:
|
|
69
67
|
res_type_vocab = get_res_type_vocabulary(val)
|
|
70
|
-
record["metadata"]["related_identifiers"][idx][
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
record["metadata"]["related_identifiers"][idx]["resource_type"] = dict(
|
|
69
|
+
id=res_type_vocab
|
|
70
|
+
)
|
|
73
71
|
|
|
74
72
|
# Migrate languages from additional_descriptions
|
|
75
73
|
migrate_language("additional_descriptions")
|
|
@@ -15,13 +15,11 @@ is that nothing happens!
|
|
|
15
15
|
|
|
16
16
|
import yaml
|
|
17
17
|
from flask import current_app
|
|
18
|
-
from invenio_access.permissions import system_identity
|
|
19
18
|
from invenio_db import db
|
|
20
19
|
from invenio_pidstore.models import PersistentIdentifier
|
|
21
20
|
from invenio_rdm_records.records.api import RDMDraft, RDMRecord
|
|
22
21
|
from invenio_vocabularies.records.api import Vocabulary
|
|
23
|
-
from invenio_vocabularies.records.models import VocabularyScheme,
|
|
24
|
-
VocabularyType
|
|
22
|
+
from invenio_vocabularies.records.models import VocabularyScheme, VocabularyType
|
|
25
23
|
from sqlalchemy.orm.exc import NoResultFound
|
|
26
24
|
|
|
27
25
|
|
|
@@ -49,8 +47,7 @@ def migrate_vocabularies():
|
|
|
49
47
|
|
|
50
48
|
# remove old affiliations
|
|
51
49
|
try:
|
|
52
|
-
schemes = VocabularyScheme.query.filter_by(
|
|
53
|
-
parent_id="affiliations").all()
|
|
50
|
+
schemes = VocabularyScheme.query.filter_by(parent_id="affiliations").all()
|
|
54
51
|
for scheme in schemes:
|
|
55
52
|
db.session.delete(scheme)
|
|
56
53
|
db.session.commit()
|
|
@@ -58,8 +55,7 @@ def migrate_vocabularies():
|
|
|
58
55
|
except NoResultFound:
|
|
59
56
|
print("No affiliations scheme not found: OK.")
|
|
60
57
|
try:
|
|
61
|
-
db.session.delete(VocabularyType.query.filter_by(
|
|
62
|
-
id="affiliations").one())
|
|
58
|
+
db.session.delete(VocabularyType.query.filter_by(id="affiliations").one())
|
|
63
59
|
db.session.commit()
|
|
64
60
|
print("Affiliations vocabulary type removed: OK.")
|
|
65
61
|
except NoResultFound:
|
|
@@ -110,7 +106,7 @@ def check_affiliations():
|
|
|
110
106
|
if inv_affs_creators or inv_affs_contributors:
|
|
111
107
|
invalid_affiliations_rec[record["id"]] = {
|
|
112
108
|
"creators": inv_affs_creators,
|
|
113
|
-
"contributors": inv_affs_contributors
|
|
109
|
+
"contributors": inv_affs_contributors,
|
|
114
110
|
}
|
|
115
111
|
|
|
116
112
|
invalid_affiliations_draft = {}
|
|
@@ -130,7 +126,7 @@ def check_affiliations():
|
|
|
130
126
|
invalid_affiliations_draft[draft["id"]] = {
|
|
131
127
|
"type": "draft",
|
|
132
128
|
"creators": inv_affs_creators,
|
|
133
|
-
"contributors": inv_affs_contributors
|
|
129
|
+
"contributors": inv_affs_contributors,
|
|
134
130
|
}
|
|
135
131
|
|
|
136
132
|
invalid_affiliations = {}
|
|
@@ -141,17 +137,17 @@ def check_affiliations():
|
|
|
141
137
|
|
|
142
138
|
if invalid_affiliations:
|
|
143
139
|
print(
|
|
144
|
-
f"Your instance has {total} affiliations that need to be "
|
|
145
|
-
"fixed. Check the invalid_affiliation.yaml file for more details."
|
|
140
|
+
f"Your instance has {total} affiliations that need to be "
|
|
141
|
+
+ "fixed. Check the invalid_affiliation.yaml file for more details."
|
|
146
142
|
)
|
|
147
|
-
with open(
|
|
143
|
+
with open("invalid_affiliations.yaml", "w") as f:
|
|
148
144
|
yaml.dump(list(invalid_affiliations), f)
|
|
149
145
|
else:
|
|
150
|
-
print(
|
|
146
|
+
print("All your instance's affiliations are valid.")
|
|
151
147
|
if needs_ror:
|
|
152
148
|
print(
|
|
153
|
-
"You have affiliations with ROR identifiers, you need to "
|
|
154
|
-
"add its vocabulary. Instructions to do so are available in "
|
|
149
|
+
"You have affiliations with ROR identifiers, you need to "
|
|
150
|
+
+ "add its vocabulary. Instructions to do so are available in "
|
|
155
151
|
"https://inveniordm.docs.cern.ch/customize/vocabularies/affiliations/" # noqa
|
|
156
152
|
)
|
|
157
153
|
|
|
@@ -170,7 +166,7 @@ def check_subjects():
|
|
|
170
166
|
vocab_subjects[id_] = {
|
|
171
167
|
"id": id_,
|
|
172
168
|
"scheme": subject["scheme"],
|
|
173
|
-
"subject": subject["subject"]
|
|
169
|
+
"subject": subject["subject"],
|
|
174
170
|
}
|
|
175
171
|
|
|
176
172
|
return vocab_subjects
|
|
@@ -189,21 +185,18 @@ def check_subjects():
|
|
|
189
185
|
record = RDMRecord(record_metadata.data, model=record_metadata)
|
|
190
186
|
# publish record subjects take presedence if id is repeated
|
|
191
187
|
# | operator is only available from py 3.9 on
|
|
192
|
-
subjects_to_dump = {
|
|
193
|
-
**subjects_to_dump,
|
|
194
|
-
**_should_be_vocabulary(record)
|
|
195
|
-
}
|
|
188
|
+
subjects_to_dump = {**subjects_to_dump, **_should_be_vocabulary(record)}
|
|
196
189
|
|
|
197
190
|
total = len(subjects_to_dump)
|
|
198
191
|
if subjects_to_dump:
|
|
199
192
|
print(
|
|
200
|
-
f"Your instance has {total} subjects that "
|
|
201
|
-
"should be custom vocabularies."
|
|
193
|
+
f"Your instance has {total} subjects that "
|
|
194
|
+
+ "should be custom vocabularies."
|
|
202
195
|
)
|
|
203
|
-
with open(
|
|
196
|
+
with open("custom_subjects.yaml", "w") as f:
|
|
204
197
|
yaml.dump(list(subjects_to_dump.values()), f)
|
|
205
198
|
else:
|
|
206
|
-
print(
|
|
199
|
+
print("All your instance's subjects are valid.")
|
|
207
200
|
|
|
208
201
|
|
|
209
202
|
def execute_upgrade():
|
|
@@ -212,6 +205,7 @@ def execute_upgrade():
|
|
|
212
205
|
Please read the disclaimer on this module before thinking about executing
|
|
213
206
|
this function!
|
|
214
207
|
"""
|
|
208
|
+
|
|
215
209
|
def update_roles(creatibutors):
|
|
216
210
|
"""Update roles."""
|
|
217
211
|
for creatibutor in creatibutors:
|
|
@@ -328,20 +322,15 @@ def execute_upgrade():
|
|
|
328
322
|
"""Update contributors roles."""
|
|
329
323
|
contributors = record.get("metadata").get("contributors", [])
|
|
330
324
|
if contributors:
|
|
331
|
-
record["metadata"]["contributors"] =
|
|
332
|
-
update_affiliations(contributors)
|
|
325
|
+
record["metadata"]["contributors"] = update_affiliations(contributors)
|
|
333
326
|
|
|
334
327
|
def update_rights(record):
|
|
335
328
|
"""Update record rights."""
|
|
336
329
|
rights = record.get("metadata").get("rights", [])
|
|
337
330
|
for right in rights:
|
|
338
|
-
locale = current_app.config.get(
|
|
339
|
-
right["title"] = {
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
right["description"] = {
|
|
343
|
-
locale: right["description"]
|
|
344
|
-
}
|
|
331
|
+
locale = current_app.config.get("BABEL_DEFAULT_LOCALE", "en")
|
|
332
|
+
right["title"] = {locale: right["title"]}
|
|
333
|
+
right["description"] = {locale: right["description"]}
|
|
345
334
|
|
|
346
335
|
def migrate_record(record):
|
|
347
336
|
"""Migrates a record/draft to the new schema's values."""
|
|
@@ -351,9 +340,7 @@ def execute_upgrade():
|
|
|
351
340
|
update_contributors_roles(record)
|
|
352
341
|
update_additional_titles(record)
|
|
353
342
|
update_additional_descriptions(record)
|
|
354
|
-
update_list_field_vocabulary(
|
|
355
|
-
record, "related_identifiers", "relation_type"
|
|
356
|
-
)
|
|
343
|
+
update_list_field_vocabulary(record, "related_identifiers", "relation_type")
|
|
357
344
|
update_list_field_vocabulary(record, "dates", "type")
|
|
358
345
|
update_subjects(record)
|
|
359
346
|
update_creators_affiliations(record)
|
|
@@ -384,13 +371,13 @@ def execute_upgrade():
|
|
|
384
371
|
|
|
385
372
|
if __name__ == "__main__":
|
|
386
373
|
print(
|
|
387
|
-
"Choose a step:\n"
|
|
388
|
-
"[1] Migrate old vocabularies\n"
|
|
389
|
-
"[2] Check record's subjects\n"
|
|
390
|
-
"[3] Check creators/contributors affiliations\n"
|
|
391
|
-
"[4] Migrate records\n"
|
|
392
|
-
">> ",
|
|
393
|
-
end=""
|
|
374
|
+
"Choose a step:\n"
|
|
375
|
+
+ "[1] Migrate old vocabularies\n"
|
|
376
|
+
+ "[2] Check record's subjects\n"
|
|
377
|
+
+ "[3] Check creators/contributors affiliations\n"
|
|
378
|
+
+ "[4] Migrate records\n"
|
|
379
|
+
+ ">> ",
|
|
380
|
+
end="",
|
|
394
381
|
)
|
|
395
382
|
try:
|
|
396
383
|
choice = int(input())
|
|
@@ -13,8 +13,6 @@ If this script is executed at any other time, probably the best case scenario
|
|
|
13
13
|
is that nothing happens!
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
|
-
import sys
|
|
17
|
-
|
|
18
16
|
from click import secho
|
|
19
17
|
from invenio_db import db
|
|
20
18
|
from invenio_rdm_records.proxies import current_rdm_records_service
|
|
@@ -146,9 +144,7 @@ def execute_upgrade():
|
|
|
146
144
|
|
|
147
145
|
except Exception as exc:
|
|
148
146
|
success = False
|
|
149
|
-
secho(
|
|
150
|
-
f"Error while generating OAI PIDs: {exc}\n", fg="red", err=True
|
|
151
|
-
)
|
|
147
|
+
secho(f"Error while generating OAI PIDs: {exc}\n", fg="red", err=True)
|
|
152
148
|
|
|
153
149
|
if not success:
|
|
154
150
|
secho(
|
|
@@ -19,8 +19,10 @@ import invenio_rdm_records.fixtures as fixtures
|
|
|
19
19
|
from click import echo, secho
|
|
20
20
|
from invenio_access.permissions import system_identity
|
|
21
21
|
from invenio_db import db
|
|
22
|
-
from invenio_rdm_records.fixtures import
|
|
23
|
-
|
|
22
|
+
from invenio_rdm_records.fixtures import (
|
|
23
|
+
PrioritizedVocabulariesFixtures,
|
|
24
|
+
VocabulariesFixture,
|
|
25
|
+
)
|
|
24
26
|
from invenio_vocabularies.proxies import current_service as vocabulary_svc
|
|
25
27
|
|
|
26
28
|
|
|
@@ -88,9 +90,7 @@ def execute_upgrade():
|
|
|
88
90
|
# 1: check the app_data directory for the invenio instance
|
|
89
91
|
app_data_yaml_file = pf._app_data_folder / pf._filename
|
|
90
92
|
if app_data_yaml_file.exists():
|
|
91
|
-
app_data_fixture = VocabulariesFixture(
|
|
92
|
-
system_identity, app_data_yaml_file
|
|
93
|
-
)
|
|
93
|
+
app_data_fixture = VocabulariesFixture(system_identity, app_data_yaml_file)
|
|
94
94
|
licenses_loaded, errs = update_licenses_from_fixture(app_data_fixture)
|
|
95
95
|
errors.extend(errs)
|
|
96
96
|
|
|
@@ -104,17 +104,13 @@ def execute_upgrade():
|
|
|
104
104
|
# check if the entry points define something for licenses
|
|
105
105
|
if not licenses_loaded and "licenses" in vocab_list:
|
|
106
106
|
extension_fixture = VocabulariesFixture(system_identity, filepath)
|
|
107
|
-
licenses_loaded, errs = update_licenses_from_fixture(
|
|
108
|
-
extension_fixture
|
|
109
|
-
)
|
|
107
|
+
licenses_loaded, errs = update_licenses_from_fixture(extension_fixture)
|
|
110
108
|
errors.extend(errs)
|
|
111
109
|
|
|
112
110
|
# 3: check the default vocabularies from rdm-records
|
|
113
111
|
pkg_data_yaml_file = pf._pkg_data_folder / pf._filename
|
|
114
112
|
if not licenses_loaded and pkg_data_yaml_file.exists():
|
|
115
|
-
pkg_data_fixture = VocabulariesFixture(
|
|
116
|
-
system_identity, pkg_data_yaml_file
|
|
117
|
-
)
|
|
113
|
+
pkg_data_fixture = VocabulariesFixture(system_identity, pkg_data_yaml_file)
|
|
118
114
|
licenses_loaded, errs = update_licenses_from_fixture(pkg_data_fixture)
|
|
119
115
|
errors.extend(errs)
|
|
120
116
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2022 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio-App-RDM is free software; you can redistribute it and/or modify
|
|
6
|
+
# it under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Record migration script from InvenioRDM 8.0 to 9.0.
|
|
9
|
+
|
|
10
|
+
Disclaimer: This script is intended to be executed *only once*, namely when
|
|
11
|
+
upgrading from InvenioRDM 8.0 to 9.0!
|
|
12
|
+
If this script is executed at any other time, probably the best case scenario
|
|
13
|
+
is that nothing happens!
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from click import echo, secho
|
|
17
|
+
from invenio_db import db
|
|
18
|
+
from invenio_rdm_records.records.api import RDMRecord
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def execute_upgrade():
|
|
22
|
+
"""Execute the upgrade from InvenioRDM 8.0 to 9.0.
|
|
23
|
+
|
|
24
|
+
Please read the disclaimer on this module before thinking about executing
|
|
25
|
+
this function!
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
def update_funding_field(record):
|
|
29
|
+
try:
|
|
30
|
+
echo(f"Updating record: {record['id']}... ", nl=False)
|
|
31
|
+
for funding in record.metadata.get("funding", []):
|
|
32
|
+
award = funding.get("award", {})
|
|
33
|
+
funder = funding.get("funder", {})
|
|
34
|
+
if award.get("identifier") and award.get("scheme"):
|
|
35
|
+
award_identifier = award.pop("identifier")
|
|
36
|
+
award_scheme = award.pop("scheme")
|
|
37
|
+
funding["award"]["identifiers"] = [
|
|
38
|
+
{"identifier": award_identifier, "scheme": award_scheme}
|
|
39
|
+
]
|
|
40
|
+
if funder.get("identifier") and funder.get("scheme"):
|
|
41
|
+
funder.pop("identifier")
|
|
42
|
+
funder.pop("scheme")
|
|
43
|
+
if award.get("title", ""):
|
|
44
|
+
award_title = award.pop("title")
|
|
45
|
+
funding["award"]["title"] = {"en": award_title}
|
|
46
|
+
if funder.get("title", ""):
|
|
47
|
+
funder.pop("title")
|
|
48
|
+
secho("OK", fg="green")
|
|
49
|
+
return record
|
|
50
|
+
except Exception as e:
|
|
51
|
+
secho("Error {}".format(repr(e)), fg="red")
|
|
52
|
+
return None
|
|
53
|
+
|
|
54
|
+
errors = []
|
|
55
|
+
|
|
56
|
+
records = RDMRecord.model_cls.query.all()
|
|
57
|
+
for record in records:
|
|
58
|
+
r = RDMRecord(record.data, model=record)
|
|
59
|
+
r["$schema"] = "local://records/record-v5.0.0.json"
|
|
60
|
+
res = update_funding_field(r)
|
|
61
|
+
if res is None:
|
|
62
|
+
errors.append("Record {} failed to update funding".format(r.id))
|
|
63
|
+
else:
|
|
64
|
+
r = res
|
|
65
|
+
r.commit()
|
|
66
|
+
|
|
67
|
+
success = not errors
|
|
68
|
+
|
|
69
|
+
if success:
|
|
70
|
+
echo("Committing to DB", nl=True)
|
|
71
|
+
db.session.commit()
|
|
72
|
+
secho(
|
|
73
|
+
"Data migration completed, please rebuild the search indices now.",
|
|
74
|
+
fg="green",
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
else:
|
|
78
|
+
echo("Rollback", nl=True)
|
|
79
|
+
db.session.rollback()
|
|
80
|
+
secho(
|
|
81
|
+
"Upgrade aborted due to the following errors:",
|
|
82
|
+
fg="red",
|
|
83
|
+
err=True,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
for error in errors:
|
|
87
|
+
secho(error, fg="red", err=True)
|
|
88
|
+
|
|
89
|
+
msg = (
|
|
90
|
+
"The changes have been rolled back. "
|
|
91
|
+
"Please fix the above listed errors and try the upgrade again",
|
|
92
|
+
)
|
|
93
|
+
secho(msg, fg="yellow", err=True)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# if the script is executed on its own, perform the upgrade
|
|
97
|
+
if __name__ == "__main__":
|
|
98
|
+
execute_upgrade()
|