Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request modernizes the CLI implementation by migrating from argparse to Typer, a modern Python CLI framework that provides better type hints, auto-generated help text, and improved user experience. The PR also includes several bug fixes discovered during the migration.
Changes:
- Migrated CLI from argparse to Typer framework
- Added typer and its dependencies (click, rich, shellingham, markdown-it-py, mdurl)
- Fixed multiple bugs: double %% escape for format strings, decode() calls for bytes, typo fix (vebose→verbose), missing parameter
- Created backward-compatible legacy CLI entry point
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Added new dependencies: typer (0.21.1), click (8.3.1), rich (14.3.2), shellingham (1.5.4), markdown-it-py (4.0.0), mdurl (0.1.2) |
| pyproject.toml | Added typer>=0.21.1 dependency, added opal-legacy script entry point for backward compatibility |
| obiba_opal/console.py | Completely rewritten to use Typer with command registration and error handling decorator |
| obiba_opal/console_legacy.py | New file containing the original argparse-based implementation for backward compatibility |
| obiba_opal/commands.py | New 3410-line file with Typer command implementations for all CLI commands |
| obiba_opal/subjects.py | Fixed format string escaping: @#$%^&+= → @#$%%^&+= |
| obiba_opal/security.py | Added .decode() calls to response.content for proper string output |
| obiba_opal/imports.py | Fixed typo: args.vebose → args.verbose |
| obiba_opal/dictionary.py | Added missing args.name parameter to _get_dictionary() call |
| obiba_opal/core.py | Improved password prompting logic to handle user without password |
| .ruff.toml | Added B008 and E501 exceptions for Typer patterns |
| Makefile | Improved local-install targets with clean and force options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
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.
No description provided.