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

Fixing bugs in nf-core create #936

Merged
merged 3 commits into from
Mar 23, 2021
Merged

Fixing bugs in nf-core create #936

merged 3 commits into from
Mar 23, 2021

Conversation

KevinMenden
Copy link
Contributor

This PR tries to address the bugs in #931

closes #931
(once ready)

@KevinMenden KevinMenden added the WIP Work in progress label Mar 22, 2021
@KevinMenden KevinMenden added this to the 1.13.2 milestone Mar 22, 2021
@KevinMenden KevinMenden self-assigned this Mar 22, 2021
@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #936 (3261493) into dev (f67d063) will increase coverage by 0.05%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #936      +/-   ##
==========================================
+ Coverage   69.56%   69.61%   +0.05%     
==========================================
  Files          34       34              
  Lines        4173     4180       +7     
==========================================
+ Hits         2903     2910       +7     
  Misses       1270     1270              
Impacted Files Coverage Δ
nf_core/create.py 93.13% <94.11%> (-0.55%) ⬇️
nf_core/lint/nextflow_config.py 69.62% <0.00%> (ø)
nf_core/__main__.py 61.58% <0.00%> (+0.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f67d063...3261493. Read the comment docs.

@KevinMenden
Copy link
Contributor Author

What I've done so far:

  • added the code from @drpatelh
  • set strict=False to catch more encodings/file types, here: (ftype, encoding) = mimetypes.guess_type(template_fn_path, strict=False)
  • catching the UnicodeDecodeError

@KevinMenden
Copy link
Contributor Author

@apeltzer I think that's all I can add here for now, whenever you have time to test quickly on your special system 👍
Here it works 🤷

@KevinMenden KevinMenden added ready-for-review and removed WIP Work in progress labels Mar 22, 2021
Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

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

Yeeaaahh... can I be a douche and have a stab at implementing this? I was coding it in my head in the car this afternoon and I think I can do it in a slightly more elegant way (even though your code should be entirely functional).

nf_core/create.py Outdated Show resolved Hide resolved
nf_core/create.py Outdated Show resolved Hide resolved
ewels added a commit to ewels/nf-core-tools that referenced this pull request Mar 22, 2021
ewels added a commit to ewels/nf-core-tools that referenced this pull request Mar 22, 2021
Rebased to hide my lack of local testing. Hopefully Kevin doesn't read his GitHub email notifications.. 👀
@KevinMenden KevinMenden linked an issue Mar 23, 2021 that may be closed by this pull request
@ewels ewels merged commit e0f0d1b into nf-core:dev Mar 23, 2021
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.

nf-core/tools create broken?
2 participants