-
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
Check spaces in container links #2489
Conversation
…ainer-links Fix conflict in CHANGELOG (keep both)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is looking good :) I added a couple of things that need fixing
CHANGELOG.md
Outdated
@@ -50,6 +50,7 @@ | |||
|
|||
- Add new command `nf-core subworkflows lint` ([#2379](https://github.com/nf-core/tools/pull/2379)) | |||
- Check for existence of test profile ([#2478](https://github.com/nf-core/tools/pull/2478)) | |||
- Check for spaces in container URLs ([#2452](https://github.com/nf-core/tools/issues/2452)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Check for spaces in container URLs ([#2452](https://github.com/nf-core/tools/issues/2452)) | |
- Check for spaces in modules container URLs ([#2452](https://github.com/nf-core/tools/issues/2452)) |
Could you move this point to the changelog for version 2.11dev above?
tests/modules/lint.py
Outdated
1, | ||
0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test should fail, not a warning
tests/modules/lint.py
Outdated
] | ||
|
||
|
||
def test_modules_lint_check_process_labels(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def test_modules_lint_check_process_labels(self): | |
def test_modules_lint_check_url_spaces(self): |
tests/modules/lint.py
Outdated
for test_case in CONTAINER_TEST_CASES: | ||
process, passed, warned, failed = test_case | ||
mocked_ModuleLint = MockModuleLint() | ||
main_nf.check_process_section( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is checking the whole process section, including other checks such as labels, etc. In order to add a test for URL spaces only, you should write this check in a separate function, which is called inside check_process_section()
and use this function here in the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! I will implement those changes. It's strange that my tests still passed, even though I had specified the test cases to be warnings instead of errors like they should be. I'll double check that the new tests were actually run - and make sure they fail when they require 1 warning and 0 errors.
Codecov Report
@@ Coverage Diff @@
## dev #2489 +/- ##
==========================================
+ Coverage 70.53% 70.62% +0.08%
==========================================
Files 87 88 +1
Lines 9456 9493 +37
==========================================
+ Hits 6670 6704 +34
- Misses 2786 2789 +3
|
9e37803
to
3c6af2d
Compare
Those issues should now be fixed. (The subsequent force-push is a small correction to the test function name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
PR checklist
CHANGELOG.md
is updateddocs
is updatedThis PR adds checks to see if there are spaces in the URLs used for container images - solving issue #2452 .
I'm adding tests for linting the container string, including the new check and the check for double quotes. (Similar to the tests for linting the process labels)
[Edited after merge - corrected issue number]