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

fix: more informative nothing to be done message #1234

Merged
merged 2 commits into from Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions snakemake/common/__init__.py
Expand Up @@ -25,6 +25,9 @@
DYNAMIC_FILL = "__snakemake_dynamic__"
SNAKEMAKE_SEARCHPATH = str(Path(__file__).parent.parent.parent)
UUID_NAMESPACE = uuid.uuid5(uuid.NAMESPACE_URL, "https://snakemake.readthedocs.io")
NOTHING_TO_BE_DONE_MSG = (
"Nothing to be done (all requested files are present and up to date)."
)

ON_WINDOWS = platform.system() == "Windows"

Expand Down
9 changes: 6 additions & 3 deletions snakemake/workflow.py
Expand Up @@ -73,6 +73,7 @@
Scatter,
Gather,
smart_join,
NOTHING_TO_BE_DONE_MSG,
)
from snakemake.utils import simplify_path
from snakemake.checkpoints import Checkpoint, Checkpoints
Expand Down Expand Up @@ -820,7 +821,9 @@ def files(items):
)
else:
logger.info(
"Subworkflow {}: Nothing to be done.".format(subworkflow.name)
"Subworkflow {}: {}".format(
subworkflow.name, NOTHING_TO_BE_DONE_MSG
)
)
if self.subworkflows:
logger.info("Executing main workflow.")
Expand Down Expand Up @@ -1051,13 +1054,13 @@ def files(items):
if self.mode == Mode.default:
logger.run_info("\n".join(dag.stats()))
else:
logger.info("Nothing to be done.")
logger.info(NOTHING_TO_BE_DONE_MSG)
else:
# the dryrun case
if len(dag):
logger.run_info("\n".join(dag.stats()))
else:
logger.info("Nothing to be done.")
logger.info(NOTHING_TO_BE_DONE_MSG)
return True
if quiet:
# in case of dryrun and quiet, just print above info and exit
Expand Down