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

New modules command: nf-core modules info <tool> #1447

Merged
merged 4 commits into from
Mar 15, 2022

Conversation

ewels
Copy link
Member

@ewels ewels commented Mar 14, 2022

I know that there are more important issues, but it was the evening and I can't resist making a pretty thing ✨

This one is for you @jfy133 - closes #1427

Screenshot 2022-03-14 at 23 28 59

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@codecov
Copy link

codecov bot commented Mar 14, 2022

Codecov Report

Merging #1447 (f3d4937) into dev (2492743) will decrease coverage by 0.91%.
The diff coverage is 24.21%.

@@            Coverage Diff             @@
##              dev    #1447      +/-   ##
==========================================
- Coverage   65.72%   64.81%   -0.92%     
==========================================
  Files          50       51       +1     
  Lines        5853     5977     +124     
==========================================
+ Hits         3847     3874      +27     
- Misses       2006     2103      +97     
Impacted Files Coverage Δ
nf_core/modules/info.py 19.09% <19.09%> (ø)
nf_core/__main__.py 51.55% <41.66%> (-0.30%) ⬇️
nf_core/modules/module_utils.py 38.23% <75.00%> (+0.09%) ⬆️
nf_core/modules/__init__.py 100.00% <100.00%> (ø)
nf_core/modules/install.py 58.13% <100.00%> (-0.49%) ⬇️

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 2492743...f3d4937. Read the comment docs.

@jfy133
Copy link
Member

jfy133 commented Mar 15, 2022

😍 this is exactly what I was looking for, can't view the code, otherwise 👍👍👍

@mashehu
Copy link
Contributor

mashehu commented Mar 15, 2022

Very nice!
the &lt;code&gt; style block looks a bit unoptimized for light mode. but I understand it is not easy to find a good color scheme which works for both dark and light backgrounds in the terminal.
Screenshot 2022-03-15 at 10 07 47

@mashehu
Copy link
Contributor

mashehu commented Mar 15, 2022

Is there some kind of caching happening? I fixed the formatting in controlfreec (nf-core/modules#1393) and it still throws the error:

│ /Users/mitochondrium/nf-core_tools/nf_core/modules/info.py:159 in generate_module_info_help                                                                │
│                                                                                                                                                            │
│   158 │   │   │   │   │   │   f"[orange1 on black] {key} [/][dim i] ({info['type']})",                                                                     │
│ ❱ 159 │   │   │   │   │   │   info["description"].replace("\n", " "),                                                                                      │
│   160 │   │   │   │   │   │   info.get("pattern", ""),                                                                                                     │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'NoneType' object has no attribute 'replace'

Which I guess comes from the old formatting. (also we probably want to keep the \n for code blocks, see nf-core/website#1069

@ewels
Copy link
Member Author

ewels commented Mar 15, 2022

Is the light mode bad enough to need changing? I actually think it looks kind of cool 😅

Right, instead of dropping the newlines I will parse as markdown then 👍🏻

@ewels
Copy link
Member Author

ewels commented Mar 15, 2022

Is there some kind of caching happening?

And yes, with requests_cache. I think I set it up to save in ~/.nfcore/ by default so if you wipe that you should be good to go 👍🏻

@ewels
Copy link
Member Author

ewels commented Mar 15, 2022

Ok, markdown should now be parsed. Also if you run in a local pipeline or clone of the modules repo, it should use the local copy (not get it from the web / caching issues etc). Turned out that the file path for modules was dodgy, so that's fixed now too. So now runs with the local variant as you edit it.

Controlfreec seems to be working locally for me now 👍🏻

Copy link
Contributor

@sateeshperi sateeshperi left a comment

Choose a reason for hiding this comment

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

lgtm! excited to use this!

@sateeshperi sateeshperi merged commit 333a451 into nf-core:dev Mar 15, 2022
@ewels ewels deleted the modules-info branch March 15, 2022 19:18
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.

4 participants