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: Replaced pathlib relative_to with os.relpath #1505

merged 3 commits into from Mar 23, 2022


Copy link


Fixes #1496

I changed the print output when using a post-deploy script to use os.relpath instead of pathlib.Path.relative_to since
the pathlib variant fails when the conda-env is outside of the .snakemake directory.

So I think existing test cases should cover it (Also since a conda environment would have to be created outside of the working directory I have no clue how one would write a test case for this.)


  • 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).

@Christian-Heyer Christian-Heyer changed the title Replaced pathlib relative_to with os.relpath fix:Replaced pathlib relative_to with os.relpath Mar 21, 2022
@Christian-Heyer Christian-Heyer changed the title fix:Replaced pathlib relative_to with os.relpath fix: Replaced pathlib relative_to with os.relpath Mar 21, 2022
Copy link

Thanks, good catch! Can you please format the change with black?

Copy link

sonarcloud bot commented Mar 21, 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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@johanneskoester johanneskoester merged commit dc65e29 into snakemake:main Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

post-deploy scripts fail when conda-prefix is set outside of snakemake execution dir
2 participants