Skip to content

Commit

Permalink
forgot what this change even was
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Dec 13, 2023
1 parent b7d9edf commit 9a7a6c4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/gene/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ def cli() -> None:
default=False,
help="Use most recent local source data instead of fetching latest version",
)
@click.option(
"--silent", "-s", is_flag=True, default=False, help="Suppress console output."
)
def update(
sources: Tuple[str],
aws_instance: bool,
db_url: str,
all: bool,
normalize: bool,
use_existing: bool,
silent: bool,
) -> None:
"""Update provided normalizer SOURCES in the gene database.
Expand Down Expand Up @@ -83,7 +87,7 @@ def update(

processed_ids = None
if all:
processed_ids = update_all_sources(db, use_existing, silent=False)
processed_ids = update_all_sources(db, use_existing, silent=silent)
elif sources:
parsed_sources = []
failed_source_names = []
Expand All @@ -101,13 +105,13 @@ def update(
working_processed_ids = set()
for source_name in parsed_sources:
working_processed_ids |= update_source(
source_name, db, use_existing=use_existing, silent=False
source_name, db, use_existing=use_existing, silent=silent
)
if len(sources) == len(SourceName):
processed_ids = working_processed_ids

if normalize:
update_normalized(db, processed_ids, silent=False)
update_normalized(db, processed_ids, silent=silent)


@cli.command()
Expand Down

0 comments on commit 9a7a6c4

Please sign in to comment.