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: in rules from imported modules, exclude modified paths from module prefixing #1494

Merged
merged 11 commits into from Mar 23, 2022

Conversation

dlaehnemann
Copy link
Contributor

@dlaehnemann dlaehnemann commented Mar 17, 2022

Description

Initially, this only provides a test case for debugging. Here's the problem:

Currently, when importing a module (for example module imported_module:) with a path prefix: provided, that prefix also gets applied to paths that have been modified after loading the module with something like:

use rule x as imported_module_x with:
    input: "path/without/prefix/for/rewiring/input.txt"

As the example states, this precludes from properly rewiring the input of rules in that imported_module to output of rules from the importing / enclosing workflow or other imported modules.

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2022

Please format your code with black: black snakemake tests/*.py.

@johanneskoester johanneskoester merged commit 1e73db0 into main Mar 23, 2022
1 check passed
@johanneskoester johanneskoester deleted the modules-test-no-prefixing-modified-paths branch Mar 23, 2022
@sonarcloud
Copy link

sonarcloud bot commented Mar 23, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants