Skip to content

Commit

Permalink
Included whole traceback when handling module errors. Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Shettland committed Nov 26, 2024
1 parent 7bc5fa6 commit b15bc45
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions relecov_tools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def download(
log.exception(f"EXCEPTION FOUND: {e}")
raise


# metadata
@relecov_tools_cli.command(help_priority=3)
@click.option(
Expand Down Expand Up @@ -230,6 +231,7 @@ def read_lab_metadata(metadata_file, sample_list_file, metadata_out, files_folde
log.exception(f"EXCEPTION FOUND: {e}")
raise


# validation
@relecov_tools_cli.command(help_priority=4)
@click.option("-j", "--json_file", help="Json file to validate")
Expand All @@ -252,6 +254,7 @@ def validate(json_file, json_schema, metadata, out_folder):
log.exception(f"EXCEPTION FOUND: {e}")
raise


# send-email
@relecov_tools_cli.command(help_priority=4)
@click.option(
Expand Down Expand Up @@ -365,6 +368,7 @@ def map(origin_schema, json_data, destination_schema, schema_file, output):
log.exception(f"EXCEPTION FOUND: {e}")
raise


# upload to ENA
@relecov_tools_cli.command(help_priority=6)
@click.option("-u", "--user", help="user name for login to ena")
Expand Down Expand Up @@ -413,6 +417,7 @@ def upload_to_ena(
log.exception(f"EXCEPTION FOUND: {e}")
raise


# upload to GISAID
@relecov_tools_cli.command(help_priority=7)
@click.option("-u", "--user", help="user name for login")
Expand Down Expand Up @@ -483,6 +488,7 @@ def upload_to_gisaid(
log.exception(f"EXCEPTION FOUND: {e}")
raise


@relecov_tools_cli.command(help_priority=9)
@click.option("-j", "--json", help="data in json format")
@click.option(
Expand Down Expand Up @@ -527,6 +533,7 @@ def update_db(user, password, json, type, platform, server_url, full_update):
log.exception(f"EXCEPTION FOUND: {e}")
raise


# read metadata bioinformatics
@relecov_tools_cli.command(help_priority=10)
@click.option(
Expand Down Expand Up @@ -554,6 +561,7 @@ def read_bioinfo_metadata(json_file, input_folder, out_dir, software_name):
log.exception(f"EXCEPTION FOUND: {e}")
raise


# read metadata bioinformatics
@relecov_tools_cli.command(help_priority=12)
@click.option(
Expand All @@ -580,6 +588,7 @@ def metadata_homogeneizer(institution, directory, output):
log.exception(f"EXCEPTION FOUND: {e}")
raise


# creating symbolic links
@relecov_tools_cli.command(help_priority=13)
@click.option(
Expand Down Expand Up @@ -622,6 +631,7 @@ def pipeline_manager(input, template, output, config, folder_names):
log.exception(f"EXCEPTION FOUND: {e}")
raise


# schema builder
@relecov_tools_cli.command(help_priority=14)
@click.option(
Expand Down Expand Up @@ -662,6 +672,7 @@ def build_schema(input_file, schema_base, draft_version, diff, out_dir):
log.exception(f"EXCEPTION FOUND: {e}")
raise


@relecov_tools_cli.command(help_priority=15)
@click.option(
"-l",
Expand Down Expand Up @@ -710,6 +721,7 @@ def logs_to_excel(lab_code, output_folder, files):
log.exception(f"EXCEPTION FOUND: {e}")
raise


@relecov_tools_cli.command(help_priority=16)
@click.option(
"-c",
Expand All @@ -736,5 +748,6 @@ def wrapper(config_file, output_folder):
log.exception(f"EXCEPTION FOUND: {e}")
raise


if __name__ == "__main__":
run_relecov_tools()

0 comments on commit b15bc45

Please sign in to comment.