Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Confusing --help text for --reason option: (deprecated, always true now). (default: False) #1902

Open
corneliusroemer opened this issue Oct 10, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@corneliusroemer
Copy link
Contributor

Snakemake version
7.14.2

Describe the bug
The --help text for option --reason is confusing. It states:

--reason, -r          Print the reason for each executed rule (deprecated, always true now). (default: False)

The combination default: False and (deprecated, always true now) makes no sense, or am I not getting what is intended? How can something be always true and False at the same time?

@corneliusroemer corneliusroemer added the bug Something isn't working label Oct 10, 2022
@pdimens
Copy link

pdimens commented Nov 21, 2022

What triggered this decision if it's deprecated? The output log gets tremendously bloated if your inputs/outputs have a lot of files in them, for example:

rule example:
    input: expand("file.{num}.txt", num = range(0, 500))

I've been seeing large volumes of reason: text flood my terminal sessions as a result. Is this truly deprecated?

@corneliusroemer
Copy link
Contributor Author

corneliusroemer commented Nov 22, 2022

@pdimens see this PR #1663 for where the default seems to have changed: 4c11893 (found it using git blame)

I guess that CLI option should be removed and until then at least it should say default: True.

@pdimens
Copy link

pdimens commented Nov 22, 2022

It becomes terribly unwieldy. Here's a real-world example of splitting a file into 10 chunks (in reality, this could be 10-1000).

[Tue Nov 22 14:15:48 2022]
Job 31: Preprocessing for EMA mapping: ShadHap1_L002_C08
Reason: Missing output files: ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-009, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-007, ReadMapping/preproc/ShadHap1_L002_C08/ema-nobc, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-001, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-006, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-003, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-004, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-002, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-000, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-005, ReadMapping/preproc/ShadHap1_L002_C08/ema-bin-008; Input files updated by another job: ReadMapping/count/ShadHap1_L002_C08.ema-ncnt; Code has changed since last execution

which wraps in the terminal like this
image

vokoscreenNG-2022-11-22_15-02-27.webm

@corneliusroemer
Copy link
Contributor Author

Thanks for sharing @pdimens - that's not so great.

@johanneskoester maybe it would be nice if one could still set print reason -r to false - even if the default is true?

@pdimens
Copy link

pdimens commented Nov 23, 2022

Another option would be to have the text elided so that it fits the terminal width. Something akin to

Reason: Missing output files file2.txt, file3.txt...file500.txt

@corneliusroemer
Copy link
Contributor Author

Good idea! This shouldn't be default though as one may want to be able to know all the files that trigger rebuild in some cases.

@pdimens
Copy link

pdimens commented Sep 14, 2023

pinging @johanneskoester to renew discussion of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants