Skip to content

Conversation

@maxulysse
Copy link
Member

That would help the migration to references and help clean TEMPLATE

maxulysse added a commit that referenced this pull request Oct 22, 2025
@maxulysse maxulysse changed the title port getGenomeAttribute from TEMPLATE port getGenomeAttribute() from TEMPLATE Oct 22, 2025
maxulysse added a commit that referenced this pull request Oct 29, 2025
* add getGenomeAttribute() and improve softwareVersionsToYAML()

* pre-commit

* use java 17

* fix tests

* update CHANGELOG

* downgrade pipeline starting / oncomplete to trace

* split to #26

* Update CHANGELOG.md

* Update CHANGELOG.md

* split to #27

* forgot code

* add docs and tests

* remove workflow.trace

* include review comments

* fix suggestions

* pre-commit

* Code quality improvements for PR #24 (#30)

* 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]>

---------

Co-authored-by: Edmund Miller <[email protected]>
Co-authored-by: Claude <[email protected]>
@edmundmiller edmundmiller merged commit 4b6f839 into main Oct 30, 2025
3 checks passed
@edmundmiller edmundmiller deleted the getGenomeAttribute branch October 30, 2025 17:26
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