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: use relpath for configfiles added to the source archive (thanks to @sposadac for the initial solution) #3240

Merged
merged 4 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: use relpath for configfiles added to the source archive
  • Loading branch information
johanneskoester committed Dec 23, 2024
commit da6f5c8313e00445294199f713164d04a1415897
2 changes: 1 addition & 1 deletion snakemake/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2907,7 2907,7 @@ def norm_rule_relpath(f, rule):
files.add(env_path)

for f in self.workflow.configfiles:
files.add(f)
files.add(os.path.relpath(f))

# get git-managed files
# TODO allow a manifest file as alternative
Expand Down
8 changes: 6 additions & 2 deletions snakemake/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 295,12 @@ def get_files():
for f in self.dag.get_sources():
if f.startswith(".."):
logger.warning(
"Ignoring source file {}. Only files relative "
"to the working directory are allowed.".format(f)
f"Ignoring source file {f}! Only files relative "
"to the working directory are allowed. Most likely the "
"spawned jobs will not properly work. Make sure to start "
"the workflow from a directory below which all the sources "
"are located (may be in subfolders) and also ensure that any "
"config files you refer to are inside that directory."
)
continue

Expand Down
Loading