Skip to content

feat(rdm.migration): Configurable auto-adding secondary community - #544

Open
sakshamarora1 wants to merge 4 commits into
CERNDocumentServer:masterfrom
sakshamarora1:feat/add_publications_to_cern_research
Open

feat(rdm.migration): Configurable auto-adding secondary community#544
sakshamarora1 wants to merge 4 commits into
CERNDocumentServer:masterfrom
sakshamarora1:feat/add_publications_to_cern_research

Conversation

@sakshamarora1

Copy link
Copy Markdown
Contributor

Comment thread cds_migrator_kit/rdm/records/transform/config.py Outdated
Comment thread cds_migrator_kit/rdm/records/transform/transform.py
@sakshamarora1
sakshamarora1 force-pushed the feat/add_publications_to_cern_research branch from bf187da to 4eab511 Compare July 2, 2026 13:52
@sakshamarora1
sakshamarora1 force-pushed the feat/add_publications_to_cern_research branch from 4eab511 to 53f4ac6 Compare July 30, 2026 15:44
Comment thread cds_migrator_kit/rdm/records/transform/config.py Outdated
Comment thread cds_migrator_kit/rdm/records/transform/transform.py
"publication-book",
"publication-section",
"publication-conferencepaper",
"publication-conferenceproceeding",

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.

to add: 'publication-conferencenote', added recently

"""
if self.restricted or record.get("access") != "public":
return False
if any(file.get("status") for file in entry.get("files", [])):

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.

are you sure that this covers everything? I would also check if the output json in access.files has it set to restricted or not

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tested all the possible scenarios in the test cases. Could you also check that and let me know if something is missing?

There is no access.files populated in this flow. Do you mean here? It only sets enabled key

record_json_output = {
"files": self._files(record_dump),
"pids": self._pids(json_data),
"metadata": self._metadata(json_data, entry),
}

def _files(self, record_dump):
"""Transform the files of a record."""
record_dump.prepare_files()
files = record_dump.files
return {"enabled": bool(files)}

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.

thanks for checking this. One more case comes to mind: we can set the whole collection to restricted, in this case we shouldn't add the scientific community either

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread cds_migrator_kit/rdm/records/transform/transform.py
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.

Migration workflow: add research types to CERN_SCIENTIFIC_COMMUNITY

2 participants