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: display wrapper or external script code in report #1393 #1404

Conversation

cpauvert
Copy link
Contributor

@cpauvert cpauvert commented Feb 16, 2022

Description

Hi,
Thanks for keeping snakemake this active!

This PR fixes #1393. It only remove the call to the decode() attribute of the source object (being either a script or a wrapper). From what I understood, such source object are read using with and open where the encoding is already taken care since Python 3 (link).

I tried to compare how the get_source function got the script or wrapper code in the actual release and the one mentioned where external code display still worked (v6.4.1).

I tried my best for generating the test, but seeing this is a visual inspection, I hope this is alright.
Best,

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

@cpauvert cpauvert marked this pull request as ready for review Feb 16, 2022
@cpauvert cpauvert requested a review from johanneskoester as a code owner Feb 16, 2022
@johanneskoester
Copy link
Contributor

johanneskoester commented Feb 17, 2022

@cpauvert can you please format the code with black?

johanneskoester and others added 4 commits Feb 17, 2022
)

* Adding support for --cluster-[m]cancel

* Adding support for --cluster-[m]cancel.

* Adressing points from code review

* [ci skip] fix typos

Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
…cpauvert/snakemake into fix1393-display-external-code-in-report
@cpauvert
Copy link
Contributor Author

cpauvert commented Feb 17, 2022

@cpauvert can you please format the code with black?

Thanks for the quick review @johanneskoester. And sorry for the bad formatting, it is better now in 9f5b62c

@sonarcloud
Copy link

sonarcloud bot commented Feb 17, 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 a007bd1 into snakemake:main Feb 18, 2022
7 checks passed
@johanneskoester
Copy link
Contributor

johanneskoester commented Feb 18, 2022

Thanks!

@cpauvert cpauvert deleted the fix1393-display-external-code-in-report branch Feb 18, 2022
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.

wrapper code and script code not displayed in report but shell code is
3 participants