Skip to content

Commit

Permalink
Prepare TREC PubMed ID import
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Aug 27, 2024
1 parent 2a7fa3d commit 8aebba4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion trec_biogen/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,34 @@ def launcher(*tokens: Annotated[str, Parameter(show=False, allow_leading_hyphen=

@app.command()
def index_pubmed_full_texts(
*,
dry_run: bool = False,
refetch: bool = False,
sample: Annotated[float, Interval(ge=0, le=1)] | None = None,
) -> None:
from trec_biogen.jobs.index_pubmed_full_text import (
index_pubmed_full_texts as _index_pubmed_full_texts,
)

_index_pubmed_full_texts(
dry_run=dry_run,
refetch=refetch,
sample=sample,
)

@app.command()
def index_pubmed_trec_ids(
trec_ids_path: ResolvedExistingFile,
*,
dry_run: bool = False,
) -> None:
from trec_biogen.jobs.index_pubmed_trec_ids import (
index_pubmed_trec_ids as _index_pubmed_trec_ids,
)
_index_pubmed_trec_ids(
trec_ids_path=trec_ids_path,
dry_run=dry_run,
)


parse_app = App(name="parse")
app.command(parse_app)
Expand Down Expand Up @@ -80,6 +94,7 @@ def _email_validator(type_, value: str) -> None:
def clef_bioasq_answers_to_trec_biogen_answers(
input_path: ResolvedExistingFile,
output_path: ResolvedFile,
*,
team_id: str,
run_name: str,
contact_email: Annotated[str, Parameter(validator=_email_validator)],
Expand Down

0 comments on commit 8aebba4

Please sign in to comment.