-
Notifications
You must be signed in to change notification settings - Fork 0
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 CLI components #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much @JBorrow! I have only a single not-really-substantive comment, but also happy to merge as is if we want to move on to other tasks.
type=str, | ||
nargs="+", | ||
help="key-value pairs of events.", | ||
) | ||
sp.set_defaults(func=add_file_event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After writing this submodule, it has since struck me as odd that I decided to put the target function definitions after they are specified here. (I tend to write code so that functions are defined before they are used, though obviously this is not strictly required.) Refactoring so the functions (like add_file_event
) come before the subparser definitions has never been a high priority, but now that we're significantly editing this file, I think I'd prefer to move the subparser definitions to be below the target function definitions.
CLI components have been re-factored and we now load all settings from a standard
pydantic
BaseSettings
so they can be configured using environment variables.