Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cds_migrator_kit/rdm/records/transform/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,6 @@
# Legacy experiment names remapped to vocabulary ids before lookup
EXPERIMENT_ALIASES = {
"t2k": "re13",
"compass": "NA58",
"compass na58": "NA58",
}
4 changes: 2 additions & 2 deletions cds_migrator_kit/rdm/records/transform/models/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions cds_migrator_kit/rdm/records/transform/models/north_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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
Expand Down
11 changes: 11 additions & 0 deletions cds_migrator_kit/rdm/streams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: shall we add the locally created communities to fixtures, instead of leaving this empty?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have so far just been dry running so I haven't created a community for it locally, but I can do to make it consistent with the other entries in this file

na61:
data_dir: cds_migrator_kit/rdm/data/north_area/na61
plots: true
Expand Down
5 changes: 3 additions & 2 deletions cds_migrator_kit/transform/xml_processing/rules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Loading