Skip to content

Extend search-query package with parser for PubMed search queries#26

Merged
geritwagner merged 32 commits intoCoLRev-Environment:mainfrom
k-schnickmann:main
Apr 15, 2025
Merged

Extend search-query package with parser for PubMed search queries#26
geritwagner merged 32 commits intoCoLRev-Environment:mainfrom
k-schnickmann:main

Conversation

@k-schnickmann
Copy link
Contributor

This pull request extends the search-query package with a PubMed parser, enabling the input and syntactic validation of PubMed search queries.

Main Changes

  • Implemented the PubmedParser class to support the parsing of PubMed queries.
  • Added validation methods for syntactic validation of PubMed queries.
  • Added custom PubMed error codes and support for search field translation in constants.py.
  • Defined custom PubMed exceptions in exception.py.

@geritwagner

This comment was marked as resolved.

@k-schnickmann

This comment was marked as resolved.

@geritwagner

This comment was marked as resolved.

@geritwagner geritwagner merged commit 3cadc98 into CoLRev-Environment:main Apr 15, 2025
30 checks passed
@k-schnickmann
Copy link
Contributor Author

Hi @geritwagner, I’ve found another small error in the PubMed parser: at lines 244 and 341, compound queries are incorrectly getting a field value assigned. Both of those should be set to None. See commit for fixes.

@geritwagner
Copy link
Contributor

Thank you for catching the error and suggesting the fix. This is probably something I introduced when rewriting the code. I just integrated it here.

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.

2 participants