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: patch LocalSourceFile to work with containerize #1211

Closed
wants to merge 7 commits into from

Conversation

mfansler
Copy link

@mfansler mfansler commented Oct 9, 2021

Description

Fixes #1210 by implementing the os.PathLike interface (__fspath__()). Updates interface usage. Adds test to demonstrate fix.

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

@mfansler mfansler changed the title Patch LocalSourceFile to work with containerize fix: patch LocalSourceFile to work with containerize Oct 9, 2021
@mfansler
Copy link
Author

@johanneskoester please let me know if you'd like a different direction for this. I realized after submitting that we don't need to add __fspath__ to LocalSourceFile, but could instead just modify all the env.file references to env.file.get_path_or_uri(). Personally, I think it makes semantic sense for LocalSourceFile to implement os.PathLike, unless one can imagine a local source file without a path.

Copy link
Contributor

@johanneskoester johanneskoester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sonarcloud
Copy link

sonarcloud bot commented Oct 21, 2021

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
Copy link
Contributor

I have some additional related fixes in #1236. Thanks a lot for your work here, I've integrated it into the other PR (I will reference you in the release notes).

johanneskoester added a commit that referenced this pull request Oct 26, 2021
…#1233 and #1211). (#1236)

* fix: more informative nothing to be done message

* fmt

* fmt, fixes and additional tests

* implement fspath
pvandyken pushed a commit to pvandyken/snakemake that referenced this pull request Nov 15, 2021
…snakemake#1233 and snakemake#1211). (snakemake#1236)

* fix: more informative nothing to be done message

* fmt

* fmt, fixes and additional tests

* implement fspath
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.

--containerize is broken
2 participants