Skip to content
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

Don't save kebab-case aliases in the params map #4702

Merged
merged 6 commits into from
Sep 30, 2024

Conversation

bentsherman
Copy link
Member

Close #4033

This PR attempts to resolve some quirks with the params map by separating the alias behavior from the read-only behavior. It adds an AliasMap which can be used to create a map that aliases between kebab-case and camelCase. The params map re-uses this class internally.

Still need to add some tests.

Copy link

netlify bot commented Jan 30, 2024

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 11b3d90
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/66f6e1187f4400000877f875

@bentsherman
Copy link
Member Author

Confirmed that it works with the test case in the linked issue

@bentsherman
Copy link
Member Author

Simplified it further:

  • When CLI params and params file are parsed, kebab-case params are automatically converted to camelCase. Only the camelCase key is stored.
  • The params map does not do any aliasing, since kebab-case params have already been converted, and the kebab-case variant does not need to be read

@bentsherman bentsherman changed the title Separate params aliasing into AliasMap Don't save kebab-case aliases in the params map May 16, 2024
@pditommaso
Copy link
Member

Intellij reports a problem with ParamsMap

Screenshot 2024-09-27 at 17 40 16

@bentsherman
Copy link
Member Author

This PR can be simplified further, I will fix those issues and make a few more edits

Copy link
Member

@pditommaso pditommaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better now, thanks Ben

@pditommaso pditommaso merged commit 349f4f6 into master Sep 30, 2024
22 checks passed
@pditommaso pditommaso deleted the 4033-fix-cli-params-case branch September 30, 2024 10:04
alberto-miranda pushed a commit to alberto-miranda/nextflow that referenced this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants