-
Notifications
You must be signed in to change notification settings - Fork 192
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
Lint refactoring #809
Lint refactoring #809
Conversation
ok, so rewriting the tests is a bit of a scarily large job I'm realising. But at the moment they are pretty crap so I think it's worthwhile. I've made a bit of a start, it's tempting to just delete all of the tests and start fresh, but I think that some do have useful bits of code that may be worth keeping. Just needs some grind to go through them all. |
On a happier note, the sphinx docs seem to be working pretty nicely now! I think that this is a better way to document the lint tests - should be a lot easier to keep the docs up to date this way. Still need to port over the existing markdown documentation into the function docstrings. But that's just a copy + paste job. |
* Test that loading a nf-core-lint.yml config works and properly ignores all tests * Test the JSON results dumping (mostly the old test, fixed up)
609e28e
to
d2f63cd
Compare
Ok, I did a bit of a late-night docs marathon and have now ported all docs from I think that this means that this mammoth PR is now ready to merge to We still have a lot of python tests to write, but that can be done incrementally in smaller PRs I think, as it is not so essential to functionality so does not all need to be merged in one go. |
Other website option: the Sphinx docs are compiled to static HTML so we could even try to be clever and pull that out and inject it into the nice nf-core styled website under whatever URL we want (eg. the existing |
Sure - I'm aware of the advantages. I just think that for someone who hasn't written the code, it will be quite confusing to find this method. Here I would have gone for better readability and a bit more boilerplate code ;) But that's just my style-opinion so nevermind, doesn't affect functionality anyway |
Had another look at it, as I saw most of it already. Looks good I think :) Only thing is that there are still some tests missing for lint function, e.g. for the README check. |
Yeah it would be nice but I'm not sure if I'll have time to write those tests this side of Christmas. That's why I did a bit of a sprint to finish porting over the docs last night. I have a bunch of ideas for further improvements to the tests as well. Happy to leave this PR open as a WIP but was thinking that it risks getting behind the main repo then so maybe better to merge now and do incremental improvements onwards. |
I'd rather open an issue with a list of missing tests and cover these then with smaller (and thus easier to review) PRs. That could also then be done by others than Phil , which simultaneously means we're not just reviewing but also testing (+ breaking ;-)) things :-) |
Okay - agree that this PR is already pretty large hand hard to follow. |
Only thing that might be worth changing before the merge is the code location for the core lint code, instead of being in @KevinMenden any suggestions for where you would have expected to find it? |
To me, the most natural way would be a It might also be just me 😁 So I would say let's merge this and if you agree add a small comment in another release - have to add some tests anyway. |
Ok sounds good 👍🏻 +1 for a code comment, I think that keeps the best of both worlds.. |
ok good, it looks like https://nf-co.re/errors is still there.. |
The docs build failed though: https://github.com/nf-core/tools/runs/1550064554?check_suite_focus=true |
Well, #813 fixed the action but now the entire API docs have gone 😆 https://nf-co.re/tools-docs/ |
Ok, and fixed the fix - docs now showing: https://nf-co.re/tools-docs/ 🚀 |
😌 nice! :) |
Hi all,
I couldn't help myself sorry and had a stab at doing some of the linting refactoring that we're discussing in #805. After writing that issue and planning out what needs doing it was rattling around my head with ideas (coding without a keyboard) so I thrashed out a bit of it during lunch.
Still WIP but I thought that I should open a PR so that we can work on this together. Feel free to change the base and merge to a new branch on the main repo if anyone wants to keep adding to the changes.
I haven't touched the tests and haven't started breaking up the tests, but I've done the config, the named tests (instead of numeric) and a bunch of other tidying. I also started looking into improving the sphinx docs so that we can use inline documentation instead of having to maintain the
lint_errors.md
file in parallel.Phil