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: basic configuration setup #3

Merged
merged 5 commits into from
Aug 25, 2023
Merged

Feat: basic configuration setup #3

merged 5 commits into from
Aug 25, 2023

Conversation

thekaveman
Copy link
Member

@thekaveman thekaveman commented Aug 24, 2023

What this PR does

  • Adds a simple YAML-based config file, wrapper class, and commands to interact with the config
  • Replaces the info command with config as the default
  • Adds some basic usage docs in the README

Testing this PR

  1. Checkout this branch
  2. Rebuild and Reopen the devcontainer
  3. Run tests from VS Code test runner
  4. Call the CLI inside the devcontainer:

Initialize a config file

littlepay config

Switch to the prod environment

littlepay switch env prod

Print help info

littlepay -h

New version of #1

last used path is stored in a separate file
@thekaveman thekaveman requested a review from a team August 24, 2023 19:39
@github-actions
Copy link

github-actions bot commented Aug 24, 2023

Coverage report

The coverage rate went from 87.17% to 96.05% ⬆️
The branch rate is 94%.

98.42% of new lines are covered.

Diff Coverage details (click to unfold)

littlepay/commands/configure.py

91.66% of new lines are covered (93.33% of the complete file).
Missing lines: 29, 30

littlepay/commands/switch.py

100% of new lines are covered (94.11% of the complete file).

littlepay/main.py

100% of new lines are covered (91.66% of the complete file).

littlepay/config.py

100% of new lines are covered (100% of the complete file).

@thekaveman thekaveman marked this pull request as draft August 24, 2023 21:32
@thekaveman thekaveman self-assigned this Aug 24, 2023
@thekaveman thekaveman marked this pull request as ready for review August 24, 2023 22:44
Copy link
Member

@machikoyasuda machikoyasuda left a comment

Choose a reason for hiding this comment

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

Runs on my machine:

  • Commands
image - Tests image

@thekaveman thekaveman merged commit 803ab49 into main Aug 25, 2023
1 check passed
@thekaveman thekaveman deleted the feat/config branch August 25, 2023 02:20
@thekaveman thekaveman added the cli New command line interface feature implementation or refactor label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli New command line interface feature implementation or refactor
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants