Skip to content

Commit

Permalink
datastreams: add affiliations and update funders
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorrell authored and slint committed Jul 15, 2024
1 parent d2a4b75 commit 08b39e3
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions invenio_app_rdm/administration/domains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# under the terms of the MIT License; see LICENSE file for more details.

"""Invenio administration module for user resources."""

from .domains import (
DomainsCreateView,
DomainsDetailView,
Expand Down
1 change: 1 addition & 0 deletions invenio_app_rdm/administration/records/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# under the terms of the MIT License; see LICENSE file for more details.

"""Invenio app rdm records administration module."""

from invenio_app_rdm.administration.records.records import (
DraftAdminListView,
RecordAdminListView,
Expand Down
1 change: 1 addition & 0 deletions invenio_app_rdm/administration/records/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# details.

"""Invenio administration OAI-PMH view module."""

from functools import partial

from flask import current_app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Invenio App RDM is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Invenio administration view module for user moderation."""

from functools import partial

from flask import current_app
Expand Down
1 change: 1 addition & 0 deletions invenio_app_rdm/administration/users/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# under the terms of the MIT License; see LICENSE file for more details.

"""Invenio administration module for user resources."""

from .users import UsersDetailView, UsersListView

__all__ = ("UsersDetailView", "UsersListView")
1 change: 1 addition & 0 deletions invenio_app_rdm/administration/users/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# under the terms of the MIT License; see LICENSE file for more details.

"""Invenio administration users view module."""

from functools import partial

from flask import current_app
Expand Down
1 change: 1 addition & 0 deletions invenio_app_rdm/administration/views/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Invenio App RDM is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Administration ui views module."""

from flask import Blueprint


Expand Down
1 change: 1 addition & 0 deletions invenio_app_rdm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# it under the terms of the MIT License; see LICENSE file for more details.

"""Command-line tools for invenio app rdm."""

import click
from flask.cli import with_appcontext
from invenio_access.permissions import system_identity
Expand Down
10 changes: 7 additions & 3 deletions invenio_app_rdm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
VOCABULARIES_DATASTREAM_TRANSFORMERS,
VOCABULARIES_DATASTREAM_WRITERS,
)
from invenio_vocabularies.contrib.affiliations.datastreams import (
VOCABULARIES_DATASTREAM_WRITERS as AFFILIATIONS_WRITERS,
)
from invenio_vocabularies.contrib.awards.datastreams import (
VOCABULARIES_DATASTREAM_READERS as AWARDS_READERS,
)
Expand All @@ -108,8 +111,8 @@
from invenio_vocabularies.contrib.common.ror.datastreams import (
VOCABULARIES_DATASTREAM_READERS as COMMON_ROR_READERS,
)
from invenio_vocabularies.contrib.funders.datastreams import (
VOCABULARIES_DATASTREAM_TRANSFORMERS as FUNDERS_TRANSFORMERS,
from invenio_vocabularies.contrib.common.ror.datastreams import (
VOCABULARIES_DATASTREAM_TRANSFORMERS as COMMON_ROR_TRANSFORMERS,
)
from invenio_vocabularies.contrib.funders.datastreams import (
VOCABULARIES_DATASTREAM_WRITERS as FUNDERS_WRITERS,
Expand Down Expand Up @@ -697,7 +700,7 @@ def files_rest_permission_factory(obj, action):
VOCABULARIES_DATASTREAM_TRANSFORMERS = {
**VOCABULARIES_DATASTREAM_TRANSFORMERS,
**NAMES_TRANSFORMERS,
**FUNDERS_TRANSFORMERS,
**COMMON_ROR_TRANSFORMERS,
**AWARDS_TRANSFORMERS,
}
"""Data Streams transformers."""
Expand All @@ -707,6 +710,7 @@ def files_rest_permission_factory(obj, action):
**NAMES_WRITERS,
**FUNDERS_WRITERS,
**AWARDS_WRITERS,
**AFFILIATIONS_WRITERS,
}
"""Data Streams writers."""

Expand Down
1 change: 1 addition & 0 deletions invenio_app_rdm/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# under the terms of the MIT License; see LICENSE file for more details.

"""Invenio Research Data Management."""

import warnings
from datetime import timedelta

Expand Down
1 change: 1 addition & 0 deletions invenio_app_rdm/fixtures/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# it under the terms of the MIT License; see LICENSE file for more details.

"""Static pages."""

from pathlib import Path

from flask import current_app
Expand Down
4 changes: 1 addition & 3 deletions invenio_app_rdm/records_ui/views/deposits.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ def _resource_types(self, extra_filter):
{
"icon": hit.get("icon", ""),
"id": hit["id"],
"subtype_name": self._get_type_subtype_label(hit, type_labels)[
1
], # noqa
"subtype_name": self._get_type_subtype_label(hit, type_labels)[1],
"type_name": self._get_type_subtype_label(hit, type_labels)[0],
}
for hit in subset_resource_types.to_dict()["hits"]["hits"]
Expand Down
1 change: 0 additions & 1 deletion invenio_app_rdm/upgrade_scripts/migrate_6_0_to_7_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
is that nothing happens!
"""


from click import secho
from invenio_db import db
from invenio_rdm_records.proxies import current_rdm_records_service
Expand Down
1 change: 0 additions & 1 deletion invenio_app_rdm/users/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

"""RDM User Schemas."""


from invenio_users_resources.services.schemas import (
NotificationPreferences,
UserPreferencesSchema,
Expand Down
1 change: 0 additions & 1 deletion tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# under the terms of the MIT License; see LICENSE file for more details.
"""Test invenio-app-rdm celery tasks."""


from invenio_app_rdm.tasks import file_integrity_report


Expand Down

0 comments on commit 08b39e3

Please sign in to comment.