Skip to content

Commit

Permalink
Merge branch 'master' into resource-types
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorrell authored Nov 4, 2024
2 parents 155ee48 + 2a4a7af commit 4051f65
Show file tree
Hide file tree
Showing 87 changed files with 3,913 additions and 549 deletions.
88 changes: 88 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
..
Copyright (C) 2019-2024 CERN.
Copyright (C) 2019-2024 Northwestern University.
Copyright (C) 2024 KTH Royal Institute of Technology.

Invenio-RDM-Records is free software; you can redistribute it and/or
Expand All @@ -11,6 +12,93 @@
Changes
=======

Version v15.7.0 (released 2024-11-04)

- resources: make record error handlers configurable
* Possible via the new `RDM_RECORDS_ERROR_HANDLERS` config variable.
- components: make content moderation configurable
* Closes #1861.
* Adds a new `RRM_CONTENT_MODERATION_HANDLERS` config variable to allow
for configuring multiple handlers for the different write actions.
- user_moderation: use search for faster actions
* Use search results to determine the user's list of records.
* Use a TaskOp and Unit of Work to avoid sending Celery tasks immediately.
* Add a cleanup task that will perform a more thorough check using the
DB to lookup the user's records.
- deposit: add missing fields to record deserializer
- UI/UX: add consistent suggestions display to affiliations
- UI/UX: improve display of ROR information
- collections: move records search into service
- collections: added task to compute number of records for each collection
- services: make file-service components configurable
- access notification: provide correct draft preview link
* Closes inveniosoftware/invenio-app-rdm#2827

Version v15.6.0 (released 2024-10-18)

- community: added myCommunitiesEnabled prop to CommunitySelectionSearch

Version v15.5.0 (released 2024-10-18)

- community: added autofocus prop to CommunitySelectionSearch

Version v15.4.0 (released 2024-10-17)

- DOI: fix wrong parent DOI link
- community: added props to make CommunitySelectionSearch reusable

Version v15.3.0 (released 2024-10-16)

- collections: display pages and REST API
- deposit: add feature flag for required community submission flow
- mappings: disable doc_values for geo_shape fields (#1807)
* Fixes multiple values for ``metadata.locaations.features``.

Version v15.2.0 (released 2024-10-10)

- webpack: update axios and react-searchkit(due to axios) major versions

Version v15.1.0 (released 2024-10-10)

- jobs: register embargo update job type
- installation: upgrade invenio-jbs

Version v15.0.0 (released 2024-10-08)

- installation: bump invenio-communities
- dumper: refactor and updated docstring
- awards: added subjects and orgs, updated mappings
- relations: added subject relation in awards

Version v14.0.0 (released 2024-10-04)

- installation: bump invenio-vocabularies & invenio-communities

Version v13.0.0 (released 2024-10-03)

- collections: added feature, containing core functionalities and DB models
- ui: fixed propTypes warnings
- dependencies: bump flask-iiif to >1.0.0

Version v12.2.2 (released 2024-09-30)

- Improve handling of draft PID in RecordCommunitiesService
- Revert "deposit: check permission and set disable tooltip for publish button"
- Remove DeprecationWarning for sqlalchemy
- Add compatibility layer to move to flask>=3

Version v12.2.1 (released 2024-09-19)

- file upload: better handling of errors when uploading empty files
- serializers: ensure that the vocab id is set before performing a look up
- deposit: take into account the can_publish permission to control when the
Publish button should be enabled or disabled

Version v12.1.1 (released 2024-09-11)

- resource: fix add record to community
- controls: refactored isDisabled function

Version v12.1.0 (released 2024-08-30)

- config: added links for thumbnails (#1799)
Expand Down
3 changes: 2 additions & 1 deletion invenio_rdm_records/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# Copyright (C) 2019-2024 CERN.
# Copyright (C) 2019-2024 Northwestern University.
# Copyright (C) 2024 KTH Royal Institute of Technology.
#
# Invenio-RDM-Records is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -10,6 +11,6 @@

from .ext import InvenioRDMRecords

__version__ = "12.1.0"
__version__ = "15.7.0"

__all__ = ("__version__", "InvenioRDMRecords")
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#
# This file is part of Invenio.
# Copyright (C) 2016-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

"""Create collections tables."""

import sqlalchemy as sa
from alembic import op
from sqlalchemy_utils import UUIDType

# revision identifiers, used by Alembic.
revision = "425b691f768b"
down_revision = "ff9bec971d30"
branch_labels = ()
depends_on = None


def upgrade():
"""Upgrade database."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"collections_collection_tree",
sa.Column("created", sa.DateTime(), nullable=False),
sa.Column("updated", sa.DateTime(), nullable=False),
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("community_id", UUIDType(), nullable=True),
sa.Column("title", sa.String(length=255), nullable=False),
sa.Column("order", sa.Integer(), nullable=True),
sa.Column("slug", sa.String(length=255), nullable=False),
sa.ForeignKeyConstraint(
["community_id"],
["communities_metadata.id"],
name=op.f(
"fk_collections_collection_tree_community_id_communities_metadata"
),
ondelete="SET NULL",
),
sa.PrimaryKeyConstraint("id", name=op.f("pk_collections_collection_tree")),
sa.UniqueConstraint(
"slug",
"community_id",
name="uq_collections_collection_tree_slug_community_id",
),
)
op.create_index(
op.f("ix_collections_collection_tree_community_id"),
"collections_collection_tree",
["community_id"],
unique=False,
)

op.create_table(
"collections_collection",
sa.Column("created", sa.DateTime(), nullable=False),
sa.Column("updated", sa.DateTime(), nullable=False),
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("slug", sa.String(length=255), nullable=False),
sa.Column("path", sa.Text(), nullable=False),
sa.Column("tree_id", sa.Integer(), nullable=False),
sa.Column("title", sa.String(length=255), nullable=False),
sa.Column("query", sa.Text(), nullable=False),
sa.Column("order", sa.Integer(), nullable=True),
sa.Column("depth", sa.Integer(), nullable=True),
sa.Column("num_records", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["tree_id"],
["collections_collection_tree.id"],
name=op.f("fk_collections_collection_tree_id_collections_collection_tree"),
),
sa.PrimaryKeyConstraint("id", name=op.f("pk_collections_collection")),
sa.UniqueConstraint(
"slug", "tree_id", name="uq_collections_collection_slug_tree_id"
),
)
op.create_index(
op.f("ix_collections_collection_path"),
"collections_collection",
["path"],
unique=False,
)


def downgrade():
"""Downgrade database."""
op.drop_index(
op.f("ix_collections_collection_path"), table_name="collections_collection"
)
op.drop_table("collections_collection")
op.drop_index(
op.f("ix_collections_collection_tree_community_id"),
table_name="collections_collection_tree",
)
op.drop_table("collections_collection_tree")
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"This package.json is needed to run the JS tests, locally and CI."
],
"scripts": {
"test": "react-scripts test"
"test": "react-scripts test --transformIgnorePatterns /\"node_modules/(?!axios)/\""
},
"devDependencies": {
"@babel/cli": "^7.5.0",
Expand All @@ -20,7 +20,7 @@
"@translations/invenio_rdm_records": "../../translations/invenio_rdm_records",
"ajv": "^8.0.0",
"ajv-keywords": "^5.0.0",
"axios": "^0.21.0",
"axios": "^1.7.7",
"coveralls": "^3.0.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.0",
Expand All @@ -40,11 +40,11 @@
"react-dom": "^16.13.0",
"react-dropzone": "^11.0.0",
"react-i18next": "^11.11.0",
"react-invenio-forms": "^3.0.0",
"react-invenio-forms": "^4.0.0",
"react-overridable": "^0.0.3",
"react-redux": "^7.2.0",
"react-scripts": "^5.0.1",
"react-searchkit": "^2.0.0",
"react-searchkit": "^3.0.0",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0",
"rimraf": "^3.0.0",
Expand All @@ -59,4 +59,4 @@
"typescript": "^4.9.5",
"yup": "^0.32.11"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is part of Invenio-RDM-Records
// Copyright (C) 2020-2023 CERN.
// Copyright (C) 2020-2024 CERN.
// Copyright (C) 2020-2022 Northwestern University.
//
// Invenio-RDM-Records is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -323,6 +323,9 @@ export class RDMDepositRecordSerializer extends DepositRecordSerializer {
"pids",
"ui",
"custom_fields",
"created",
"updated",
"revision_id",
]);

// FIXME: move logic in a more sophisticated PIDField that allows empty values
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is part of Invenio-RDM-Records
// Copyright (C) 2020-2023 CERN.
// Copyright (C) 2020-2024 CERN.
// Copyright (C) 2020-2022 Northwestern University.
//
// Invenio-RDM-Records is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -368,6 +368,7 @@ describe("RDMDepositRecordSerializer tests", () => {
files: false,
metadata: false,
},
created: "2020-10-28 18:35:58.113520",
expanded: {},
id: "wk205-00878",
links: {
Expand Down Expand Up @@ -496,9 +497,11 @@ describe("RDMDepositRecordSerializer tests", () => {
],
version: "v2.0.0",
},
revision_id: 1,
ui: {
publication_date_l10n: "Sep 28, 2020",
},
updated: "2020-10-28 18:35:58.125222",
};
expect(deserializedRecord).toEqual(expectedRecord);
});
Expand Down
Loading

0 comments on commit 4051f65

Please sign in to comment.