From dc757b90e2d26797293c75bd64f50277eee20901 Mon Sep 17 00:00:00 2001 From: Wout Bittremieux Date: Mon, 25 Dec 2023 12:48:11 +0100 Subject: [PATCH] Update `output` command-line description Fixes #241. --- CHANGELOG.md | 4 ++++ casanovo/casanovo.py | 15 ++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbc9284e..4d2e54ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Changed + +- Update description of the `output` command-line argument to reflect that this is the root of the output (mzTab, log) files. + ## [4.0.0] - 2023-12-22 ### Added diff --git a/casanovo/casanovo.py b/casanovo/casanovo.py index 0a1c3618..1fa53f6b 100644 --- a/casanovo/casanovo.py +++ b/casanovo/casanovo.py @@ -58,14 +58,17 @@ def __init__(self, *args, **kwargs) -> None: click.Option( ("-m", "--model"), help=""" - The model weights (.ckpt file). If not provided, Casanovo - will try to download the latest release. + The model weights (.ckpt file). If not provided, Casanovo will + try to download the latest release (during sequencing). """, type=click.Path(exists=True, dir_okay=False), ), click.Option( ("-o", "--output"), - help="The mzTab file to which results will be written.", + help="The root file name to which results (i.e. the mzTab file " + "during sequencing, as well as the log file during all " + "modes) will be written. If not specified, a default " + "timestamped file name will be used.", type=click.Path(dir_okay=False), ), click.Option( @@ -139,7 +142,7 @@ def sequence( for peak_file in peak_path: logger.info(" %s", peak_file) - runner.predict(peak_path, output) + runner.predict(peak_path, str(output)) logger.info("DONE!") @@ -328,7 +331,7 @@ def setup_model( config: Optional[str], output: Optional[Path], is_train: bool, -) -> Config: +) -> Tuple[Config, str]: """Setup Casanovo for most commands. Parameters @@ -347,6 +350,8 @@ def setup_model( ------ config : Config The parsed configuration + model : str + The name of the model weights. """ # Read parameters from the config file. config = Config(config)