Skip to content
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

INSPIRE harvester: add reader component #344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anikachurilova
Copy link
Contributor

All the args in the UI:
Screenshot 2025-02-03 at 17 53 52

Copy link
Contributor

@ntarocco ntarocco left a comment

Choose a reason for hiding this comment

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

👏🏼
Will tests come in a subsequent PR?

site/cds_rdm/inspire_harvester/jobs.py Outdated Show resolved Hide resolved
site/cds_rdm/inspire_harvester/reader.py Outdated Show resolved Hide resolved
site/cds_rdm/inspire_harvester/reader.py Show resolved Hide resolved
site/cds_rdm/inspire_harvester/reader.py Outdated Show resolved Hide resolved
self._inspire_id = inspire_id
super().__init__(origin, mode, *args, **kwargs)

def _validate_date_format(self, date):
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't date validated by the args schema? Do we need an additional validator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it is actually not validating the input data, so we need to add the manual validation

@anikachurilova anikachurilova force-pushed the harvester-reader branch 2 times, most recently from 4c76496 to 5fe2b89 Compare February 5, 2025 14:20
invenio.cfg Show resolved Hide resolved
invenio.cfg Show resolved Hide resolved
site/cds_rdm/inspire_harvester/jobs.py Show resolved Hide resolved

def read(self, item=None, *args, **kwargs):
"""Builds a query depending on the input data."""
self._validate_input_args()
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we utilize the InspireArgsSchema to validate the args? I.e. delegate the validation to the marshmallow schema.

site/cds_rdm/inspire_harvester/reader.py Show resolved Hide resolved
@anikachurilova anikachurilova force-pushed the harvester-reader branch 3 times, most recently from b737f4b to 8e3a080 Compare February 7, 2025 15:28
* configure and register the corresponding invenio-job
* create the Reader component
* draft of the Transformer component
* closes CERNDocumentServer#322
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.

INSPIRE to CDS-RDM harvester: implement reader component
4 participants