Overview
To support a platform, a parser, linter, translator, and serializer are required. The parser is responsible for parsing the search string, while the linter checks the parsed query for errors. The serializer converts the parsed query back into a search string.
Development setup
Installation in editable mode with dev extras
pip install -e ".[dev]"
Repository layout
Versioned implementations live inside
search_query/<platform>/vX_Y_Z/ directories:
search_query/
pubmed/
v1/
parser.py
serializer.py
translator.py
To add a new parser or serializer version:
copy the latest versioned directory (e.g.
v1→v2),apply the changes,
register the new version in
search_query.parser.PARSERS,search_query.serializers.SERIALIZERSorsearch_query.translators.TRANSLATORSso it becomes discoverable.
A code skeleton is available for the parser, linter, translator, and tests.