-
Notifications
You must be signed in to change notification settings - Fork 11
feat(north-area): add NA6* migration models #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,39 @@ | ||
| """Fields which we can confidently ignore in each model.""" | ||
|
|
||
| IGNORE_SYSTEM_KEYS = { | ||
| "0247_9", # provenance of the DOI | ||
| "0248_a", | ||
| "0248_p", | ||
| "0248_q", | ||
| "852__c", # holdings will be taken separately | ||
| "852__h", | ||
| "035__z", # arxiv identifier (e.g. https://cds.cern.ch/record/1054291/export/hm?no_redirect_migrated) | ||
| "035__h", # OAI harvest tag or timestamp | ||
| "035__d", # OAI harvest tag or timestamp | ||
| "035__m", # OAI harvest format (e.g. `marcxml`) | ||
| "035__t", # oai harvest tag | ||
| "035__u", # oai harvest tag | ||
| "035__z", # oai harvest tag | ||
| "037__c", # arxiv subject | ||
| "100__m", # email of contributor | ||
| "245__9", # Provenance of title | ||
| "270__m", # Contact email | ||
| "300__a", # number of pages | ||
| "520__9", # Provenance of the description | ||
| "540__3", # Material of the license | ||
| "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__o", # from SIS: can be ignored | ||
| "773__x", # INSPIRE publication note | ||
|
Comment on lines
+26
to
+29
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm not sure adding these to a common ignore keys list, it might be used differently for some collections. SIS team said we can ignore these for NA6* or these fields can be ignored everywhere? |
||
| "8564_8", # file id | ||
| "8564_s", # bibdoc id | ||
| "8564_x", # icon thumbnails sizes | ||
| "8564_y", # file description - done by files dump | ||
| "8564_8", # File information (done by file dump) | ||
| "8564_q", # File links File information (done by file dump) | ||
| "8564_z", # Websubmit "stamp" (migrated as file metadata) | ||
| "916__y", # year, redundant value | ||
| "937__c", # last modified by | ||
| "937__s", # last modification date | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # | ||
| # Copyright (C) 2026 CERN. | ||
| # | ||
| # 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).""" | ||
|
|
||
| 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 ( | ||
| rdm_base_publication_model, | ||
| ) | ||
| from cds_migrator_kit.transform.overdo import CdsOverdo | ||
|
|
||
|
|
||
| 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""" | ||
|
|
||
| __ignore_keys__ = IGNORE_SYSTEM_KEYS | { | ||
| "270__m", # Email of contact person | ||
| "500__9", # Provenance of the note | ||
| "903__s", # 'public' | ||
| "905__m", # Submitter email address | ||
|
zzacharo marked this conversation as resolved.
|
||
| "995__a", # "Inspire" | ||
| } | ||
|
|
||
| _default_fields = { | ||
| "custom_fields": {}, | ||
| } | ||
|
|
||
|
|
||
| north_area_model = NorthAreaModel( | ||
| bases=(rdm_base_publication_model,), | ||
| entry_point_group="cds_migrator_kit.migrator.rules.north_area", | ||
| ) | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -388,7 +388,7 @@ records: | |
| data_dir: cds_migrator_kit/rdm/data/isolde | ||
| plots: true | ||
| create_inclusion_request: true | ||
| preferred_model: isolde # set to resolve MultipleModelsMatched as warning instead of error | ||
| preferred_model: isolde # set to resolve MultipleModelsMatched as warning instead of error | ||
| extract: | ||
| dirpath: cds_migrator_kit/rdm/data/isolde/dump/ | ||
| transform: | ||
|
|
@@ -675,6 +675,72 @@ records: | |
| missing_users: cds_migrator_kit/rdm/data/users | ||
| communities_ids: | ||
| - "88a105fe-4713-493b-b555-6ab398599d21" | ||
| na61: | ||
| data_dir: cds_migrator_kit/rdm/data/north_area/na61 | ||
| plots: true | ||
| create_inclusion_request: true | ||
| extract: | ||
| dirpath: cds_migrator_kit/rdm/data/north_area/na61/dump/ | ||
| transform: | ||
| files_dump_dir: cds_migrator_kit/rdm/data/north_area/na61/files/ | ||
| missing_users: cds_migrator_kit/rdm/data/users | ||
| communities_ids: | ||
| - "" | ||
| na62: | ||
| data_dir: cds_migrator_kit/rdm/data/north_area/na62 | ||
| plots: true | ||
| create_inclusion_request: true | ||
| extract: | ||
| dirpath: cds_migrator_kit/rdm/data/north_area/na62/dump/ | ||
| transform: | ||
| files_dump_dir: cds_migrator_kit/rdm/data/north_area/na62/files/ | ||
| missing_users: cds_migrator_kit/rdm/data/users | ||
| communities_ids: | ||
| - "" | ||
| na63: | ||
| data_dir: cds_migrator_kit/rdm/data/north_area/na63 | ||
| plots: true | ||
| create_inclusion_request: true | ||
| extract: | ||
| dirpath: cds_migrator_kit/rdm/data/north_area/na63/dump/ | ||
| transform: | ||
| files_dump_dir: cds_migrator_kit/rdm/data/north_area/na63/files/ | ||
| missing_users: cds_migrator_kit/rdm/data/users | ||
| communities_ids: | ||
| - "" | ||
| na64: | ||
| data_dir: cds_migrator_kit/rdm/data/north_area/na64 | ||
| plots: true | ||
| create_inclusion_request: true | ||
| extract: | ||
| dirpath: cds_migrator_kit/rdm/data/north_area/na64/dump/ | ||
| transform: | ||
| files_dump_dir: cds_migrator_kit/rdm/data/north_area/na64/files/ | ||
| missing_users: cds_migrator_kit/rdm/data/users | ||
| communities_ids: | ||
| - "" | ||
| na65: | ||
| data_dir: cds_migrator_kit/rdm/data/north_area/na65 | ||
| plots: true | ||
| create_inclusion_request: true | ||
| extract: | ||
| dirpath: cds_migrator_kit/rdm/data/north_area/na65/dump/ | ||
| transform: | ||
| files_dump_dir: cds_migrator_kit/rdm/data/north_area/na65/files/ | ||
| missing_users: cds_migrator_kit/rdm/data/users | ||
| communities_ids: | ||
| - "" | ||
| na66: | ||
| data_dir: cds_migrator_kit/rdm/data/north_area/na66 | ||
| plots: true | ||
| create_inclusion_request: true | ||
| extract: | ||
| dirpath: cds_migrator_kit/rdm/data/north_area/na66/dump/ | ||
| transform: | ||
| files_dump_dir: cds_migrator_kit/rdm/data/north_area/na66/files/ | ||
| missing_users: cds_migrator_kit/rdm/data/users | ||
| communities_ids: | ||
| - "" | ||
|
Comment on lines
+678
to
+743
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these gonna migrated to separate communities? |
||
| comments: | ||
| faser-drafts: | ||
| dir_path: /migration/faser-drafts/comments/ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
were these aligned with SIS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No not yet, I have just put them here on the basis of them being ignored in nearly all models. But we can check with them