diff --git a/cds_migrator_kit/rdm/records/transform/config.py b/cds_migrator_kit/rdm/records/transform/config.py index 2bca4a47..0d753020 100644 --- a/cds_migrator_kit/rdm/records/transform/config.py +++ b/cds_migrator_kit/rdm/records/transform/config.py @@ -162,4 +162,6 @@ # Legacy experiment names remapped to vocabulary ids before lookup EXPERIMENT_ALIASES = { "t2k": "re13", + "compass": "NA58", + "compass na58": "NA58", } diff --git a/cds_migrator_kit/rdm/records/transform/models/_config.py b/cds_migrator_kit/rdm/records/transform/models/_config.py index 15b3cf54..c4cbcc12 100644 --- a/cds_migrator_kit/rdm/records/transform/models/_config.py +++ b/cds_migrator_kit/rdm/records/transform/models/_config.py @@ -24,8 +24,8 @@ # "540__9", # Also material of the license # "542__3", # Also material of the license "700__m", # email of contributor - # "773__t", # from SIS: can be ignored - # "773__0", # from SIS: can be ignored + "773__t", # from SIS: can be ignored + "773__0", # from SIS: can be ignored # "773__o", # from SIS: can be ignored # "773__x", # INSPIRE publication note "8564_8", # file id diff --git a/cds_migrator_kit/rdm/records/transform/models/north_area.py b/cds_migrator_kit/rdm/records/transform/models/north_area.py index f4580abf..7e2b8159 100644 --- a/cds_migrator_kit/rdm/records/transform/models/north_area.py +++ b/cds_migrator_kit/rdm/records/transform/models/north_area.py @@ -5,7 +5,7 @@ # CDS-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. -"""CDS-RDM North Area models (NA61-64).""" +"""CDS-RDM North Area models (NA58 & NA61-66).""" from cds_migrator_kit.rdm.records.transform.models._config import IGNORE_SYSTEM_KEYS from cds_migrator_kit.rdm.records.transform.models.base_publication_record import ( @@ -17,8 +17,11 @@ class NorthAreaModel(CdsOverdo): """Translation model for North Area experiments.""" - __query__ = """693__.e:"NA61" OR 693__.e:"SHINE NA61" OR 693__.e:"NA62" OR 693__.e:"NA63" OR 693__.e:"NA64" OR 693__.e:"DsTau NA65" OR 693__.e:"AMBER NA66" - -980__:THESIS -980__:DELETED -980__:HIDDEN -980__:DUMMY""" + __query__ = """ + 693__.e:"COMPASS" OR 693__.e:"COMPASS NA58" OR 693__.e:"NA61" OR 693__.e:"SHINE NA61" OR + 693__.e:"NA62" OR 693__.e:"NA63" OR 693__.e:"NA64" OR 693__.e:"DsTau NA65" OR 693__.e:"AMBER NA66" + -037__:CERN-STUDENTS-Note-* -980__:THESIS -980__:DELETED -980__:HIDDEN -980__:DUMMY + """ __ignore_keys__ = IGNORE_SYSTEM_KEYS | { "270__m", # Email of contact person diff --git a/cds_migrator_kit/rdm/streams.yaml b/cds_migrator_kit/rdm/streams.yaml index 4603be42..7fedc85b 100644 --- a/cds_migrator_kit/rdm/streams.yaml +++ b/cds_migrator_kit/rdm/streams.yaml @@ -622,6 +622,17 @@ records: missing_users: cds_migrator_kit/rdm/data/users communities_ids: - "88a105fe-4713-493b-b555-6ab398599d21" + na58: + data_dir: cds_migrator_kit/rdm/data/north_area/na58 + plots: true + create_inclusion_request: true + extract: + dirpath: cds_migrator_kit/rdm/data/north_area/na58/dump/ + transform: + files_dump_dir: cds_migrator_kit/rdm/data/north_area/na58/files/ + missing_users: cds_migrator_kit/rdm/data/users + communities_ids: + - "" na61: data_dir: cds_migrator_kit/rdm/data/north_area/na61 plots: true diff --git a/cds_migrator_kit/transform/xml_processing/rules/base.py b/cds_migrator_kit/transform/xml_processing/rules/base.py index 0bee20ef..152f1b48 100644 --- a/cds_migrator_kit/transform/xml_processing/rules/base.py +++ b/cds_migrator_kit/transform/xml_processing/rules/base.py @@ -7,7 +7,6 @@ """CDS-RDM migration rules module.""" - import pycountry from cds_dojson.marc21.fields.utils import out_strip from dojson.errors import IgnoreKey @@ -117,7 +116,9 @@ def process_contributors(key, value, orcid_subfield="k"): _affiliations = force_list(value.get("t", "")) affiliations = [] # just to avoid the missing rule exception - text = value.get("u") or value.get("v") + text_u = value.get("u") + text_v = value.get("v") + text = text_u or text_v grid_value = None for aff in _affiliations: if aff: