Skip to content

Conversation

@Borda
Copy link
Contributor

@Borda Borda commented Aug 4, 2025

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did all existing and newly added tests pass locally?

What does this PR do?

Adding tests and fixing #371

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.


📚 Documentation preview 📚: https://lit-utilities--420.org.readthedocs.build/en/420/

@Borda Borda mentioned this pull request Aug 4, 2025
3 tasks
@Borda Borda requested a review from Copilot August 4, 2025 19:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive test coverage for the CLI functionality and fixes argument parsing to support both positional and optional argument styles. The changes ensure that CLI commands can be invoked with either style consistently.

  • Adds parametrized tests to verify both positional and optional argument parsing for all CLI commands
  • Modifies the CLI configuration to disable positional-only parsing by setting as_positional=False
  • Improves test structure with helper methods for building commands and creating test files

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/unittests/cli/test_command_line.py Adds comprehensive test suite with parametrized tests for both positional and optional argument styles
src/lightning_utilities/cli/main.py Updates CLI configuration to support optional arguments by setting as_positional=False

Borda and others added 2 commits August 4, 2025 21:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Lightning-AI Lightning-AI deleted a comment from Copilot AI Aug 4, 2025
@Borda Borda merged commit 357ae12 into main Aug 4, 2025
59 checks passed
@Borda Borda deleted the cli/debug branch August 4, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant