-
Notifications
You must be signed in to change notification settings - Fork 0
improve softwareVersionsToYAML() #24
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
Can we split these into two PRs? 😬 |
maxulysse
commented
Oct 22, 2025
maxulysse
commented
Oct 22, 2025
Member
Author
Done, and even better, made 3 +1 in the end |
nvnieuwk
approved these changes
Oct 22, 2025
nvnieuwk
left a comment
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.
Love it! can this also be documented?
|
Also, can you create some tests? |
nvnieuwk
approved these changes
Oct 22, 2025
* docs: fix typo in softwareVersionsToYAML documentation Fix typo in JavaDoc example code where 'versions_yamllet'' was incorrectly written instead of 'versions_yaml'. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * refactor: simplify softwareVersionsToYAML with focused helper methods Refactored the complex 166-line softwareVersionsToYAML() method by extracting only essential helper methods that provide real value: Core improvements: - Main method now ~100 lines with visible, straightforward logic - Extracted 4 focused helper methods (down from original over-engineered 13): * processYamlContent(): Eliminates duplicate YAML parsing (used 5+ times) * mergeParsedYaml(): Handles complex nested/flat YAML detection logic * mergeProcessMap(): Reusable process map merging with key cleaning * hasToFileMethod(): Safety-critical reflection for Path detection - Type routing, simple string operations, and sorting kept inline - Uses small recursive closure for nested list handling - Eliminates deeply nested closures from original implementation Benefits: - Better balance between simplicity and maintainability - Main logic flow visible and easy to follow - Real complexity extracted to testable helpers - No thin wrapper methods adding unnecessary indirection - All tests pass without modification This approach keeps both Nextflow usage AND the code simple while improving on the original deeply-nested 166-line implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
edmundmiller
approved these changes
Oct 29, 2025
This was referenced Oct 29, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial PR split into: