-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
51191b2
feat(north-area): add NA6* migration models
palkerecsenyi 89d695b
feat(transform): allow matching experiments to vocabulary aliases
palkerecsenyi aff15c7
feat(users): only load user if it doesn't already exist
palkerecsenyi 7fbcfab
comment out some globally added tags pending confirmation for ignorin…
zzacharo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
cds_migrator_kit/rdm/records/transform/models/north_area.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| "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 contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
cds_migrator_kit/rdm/records/transform/xml_processing/quality/__init__.py
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.