Skip to content

add(hse): new model and transformation rules - #393

Open
zubeydecivelek wants to merge 2 commits into
CERNDocumentServer:masterfrom
zubeydecivelek:hse-metadata
Open

zubeydecivelek wants to merge 2 commits into
CERNDocumentServer:masterfrom
zubeydecivelek:hse-metadata

Conversation

@zubeydecivelek

@zubeydecivelek zubeydecivelek commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

closes: #639

python2 analyze_collection_migration.py --collection-name radio_protection --collection-q '980:RP_RESTRICTED'
--------------------------------
Collection: radio_protection
--------------------------------
Collection query: 980:RP_RESTRICTED
--------------------------------
Searching for duplicate records...
Duplicated records to check with same title, description and file checksums:
Found 0 duplicates to check with same title, description and file checksums.
Found 3 981__a (duplicate record id) merge entries on collection recids.
Wrote 2 duplicates to /tmp/radio_protection/legacy_pids_to_redirect.json
--------------------------------
Searching for EP report number duplicates...
Wrote 0 duplicates to /tmp/radio_protection/ep_report_number_dups.json
{"309875": 1023569, "117796": 119661}

@zubeydecivelek zubeydecivelek linked an issue Mar 23, 2026 that may be closed by this pull request
1 task done
@zubeydecivelek
zubeydecivelek marked this pull request as draft March 23, 2026 13:11
@zubeydecivelek zubeydecivelek linked an issue May 7, 2026 that may be closed by this pull request
@zubeydecivelek
zubeydecivelek force-pushed the hse-metadata branch 2 times, most recently from e77456c to 4f62249 Compare May 7, 2026 13:35
@0einstein0 0einstein0 self-assigned this Jun 22, 2026
@sakshamarora1
sakshamarora1 marked this pull request as ready for review October 13, 2026 13:50
"""Translates collection field."""
collection = value.get("a").strip().lower()
# TODO: should we use these collections?
if collection not in ["cern", "preprint", "article", "report"]:

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.

@sakshamarora1 can you check why this is needed?

def access_note(self, key, value):
"""Translates physical medium field."""
access_note = value.get("a").strip()
if access_note and access_note.lower() not in ["free", "restricted"]:

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.

could you verify if restricted records are in fact restricted in legacy or the tag is not indicative?

def note_hse(self, key, value):
"""Translates notes. HSE Articles query is 595__:CERN-HSE."""
_note = force_list(value.get("a", ""))
if _note == ("CERN-HSE",):

@kpsherva kpsherva Oct 21, 2026 •

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.

this is quite strange dependency of resource type and note, can you verify why it is done like this? should CERN-HSE be also assigned as report number?


# Legacy accelerator names remapped to vocabulary ids before lookup
ACCELERATOR_ALIASES = {
"cern aa": "antiproton accumulator",

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.

do we have an entry in the accelerators like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HSE development migration: Radio Protection Restricted Notes Q2 simple collections to analyse

4 participants