Skip to content

Support parsing optionals as positionals #692

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 4 commits into from
Mar 25, 2025

Conversation

mauvilsa
Copy link
Member

@mauvilsa mauvilsa commented Mar 11, 2025

What does this PR do?

Fixes #690

Before submitting

  • Did you read the contributing guideline?
  • Did you update the documentation? (readme and public docstrings)
  • Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

@mauvilsa mauvilsa added the enhancement New feature or request label Mar 11, 2025
Copy link

codecov bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (64b6876) to head (9a4c92c).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #692   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         6694      6755   +61     
=========================================
+ Hits          6694      6755   +61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Borda
Copy link
Contributor

Borda commented Mar 18, 2025

could we bump the version to an RC or something so I can test it with our CI - Lightning-AI/utilities#371

@mauvilsa
Copy link
Member Author

could we bump the version to an RC or something so I can test it with our CI - Lightning-AI/utilities#371

This looks good https://github.com/Lightning-AI/utilities/blob/9610d5bfa0a639d0820ef525e5cec06b0db71e11/requirements/cli.txt#L1, I think there is no need for an RC.

@mauvilsa mauvilsa force-pushed the issue-690-parse-optionals-as-positionals branch from 2d0a74a to 05328f1 Compare March 20, 2025 09:09
Copy link
Member Author

@mauvilsa mauvilsa left a comment

Choose a reason for hiding this comment

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

I have added more tests and documentation for the feature. But it is still pending to not support this for subclass and dataclass types. What to do regarding shtab can be a future improvement.

Copy link

@mauvilsa mauvilsa merged commit c5cd330 into main Mar 25, 2025
48 of 49 checks passed
@mauvilsa mauvilsa deleted the issue-690-parse-optionals-as-positionals branch March 25, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enable all arguments as positional
2 participants