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

Refactor: organize user commands #18

Merged
merged 6 commits into from
Apr 22, 2024
Merged

Refactor: organize user commands #18

merged 6 commits into from
Apr 22, 2024

Conversation

thekaveman
Copy link
Member

This PR organizes all user commands:

  • Into a user/ subdirectory in commands/
  • As subcommands of the user command on the CLI

E.g. before this change, to create a user the following CLI call was used:

$ compiler-admin create <username>

And after this change, the call looks like:

$ compiler-admin user create <username>

This PR also updates how argument parsers are built and evaluated for the CLI, to give more flexibility to additional top-level commands in the future.

Copy link

github-actions bot commented Apr 20, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  compiler_admin
  main.py 87
  compiler_admin/commands
  info.py
  init.py
  compiler_admin/commands/user
  __init__.py 15-18
  offboard.py
  reset_password.py
Project Total  

This report was generated by python-coverage-comment-action

since this is calculated dynamically from source
and could be 'dirty' based on work in progress
@thekaveman thekaveman force-pushed the refactor/user branch 2 times, most recently from 972974a to 920d04d Compare April 22, 2024 15:26
adjusts all user commands to be subcommands, with usage:

$ compiler-admin user <subcommand> <subcommand args>
avoids matching on string names, simplifies adding new commands
@thekaveman thekaveman marked this pull request as ready for review April 22, 2024 15:34
@thekaveman thekaveman merged commit dab9964 into main Apr 22, 2024
1 check passed
@thekaveman thekaveman deleted the refactor/user branch April 22, 2024 15:34
@thekaveman thekaveman self-assigned this Apr 22, 2024
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.

1 participant