From 63c7ea751eaa1fca8f0377d30602df2c2da378f9 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 30 Jan 2024 15:30:22 -0500 Subject: [PATCH 1/4] fix: print helpful message when no argument given --- xavier | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xavier b/xavier index 29107be..d4047a7 100755 --- a/xavier +++ b/xavier @@ -716,6 +716,10 @@ def parsed_arguments(): def main(): + # show helpful error message when no arguments given + if len(sys.argv) == 1: + # Nothing was provided + fatal("Invalid usage: xavier [-h] [--version] ...") # Collect args for sub-command args = parsed_arguments() From 808f383b649e9f337d9e1fa46f97217d4d9c2521 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 30 Jan 2024 15:30:42 -0500 Subject: [PATCH 2/4] ci: check CLI basics --- .github/workflows/main.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6e8d31d..b4e3735 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -15,6 +15,10 @@ jobs: steps: - uses: actions/checkout@v2 - uses: docker://snakemake/snakemake:v6.8.2 + - name: check CLI basics + run: | + xavier --help + xavier --version - name: Tumor-normal FastQ Dry Run run: | docker run -v $PWD:/opt2 snakemake/snakemake:v6.8.2 \ From 91ecd199744d6fa5d138cf919b6dc9297de0fe9e Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 30 Jan 2024 15:32:45 -0500 Subject: [PATCH 3/4] chore: update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e74cb9..be81d26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## development version - Create `CITATION.cff` to describe how to cite XAVIER. (#68, @kelly-sovacool) +- Provide a more helpful error message when `xavier` is called with no arguments. (#75, @kelly-sovacool) ## v3.0.2 From 227befc963dbaf1415727f0ff6335e2eb8329e69 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 30 Jan 2024 15:42:06 -0500 Subject: [PATCH 4/4] ci: fix path to CLI --- .github/workflows/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b4e3735..67d8c08 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -17,8 +17,8 @@ jobs: - uses: docker://snakemake/snakemake:v6.8.2 - name: check CLI basics run: | - xavier --help - xavier --version + ./xavier --help + ./xavier --version - name: Tumor-normal FastQ Dry Run run: | docker run -v $PWD:/opt2 snakemake/snakemake:v6.8.2 \