-
Notifications
You must be signed in to change notification settings - Fork 204
Enable parsing of multi-line config values #3629
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
base: dev
Are you sure you want to change the base?
Conversation
7e56369
to
e735a51
Compare
I don't think that any of my changes could have caused this test failure? Admittedly, I do not even know what kind of test that is... |
5ed0785
to
d8cb167
Compare
FYI the refgenie server seems to be down. so the CI test |
Admittedly, my changes apparently introduced an issue with the config parsing. When running
the sorted(wf_config.keys())
'manifest.contributors', 'manifest.defaultBranch', 'manifest.description', 'manifest.homePage', 'manifest.mainScript', 'manifest.name', 'manifest.nextflowVersion', 'nextflow.enable.configProcessNamesValidation' I will need to investigate... |
925672e
to
81d6ac6
Compare
Ok, this looks much better now. The only test that is still failing is Refgenie as expected. But I could fix the other test failures that indeed indicated a serious issue: I did not consider, that we might encounter empty strings as config values. Because the last group no longer had a match that resulted in an overall match satisfying the regex, the regex engine backtracked. In the Apart from that, the condition |
Codecov ReportAll modified and coverable lines are covered by tests ✅
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…xtflow config --flat
… backtracking and assign them to the dict as well.
81d6ac6
to
1ff9500
Compare
On Slack, @charles-plessy reported that the new release of nf-core/pairgenomealign was hindered by a failing Download test.
I have thus extended the corresponding test in tools to include the notation as used by pairgenomealign.
Indeed, the pattern failed with the current code. Upon closer inspection, I could trace down the issue to
nf_core.utils.fetch_wf_config()
returning truncated configuration values for multi-line strings because of the current parsing that usesnfconfig_raw.splitlines()
.Since the test is mocking and partially duplicating the config parsing function, I developed the new regex there and thereafter also updated the
nf_core.utils.fetch_wf_config()
with the new logic that is capable of multi-line parsing.In addition, I had to tweak the parsing of the
main.nf
as well, sincemypy
would otherwise not allow me to commit my changes:nf_core/utils.py:348: error: Incompatible types in assignment (expression has type "Match[str] | None", variable has type "Match[str]") [assignment]
PR checklist
CHANGELOG.md
is updated