invenio-app-rdm 14.0.0b0.dev1__py2.py3-none-any.whl → 14.0.0b0.dev3__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 +1 -1
- invenio_app_rdm/administration/records/records.py +9 -7
- invenio_app_rdm/config.py +1 -0
- invenio_app_rdm/fixtures/pages.py +5 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html +2 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html +8 -7
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/external_resources.html +5 -6
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +9 -13
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html +1 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/files.html +1 -1
- invenio_app_rdm/records_ui/views/decorators.py +23 -9
- invenio_app_rdm/records_ui/views/deposits.py +10 -3
- invenio_app_rdm/records_ui/views/records.py +3 -11
- invenio_app_rdm/requests_ui/views/requests.py +3 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js +8 -8
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js +14 -16
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js +1 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +1 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagement.js +2 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCitationField.js +15 -14
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesListModal.js +4 -4
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/index.js +38 -40
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/theme.js +5 -5
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/components.js +1 -1
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/licenses.less +5 -3
- invenio_app_rdm/upgrade_scripts/migrate_12_0_to_13_0.py +101 -4
- {invenio_app_rdm-14.0.0b0.dev1.dist-info → invenio_app_rdm-14.0.0b0.dev3.dist-info}/METADATA +27 -2
- {invenio_app_rdm-14.0.0b0.dev1.dist-info → invenio_app_rdm-14.0.0b0.dev3.dist-info}/RECORD +32 -32
- {invenio_app_rdm-14.0.0b0.dev1.dist-info → invenio_app_rdm-14.0.0b0.dev3.dist-info}/WHEEL +0 -0
- {invenio_app_rdm-14.0.0b0.dev1.dist-info → invenio_app_rdm-14.0.0b0.dev3.dist-info}/entry_points.txt +0 -0
- {invenio_app_rdm-14.0.0b0.dev1.dist-info → invenio_app_rdm-14.0.0b0.dev3.dist-info}/licenses/LICENSE +0 -0
- {invenio_app_rdm-14.0.0b0.dev1.dist-info → invenio_app_rdm-14.0.0b0.dev3.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of InvenioRDM
|
|
2
|
-
// Copyright (C) 2023 CERN.
|
|
2
|
+
// Copyright (C) 2023-2025 CERN.
|
|
3
3
|
//
|
|
4
4
|
// InvenioRDM is free software; you can redistribute it and/or modify it
|
|
5
5
|
// under the terms of the MIT License; see LICENSE file for more details.
|
|
@@ -13,9 +13,9 @@ import { RecordCommunitiesSearch } from "./RecordCommunitiesSearch";
|
|
|
13
13
|
export class RecordCommunitiesListModal extends Component {
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
16
|
-
const {
|
|
16
|
+
const { recordParent } = this.props;
|
|
17
17
|
this.state = {
|
|
18
|
-
recordParent:
|
|
18
|
+
recordParent: recordParent,
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -77,7 +77,7 @@ RecordCommunitiesListModal.propTypes = {
|
|
|
77
77
|
handleOnClose: PropTypes.func.isRequired,
|
|
78
78
|
handleOnOpen: PropTypes.func.isRequired,
|
|
79
79
|
permissions: PropTypes.object.isRequired,
|
|
80
|
-
|
|
80
|
+
recordParent: PropTypes.object.isRequired,
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
RecordCommunitiesListModal.defaultProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of InvenioRDM
|
|
2
|
-
// Copyright (C) 2020-
|
|
2
|
+
// Copyright (C) 2020-2025 CERN.
|
|
3
3
|
// Copyright (C) 2020-2021 Northwestern University.
|
|
4
4
|
// Copyright (C) 2021 Graz University of Technology.
|
|
5
5
|
// Copyright (C) 2023 TU Wien.
|
|
@@ -16,35 +16,28 @@ import { ExportDropdown } from "./ExportDropdown";
|
|
|
16
16
|
import { CommunitiesManagement } from "./CommunitiesManagement";
|
|
17
17
|
import Overridable, { OverridableContext, overrideStore } from "react-overridable";
|
|
18
18
|
|
|
19
|
-
const recordManagementAppDiv = document.getElementById("recordManagement");
|
|
20
|
-
const recordManagementMobile = document.getElementById("recordManagementMobile");
|
|
21
|
-
|
|
22
|
-
const recordVersionsAppDiv = document.getElementById("recordVersions");
|
|
23
|
-
const recordCitationAppDiv = document.getElementById("recordCitation");
|
|
24
|
-
const recordExportDownloadDiv = document.getElementById("recordExportDownload");
|
|
25
|
-
const sidebarCommunitiesManageDiv = document.getElementById(
|
|
26
|
-
"sidebar-communities-manage"
|
|
27
|
-
);
|
|
28
|
-
|
|
29
19
|
const overriddenComponents = overrideStore.getAll();
|
|
30
20
|
|
|
21
|
+
const recordManagementAppDiv = document.getElementById("recordManagement");
|
|
22
|
+
const recordManagementMobile = document.getElementById("recordManagementMobile");
|
|
31
23
|
if (recordManagementAppDiv) {
|
|
32
24
|
renderRecordManagement(recordManagementAppDiv);
|
|
33
25
|
recordManagementMobile && renderRecordManagement(recordManagementMobile);
|
|
34
26
|
}
|
|
35
27
|
|
|
36
28
|
function renderRecordManagement(element) {
|
|
29
|
+
const record = JSON.parse(recordManagementAppDiv.dataset.record);
|
|
37
30
|
ReactDOM.render(
|
|
38
31
|
<OverridableContext.Provider value={overriddenComponents}>
|
|
39
32
|
<RecordManagement
|
|
40
|
-
record={
|
|
33
|
+
record={record}
|
|
41
34
|
permissions={JSON.parse(recordManagementAppDiv.dataset.permissions)}
|
|
42
35
|
isDraft={JSON.parse(recordManagementAppDiv.dataset.isDraft)}
|
|
43
36
|
isPreviewSubmissionRequest={JSON.parse(
|
|
44
37
|
recordManagementAppDiv.dataset.isPreviewSubmissionRequest
|
|
45
38
|
)}
|
|
46
39
|
currentUserId={recordManagementAppDiv.dataset.currentUserId}
|
|
47
|
-
recordOwnerID={
|
|
40
|
+
recordOwnerID={record.parent.access.owned_by.user}
|
|
48
41
|
groupsEnabled={JSON.parse(recordManagementAppDiv.dataset.groupsEnabled)}
|
|
49
42
|
/>
|
|
50
43
|
</OverridableContext.Provider>,
|
|
@@ -52,6 +45,7 @@ function renderRecordManagement(element) {
|
|
|
52
45
|
);
|
|
53
46
|
}
|
|
54
47
|
|
|
48
|
+
const recordVersionsAppDiv = document.getElementById("recordVersions");
|
|
55
49
|
if (recordVersionsAppDiv) {
|
|
56
50
|
ReactDOM.render(
|
|
57
51
|
<RecordVersionsList
|
|
@@ -62,10 +56,11 @@ if (recordVersionsAppDiv) {
|
|
|
62
56
|
);
|
|
63
57
|
}
|
|
64
58
|
|
|
59
|
+
const recordCitationAppDiv = document.getElementById("recordCitation");
|
|
65
60
|
if (recordCitationAppDiv) {
|
|
66
61
|
ReactDOM.render(
|
|
67
62
|
<RecordCitationField
|
|
68
|
-
|
|
63
|
+
recordLinks={JSON.parse(recordCitationAppDiv.dataset.recordLinks)}
|
|
69
64
|
styles={JSON.parse(recordCitationAppDiv.dataset.styles)}
|
|
70
65
|
defaultStyle={JSON.parse(recordCitationAppDiv.dataset.defaultstyle)}
|
|
71
66
|
includeDeleted={JSON.parse(recordCitationAppDiv.dataset.includeDeleted)}
|
|
@@ -74,6 +69,7 @@ if (recordCitationAppDiv) {
|
|
|
74
69
|
);
|
|
75
70
|
}
|
|
76
71
|
|
|
72
|
+
const recordExportDownloadDiv = document.getElementById("recordExportDownload");
|
|
77
73
|
if (recordExportDownloadDiv) {
|
|
78
74
|
ReactDOM.render(
|
|
79
75
|
<ExportDropdown formats={JSON.parse(recordExportDownloadDiv.dataset.formats)} />,
|
|
@@ -81,44 +77,46 @@ if (recordExportDownloadDiv) {
|
|
|
81
77
|
);
|
|
82
78
|
}
|
|
83
79
|
|
|
80
|
+
const sidebarCommunitiesManageDiv = document.getElementById(
|
|
81
|
+
"sidebar-communities-manage"
|
|
82
|
+
);
|
|
84
83
|
if (sidebarCommunitiesManageDiv) {
|
|
84
|
+
const userCommunitiesMemberships = JSON.parse(
|
|
85
|
+
sidebarCommunitiesManageDiv.dataset.userCommunitiesMemberships
|
|
86
|
+
);
|
|
87
|
+
const recordCommunityEndpoint =
|
|
88
|
+
sidebarCommunitiesManageDiv.dataset.recordCommunityEndpoint;
|
|
85
89
|
const recordCommunitySearchConfig = JSON.parse(
|
|
86
90
|
sidebarCommunitiesManageDiv.dataset.recordCommunitySearchConfig
|
|
87
91
|
);
|
|
88
|
-
const
|
|
89
|
-
sidebarCommunitiesManageDiv.dataset.
|
|
92
|
+
const recordUserCommunitySearchConfig = JSON.parse(
|
|
93
|
+
sidebarCommunitiesManageDiv.dataset.recordUserCommunitySearchConfig
|
|
94
|
+
);
|
|
95
|
+
const pendingCommunitiesSearchConfig = JSON.parse(
|
|
96
|
+
sidebarCommunitiesManageDiv.dataset.pendingCommunitiesSearchConfig
|
|
97
|
+
);
|
|
98
|
+
const permissions = JSON.parse(sidebarCommunitiesManageDiv.dataset.permissions);
|
|
99
|
+
const record = JSON.parse(sidebarCommunitiesManageDiv.dataset.record);
|
|
90
100
|
ReactDOM.render(
|
|
91
101
|
<OverridableContext.Provider value={overriddenComponents}>
|
|
92
102
|
<Overridable
|
|
93
103
|
id="InvenioAppRdm.RecordLandingPage.CommunitiesManagement.container"
|
|
94
|
-
userCommunitiesMemberships={
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
recordCommunityEndpoint={
|
|
98
|
-
sidebarCommunitiesManageDiv.dataset.recordCommunityEndpoint
|
|
99
|
-
}
|
|
100
|
-
recordUserCommunitySearchConfig={JSON.parse(
|
|
101
|
-
sidebarCommunitiesManageDiv.dataset.recordUserCommunitySearchConfig
|
|
102
|
-
)}
|
|
104
|
+
userCommunitiesMemberships={userCommunitiesMemberships}
|
|
105
|
+
recordCommunityEndpoint={recordCommunityEndpoint}
|
|
106
|
+
recordUserCommunitySearchConfig={recordUserCommunitySearchConfig}
|
|
103
107
|
recordCommunitySearchConfig={recordCommunitySearchConfig}
|
|
104
|
-
permissions={
|
|
105
|
-
searchConfig={
|
|
106
|
-
record={
|
|
108
|
+
permissions={permissions}
|
|
109
|
+
searchConfig={pendingCommunitiesSearchConfig}
|
|
110
|
+
record={record}
|
|
107
111
|
>
|
|
108
112
|
<CommunitiesManagement
|
|
109
|
-
userCommunitiesMemberships={
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
recordCommunityEndpoint={
|
|
113
|
-
sidebarCommunitiesManageDiv.dataset.recordCommunityEndpoint
|
|
114
|
-
}
|
|
115
|
-
recordUserCommunitySearchConfig={JSON.parse(
|
|
116
|
-
sidebarCommunitiesManageDiv.dataset.recordUserCommunitySearchConfig
|
|
117
|
-
)}
|
|
113
|
+
userCommunitiesMemberships={userCommunitiesMemberships}
|
|
114
|
+
recordCommunityEndpoint={recordCommunityEndpoint}
|
|
115
|
+
recordUserCommunitySearchConfig={recordUserCommunitySearchConfig}
|
|
118
116
|
recordCommunitySearchConfig={recordCommunitySearchConfig}
|
|
119
|
-
permissions={
|
|
120
|
-
searchConfig={
|
|
121
|
-
record={
|
|
117
|
+
permissions={permissions}
|
|
118
|
+
searchConfig={pendingCommunitiesSearchConfig}
|
|
119
|
+
record={record}
|
|
122
120
|
/>
|
|
123
121
|
</Overridable>
|
|
124
122
|
</OverridableContext.Provider>,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of InvenioRDM
|
|
2
|
-
// Copyright (C) 2020-
|
|
2
|
+
// Copyright (C) 2020-2025 CERN.
|
|
3
3
|
// Copyright (C) 2020-2021 Northwestern University.
|
|
4
4
|
// Copyright (C) 2021 Graz University of Technology.
|
|
5
5
|
//
|
|
@@ -32,7 +32,7 @@ $(".dropdown.export").dropdown({
|
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
const $licensesPopup = $("#licenses
|
|
35
|
+
const $licensesPopup = $("#licenses .has-popup .license.clickable");
|
|
36
36
|
|
|
37
37
|
// Licenses description popup
|
|
38
38
|
$licensesPopup.popup({
|
|
@@ -49,18 +49,18 @@ $licensesPopup.popup({
|
|
|
49
49
|
|
|
50
50
|
$licensesPopup.on("keydown", function (event) {
|
|
51
51
|
if (event.key === "Enter") {
|
|
52
|
-
$
|
|
52
|
+
$licensesPopup.popup("hide");
|
|
53
53
|
$(event.target).popup("show");
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
$("#licenses .licenses-description .close.icon").on({
|
|
58
58
|
click: function () {
|
|
59
|
-
$
|
|
59
|
+
$licensesPopup.popup("hide");
|
|
60
60
|
},
|
|
61
61
|
keydown: function (event) {
|
|
62
62
|
if (event.key === "Enter") {
|
|
63
|
-
$
|
|
63
|
+
$licensesPopup.popup("hide");
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
});
|
|
@@ -204,7 +204,7 @@ export const RDMEmptyResults = ({ queryString, searchPath, resetQuery }) => {
|
|
|
204
204
|
<Grid.Column width={12} textAlign="center">
|
|
205
205
|
<Header as="h2">
|
|
206
206
|
{i18next.t("We couldn't find any matches for {{- search}}", {
|
|
207
|
-
search: (queryString && `'${queryString}'`) || "your search",
|
|
207
|
+
search: (queryString && `'${queryString}'`) || i18next.t("your search"),
|
|
208
208
|
})}
|
|
209
209
|
</Header>
|
|
210
210
|
</Grid.Column>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2020-
|
|
2
|
+
* Copyright (C) 2020-2025 CERN.
|
|
3
3
|
* Copyright (C) 2020 Northwestern University.
|
|
4
4
|
* Copyright (C) 2021 Graz University of Technology.
|
|
5
5
|
* Copyright (C) 2021 New York University.
|
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
* it under the terms of the MIT License; see LICENSE file for more details.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
#licenses ul.details-list
|
|
11
|
+
#licenses ul.details-list,
|
|
12
|
+
#licenses dl.details-list {
|
|
12
13
|
list-style-type: none;
|
|
13
14
|
|
|
14
|
-
li
|
|
15
|
+
li,
|
|
16
|
+
dd {
|
|
15
17
|
margin: .5rem 0;
|
|
16
18
|
|
|
17
19
|
&:first-child {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2023-
|
|
3
|
+
# Copyright (C) 2023-2025 CERN.
|
|
4
4
|
# Copyright (C) 2024-2025 Graz University of Technology.
|
|
5
|
+
# Copyright (C) 2025 Northwestern University.
|
|
5
6
|
#
|
|
6
7
|
# Invenio-App-RDM is free software; you can redistribute it and/or modify
|
|
7
8
|
# it under the terms of the MIT License; see LICENSE file for more details.
|
|
8
9
|
|
|
9
|
-
"""Record migration script from InvenioRDM
|
|
10
|
+
"""Record migration script from InvenioRDM 12.0 to 13.0.
|
|
10
11
|
|
|
11
12
|
Disclaimer: This script is intended to be executed *only once*, namely when
|
|
12
|
-
upgrading from InvenioRDM
|
|
13
|
+
upgrading from InvenioRDM 12.0 to 13.0!
|
|
13
14
|
If this script is executed at any other time, probably the best case scenario
|
|
14
15
|
is that nothing happens!
|
|
15
16
|
|
|
@@ -20,11 +21,19 @@ This script has been tested with following data:
|
|
|
20
21
|
- internal_notes
|
|
21
22
|
"""
|
|
22
23
|
|
|
24
|
+
import sys
|
|
25
|
+
import traceback
|
|
26
|
+
|
|
23
27
|
from click import secho
|
|
24
28
|
from invenio_access.permissions import system_identity
|
|
25
29
|
from invenio_db import db
|
|
26
30
|
from invenio_rdm_records.proxies import current_rdm_records_service as records_service
|
|
31
|
+
from invenio_search import current_search_client as search_client
|
|
27
32
|
from invenio_search.engine import dsl
|
|
33
|
+
from invenio_search.utils import prefix_index
|
|
34
|
+
from invenio_vocabularies.contrib.affiliations.api import Affiliation
|
|
35
|
+
from invenio_vocabularies.contrib.names.api import Name
|
|
36
|
+
from sqlalchemy import select
|
|
28
37
|
|
|
29
38
|
|
|
30
39
|
def run_upgrade(has, migrate):
|
|
@@ -113,12 +122,97 @@ def run_upgrade_for_thesis():
|
|
|
113
122
|
secho("Thesis upgrade has finished.", fg="green")
|
|
114
123
|
|
|
115
124
|
|
|
125
|
+
def run_upgrade_for_affiliations():
|
|
126
|
+
"""Update affiliations entry so that they conform to new shape."""
|
|
127
|
+
secho("Affiliations upgrade has started.", fg="green")
|
|
128
|
+
|
|
129
|
+
error = False
|
|
130
|
+
# Batch intake to limit memory usage
|
|
131
|
+
stmt = select(Affiliation.model_cls).execution_options(yield_per=250)
|
|
132
|
+
|
|
133
|
+
for affiliation_model in db.session.scalars(stmt):
|
|
134
|
+
try:
|
|
135
|
+
data_for_affiliation = affiliation_model.data
|
|
136
|
+
data_for_affiliation.pop("id", None)
|
|
137
|
+
data_for_affiliation.pop("pid", None)
|
|
138
|
+
affiliation = Affiliation(data_for_affiliation, model=affiliation_model)
|
|
139
|
+
affiliation.commit()
|
|
140
|
+
except Exception as e:
|
|
141
|
+
secho(f"Migration failed with '{repr(e)}'.", fg="red")
|
|
142
|
+
secho(f"Affiliation {affiliation_model.pid} failed to update", fg="red")
|
|
143
|
+
trace = traceback.format_exc()
|
|
144
|
+
secho(f"Traceback {trace}", fg="red")
|
|
145
|
+
error = True
|
|
146
|
+
break
|
|
147
|
+
|
|
148
|
+
if error:
|
|
149
|
+
db.session.rollback()
|
|
150
|
+
secho("Affiliations upgrade failed.", fg="red")
|
|
151
|
+
sys.exit(1)
|
|
152
|
+
else:
|
|
153
|
+
db.session.commit()
|
|
154
|
+
secho("Affiliations upgrade succeeded.", fg="green")
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def run_upgrade_for_names():
|
|
158
|
+
"""Update names entry so that they conform to new shape."""
|
|
159
|
+
secho("Names upgrade has started.", fg="green")
|
|
160
|
+
|
|
161
|
+
error = False
|
|
162
|
+
# Batch intake to limit memory usage
|
|
163
|
+
stmt = select(Name.model_cls).execution_options(yield_per=250)
|
|
164
|
+
|
|
165
|
+
for name_model in db.session.scalars(stmt):
|
|
166
|
+
try:
|
|
167
|
+
data_for_name = name_model.data
|
|
168
|
+
data_for_name.pop("id", None)
|
|
169
|
+
data_for_name.pop("pid", None)
|
|
170
|
+
name = Name(data_for_name, model=name_model)
|
|
171
|
+
name.commit()
|
|
172
|
+
except Exception as e:
|
|
173
|
+
secho(f"Migration failed with '{repr(e)}'.", fg="red")
|
|
174
|
+
secho(f"Name {name_model.pid} failed to update", fg="red")
|
|
175
|
+
trace = traceback.format_exc()
|
|
176
|
+
secho(f"Traceback {trace}", fg="red")
|
|
177
|
+
error = True
|
|
178
|
+
break
|
|
179
|
+
|
|
180
|
+
if error:
|
|
181
|
+
db.session.rollback()
|
|
182
|
+
secho("Names upgrade failed.", fg="red")
|
|
183
|
+
sys.exit(1)
|
|
184
|
+
else:
|
|
185
|
+
db.session.commit()
|
|
186
|
+
secho("Names upgrade succeeded.", fg="green")
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def run_upgrade_for_event_stats_mappings():
|
|
190
|
+
"""Update the live event stats mappings to add missing fields."""
|
|
191
|
+
secho("Event stats mappings upgrade has started.", fg="green")
|
|
192
|
+
|
|
193
|
+
# Find the latest mappings for views and download stats events
|
|
194
|
+
for event_type in ("record-view", "file-download"):
|
|
195
|
+
try:
|
|
196
|
+
events_index = prefix_index(f"events-stats-{event_type}-*")
|
|
197
|
+
res = search_client.indices.get(events_index)
|
|
198
|
+
last_two_indices = sorted(res.keys())[-2:]
|
|
199
|
+
for index in last_two_indices:
|
|
200
|
+
res = search_client.indices.put_mapping(
|
|
201
|
+
index=index,
|
|
202
|
+
body={"properties": {"is_machine": {"type": "boolean"}}},
|
|
203
|
+
)
|
|
204
|
+
except Exception as e:
|
|
205
|
+
secho(f"Mapping update for {event_type} failed with '{repr(e)}'.", fg="red")
|
|
206
|
+
trace = traceback.format_exc()
|
|
207
|
+
secho(f"Traceback {trace}", fg="red")
|
|
208
|
+
secho("Event stats mappings upgrade succeeded.", fg="green")
|
|
209
|
+
|
|
210
|
+
|
|
116
211
|
def execute_upgrade():
|
|
117
212
|
"""Execute the upgrade from InvenioRDM 12.0 to 13.0.0.
|
|
118
213
|
|
|
119
214
|
Please read the disclaimer on this module before thinking about executing
|
|
120
215
|
this function!
|
|
121
|
-
THIS MODULE IS WORK IN PROGRESS, UNTIL official v13 release
|
|
122
216
|
|
|
123
217
|
NOTE:
|
|
124
218
|
since the data upgrade steps are more selective now, the approach how to do
|
|
@@ -131,6 +225,9 @@ def execute_upgrade():
|
|
|
131
225
|
secho("Starting data migration...", fg="green")
|
|
132
226
|
|
|
133
227
|
run_upgrade_for_thesis()
|
|
228
|
+
run_upgrade_for_affiliations()
|
|
229
|
+
run_upgrade_for_names()
|
|
230
|
+
run_upgrade_for_event_stats_mappings()
|
|
134
231
|
|
|
135
232
|
|
|
136
233
|
# if the script is executed on its own, perform the upgrade
|
{invenio_app_rdm-14.0.0b0.dev1.dist-info → invenio_app_rdm-14.0.0b0.dev3.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: invenio-app-rdm
|
|
3
|
-
Version: 14.0.0b0.
|
|
3
|
+
Version: 14.0.0b0.dev3
|
|
4
4
|
Summary: Invenio Research Data Management.
|
|
5
5
|
Home-page: https://github.com/inveniosoftware/invenio-app-rdm
|
|
6
6
|
Author: CERN
|
|
@@ -101,9 +101,34 @@ https://inveniordm.docs.cern.ch
|
|
|
101
101
|
Changes
|
|
102
102
|
=======
|
|
103
103
|
|
|
104
|
+
Version v14.0.0b0.dev3 (released 2025-08-26)
|
|
105
|
+
|
|
106
|
+
- fix(community-requests): request permissions were missing from UI
|
|
107
|
+
* The community requests page was not showing the request reviewers section
|
|
108
|
+
because the permissions were not passed to the template.
|
|
109
|
+
|
|
110
|
+
Version v14.0.0b0.dev2 (released 2025-08-08)
|
|
111
|
+
|
|
112
|
+
- fix(views): use correct community value
|
|
113
|
+
* After the change in 33f1b0d2, values passed to the UI or used for
|
|
114
|
+
accessing UI-related attributes (e.g. the "theme"), must come from
|
|
115
|
+
the community UI-serialized value instead of the service result item.
|
|
116
|
+
- fix(pages): add community base template as a valid option
|
|
117
|
+
- feat(fixtures): allow specifying `template_name` in page fixtures
|
|
118
|
+
- ui: refactor record injecting in JS components
|
|
119
|
+
- inject only record links in citations cmps
|
|
120
|
+
- remove dependency between citations and communities cmps which
|
|
121
|
+
they were sharing the same record injection
|
|
122
|
+
- fix(deposits): pass missing community_ui to community theme templates
|
|
123
|
+
* also introduce more explicit distinctions between community and
|
|
124
|
+
community_ui variables
|
|
125
|
+
- UI: set order of entries and rename category to deposits
|
|
126
|
+
- UI: make external resources section consistent with details
|
|
127
|
+
- UI: make rights section consistent with details
|
|
128
|
+
|
|
104
129
|
Version v14.0.0b0.dev1 (released 2025-08-01)
|
|
105
130
|
|
|
106
|
-
- setup: bump invenio-communities and invenio-rdm-records
|
|
131
|
+
- setup: bump invenio-communities and invenio-rdm-records
|
|
107
132
|
- theme: add search overrides for reviewers search results
|
|
108
133
|
- requests: add request action_accept permissions to UI
|
|
109
134
|
- theme: update package-lock.json for compiling catalog for frontend tests
|