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

[feat] Revamp CLI and add CLI tests #44

Merged
merged 9 commits into from
Oct 8, 2024
Merged

[feat] Revamp CLI and add CLI tests #44

merged 9 commits into from
Oct 8, 2024

Conversation

qTipTip
Copy link
Owner

@qTipTip qTipTip commented Oct 8, 2024

This PR revamps the CLI using the typer library.
It also adds tests for the CLI using the typer.testing.CliRunner.

   pylette --help
                                                                                                                                                                                                                                    
   Usage: pylette [OPTIONS]                                                                                                                                                                                                                 
                                                                                                                                                                                                                                            
  ╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
  │ --filename                                     PATH                   [default: None]                                                                                                                                                  │
  │ --image-url                                    TEXT                   [default: None]                                                                                                                                                  │
  │ --mode                                         [KM|MC]                [default: KM]                                                                                                                                                    │
  │ --n                                            INTEGER                [default: 5]                                                                                                                                                     │
  │ --sort-by                                      [frequency|luminance]  [default: luminance]                                                                                                                                             │
  │ --stdout                --no-stdout                                   [default: stdout]                                                                                                                                                │
  │ --out-filename                                 PATH                   [default: None]                                                                                                                                                  │
  │ --display-colors        --no-display-colors                           [default: no-display-colors]                                                                                                                                     │
  │ --colorspace                                   [rgb|hsv|hls]          [default: rgb]                                                                                                                                                   │
  │ --install-completion                                                  Install completion for the current shell.                                                                                                                        │
  │ --show-completion                                                     Show completion for the current shell, to copy it or customize the installation.                                                                                 │
  │ --help                                                                Show this message and exit.                                                                                                                                      │
  ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  • Working 'main' typer app
  • Working on integration tests for the CLI app
  • Move fixtures into conftest
  • Add all options test
  • Add test for no input is help
  • Update documentation
  • Update changelog

@qTipTip qTipTip merged commit ffd63af into master Oct 8, 2024
5 checks passed
@qTipTip qTipTip mentioned this pull request Oct 8, 2024
@qTipTip qTipTip linked an issue Oct 8, 2024 that may be closed by this pull request
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.

Need to create tests for the CLI
1 participant