config: hide person id from search #384
Annotations
11 errors
|
Run tests:
site/tests/conftest.py#L1
isort-check
from collections import namedtuple
import pytest
-from cds_rdm.permissions import (CDSCommunitiesPermissionPolicy,
- CDSRDMRecordPermissionPolicy)
-from cds_rdm.schemes import is_inspire_author, is_legacy_cds
-from flask_webpackext.manifest import (JinjaManifest, JinjaManifestEntry,
- JinjaManifestLoader)
+from flask_webpackext.manifest import (
+ JinjaManifest,
+ JinjaManifestEntry,
+ JinjaManifestLoader,
+)
from invenio_access.models import ActionRoles
from invenio_access.permissions import superuser_access, system_identity
from invenio_accounts import testutils
from invenio_rdm_records.cli import create_records_custom_field
from invenio_records_resources.proxies import current_service_registry
from invenio_users_resources.records.api import UserAggregate
-from invenio_vocabularies.config import \
- VOCABULARIES_NAMES_SCHEMES as DEFAULT_VOCABULARIES_NAMES_SCHEMES
+from invenio_vocabularies.config import (
+ VOCABULARIES_NAMES_SCHEMES as DEFAULT_VOCABULARIES_NAMES_SCHEMES,
+)
from invenio_vocabularies.contrib.awards.api import Award
from invenio_vocabularies.contrib.funders.api import Funder
from invenio_vocabularies.proxies import current_service as vocabulary_service
from invenio_vocabularies.records.api import Vocabulary
+
+from cds_rdm.permissions import (
+ CDSCommunitiesPermissionPolicy,
+ CDSRDMRecordPermissionPolicy,
+)
+from cds_rdm.schemes import is_inspire_author, is_legacy_cds
class MockJinjaManifest(JinjaManifest):
|
Run tests:
site/tests/conftest.py#L1
Black format check
--- /home/runner/work/cds-rdm/cds-rdm/site/tests/conftest.py 2024-12-12 19:07:38.408481+00:00
+++ /home/runner/work/cds-rdm/cds-rdm/site/tests/conftest.py 2024-12-12 19:11:43.183153+00:00
@@ -8,15 +8,20 @@
"""Pytest fixtures."""
from collections import namedtuple
import pytest
-from cds_rdm.permissions import (CDSCommunitiesPermissionPolicy,
- CDSRDMRecordPermissionPolicy)
+from cds_rdm.permissions import (
+ CDSCommunitiesPermissionPolicy,
+ CDSRDMRecordPermissionPolicy,
+)
from cds_rdm.schemes import is_inspire_author, is_legacy_cds
-from flask_webpackext.manifest import (JinjaManifest, JinjaManifestEntry,
- JinjaManifestLoader)
+from flask_webpackext.manifest import (
+ JinjaManifest,
+ JinjaManifestEntry,
+ JinjaManifestLoader,
+)
from invenio_access.models import ActionRoles
from invenio_access.permissions import superuser_access, system_identity
from invenio_accounts import testutils
from invenio_accounts.models import Role
from invenio_administration.permissions import administration_access_action
@@ -24,12 +29,13 @@
from invenio_cern_sync.users.profile import CERNUserProfileSchema
from invenio_pidstore.models import PersistentIdentifier, PIDStatus
from invenio_rdm_records.cli import create_records_custom_field
from invenio_records_resources.proxies import current_service_registry
from invenio_users_resources.records.api import UserAggregate
-from invenio_vocabularies.config import \
- VOCABULARIES_NAMES_SCHEMES as DEFAULT_VOCABULARIES_NAMES_SCHEMES
+from invenio_vocabularies.config import (
+ VOCABULARIES_NAMES_SCHEMES as DEFAULT_VOCABULARIES_NAMES_SCHEMES,
+)
from invenio_vocabularies.contrib.awards.api import Award
from invenio_vocabularies.contrib.funders.api import Funder
from invenio_vocabularies.proxies import current_service as vocabulary_service
from invenio_vocabularies.records.api import Vocabulary
|
Run tests:
site/tests/test_merge_names.py#L1
isort-check
"""Task tests."""
from datetime import datetime, timedelta
-from cds_rdm.tasks import sync_local_accounts_to_names
from invenio_access.permissions import system_identity
from invenio_records_resources.proxies import current_service_registry
from invenio_search.engine import dsl
from invenio_vocabularies.contrib.names.api import Name
+
+from cds_rdm.tasks import sync_local_accounts_to_names
def test_sync_name_with_existing_orcid(app, database, user_3, name_user_3):
|
Run tests:
site/tests/test_tasks.py#L1
isort-check
"""Task tests."""
from datetime import datetime, timedelta
-from cds_rdm.tasks import (merge_duplicate_names_vocabulary,
- sync_local_accounts_to_names)
from invenio_access.permissions import system_identity
from invenio_records_resources.proxies import current_service_registry
from invenio_search.engine import dsl
from invenio_vocabularies.contrib.names.api import Name
+
+from cds_rdm.tasks import merge_duplicate_names_vocabulary, sync_local_accounts_to_names
def test_sync_and_merge_local_accounts_to_names(
|
Run tests:
site/tests/test_tasks.py#L1
Black format check
--- /home/runner/work/cds-rdm/cds-rdm/site/tests/test_tasks.py 2024-12-12 19:07:38.408481+00:00
+++ /home/runner/work/cds-rdm/cds-rdm/site/tests/test_tasks.py 2024-12-12 19:12:09.111467+00:00
@@ -6,12 +6,11 @@
# the terms of the MIT License; see LICENSE file for more details.
"""Task tests."""
from datetime import datetime, timedelta
-from cds_rdm.tasks import (merge_duplicate_names_vocabulary,
- sync_local_accounts_to_names)
+from cds_rdm.tasks import merge_duplicate_names_vocabulary, sync_local_accounts_to_names
from invenio_access.permissions import system_identity
from invenio_records_resources.proxies import current_service_registry
from invenio_search.engine import dsl
from invenio_vocabularies.contrib.names.api import Name
|
Run tests:
site/tests/test_tasks.py#L74
test_sync_name_with_existing_orcid
sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "uq_name_metadata_internal_id"
DETAIL: Key (internal_id)=(846610) already exists.
[SQL: UPDATE name_metadata SET updated=%(updated)s, version_id=%(version_id)s, internal_id=%(internal_id)s WHERE name_metadata.id = %(name_metadata_id)s AND name_metadata.version_id = %(name_metadata_version_id)s]
[parameters: {'updated': datetime.datetime(2024, 12, 12, 19, 12, 17, 540580), 'version_id': 7, 'internal_id': '846610', 'name_metadata_id': UUID('164b5b93-6a75-4912-b67b-66e3bae784db'), 'name_metadata_version_id': 6}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
|
Run tests:
site/cds_rdm/cli.py#L1
isort-check
from invenio_pidstore.models import PersistentIdentifier
from invenio_rdm_records.proxies import current_rdm_records_service
from invenio_rdm_records.records.api import RDMDraft, RDMRecord
-from invenio_rdm_records.records.models import (RDMDraftMetadata,
- RDMFileDraftMetadata,
- RDMFileRecordMetadata,
- RDMParentCommunity,
- RDMRecordMetadata,
- RDMVersionsState)
+from invenio_rdm_records.records.models import (
+ RDMDraftMetadata,
+ RDMFileDraftMetadata,
+ RDMFileRecordMetadata,
+ RDMParentCommunity,
+ RDMRecordMetadata,
+ RDMVersionsState,
+)
from invenio_requests.proxies import current_requests_service
from invenio_requests.records.api import Request
from invenio_requests.records.models import RequestMetadata
|
Run tests:
site/cds_rdm/cli.py#L1
Black format check
--- /home/runner/work/cds-rdm/cds-rdm/site/cds_rdm/cli.py 2024-12-12 19:07:38.408481+00:00
+++ /home/runner/work/cds-rdm/cds-rdm/site/cds_rdm/cli.py 2024-12-12 19:12:38.104249+00:00
@@ -13,16 +13,18 @@
from invenio_access.permissions import system_identity
from invenio_db import db
from invenio_pidstore.models import PersistentIdentifier
from invenio_rdm_records.proxies import current_rdm_records_service
from invenio_rdm_records.records.api import RDMDraft, RDMRecord
-from invenio_rdm_records.records.models import (RDMDraftMetadata,
- RDMFileDraftMetadata,
- RDMFileRecordMetadata,
- RDMParentCommunity,
- RDMRecordMetadata,
- RDMVersionsState)
+from invenio_rdm_records.records.models import (
+ RDMDraftMetadata,
+ RDMFileDraftMetadata,
+ RDMFileRecordMetadata,
+ RDMParentCommunity,
+ RDMRecordMetadata,
+ RDMVersionsState,
+)
from invenio_requests.proxies import current_requests_service
from invenio_requests.records.api import Request
from invenio_requests.records.models import RequestMetadata
|
Run tests:
site/cds_rdm/files.py#L1
isort-check
HTTPKerberosAuth = type("obj", (object,), {})
DISABLED = 3
# use base PyFSFileStorage instead
- from invenio_files_rest.storage.pyfs import \
- PyFSFileStorage as BaseFileStorage
+ from invenio_files_rest.storage.pyfs import PyFSFileStorage as BaseFileStorage
class OffloadFileStorage(BaseFileStorage):
|
Run tests:
site/cds_rdm/files.py#L1
Black format check
--- /home/runner/work/cds-rdm/cds-rdm/site/cds_rdm/files.py 2024-12-12 19:07:38.408481+00:00
+++ /home/runner/work/cds-rdm/cds-rdm/site/cds_rdm/files.py 2024-12-12 19:12:39.893539+00:00
@@ -24,12 +24,11 @@
except ImportError:
# fake requests_kerberos
HTTPKerberosAuth = type("obj", (object,), {})
DISABLED = 3
# use base PyFSFileStorage instead
- from invenio_files_rest.storage.pyfs import \
- PyFSFileStorage as BaseFileStorage
+ from invenio_files_rest.storage.pyfs import PyFSFileStorage as BaseFileStorage
class OffloadFileStorage(BaseFileStorage):
"""Offload file downloads to another server."""
|
Loading