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 CLI components #28

Merged
merged 8 commits into from
Jan 24, 2024
Merged

Refactor CLI components #28

merged 8 commits into from
Jan 24, 2024

Conversation

JBorrow
Copy link
Member

@JBorrow JBorrow commented Jan 23, 2024

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.

@JBorrow JBorrow linked an issue Jan 23, 2024 that may be closed by this pull request
@JBorrow JBorrow mentioned this pull request Jan 23, 2024
Copy link
Member

@plaplant plaplant left a 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)
Copy link
Member

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.

@JBorrow JBorrow merged commit b67bcdb into librarian-v2 Jan 24, 2024
3 checks passed
@JBorrow JBorrow linked an issue Jan 24, 2024 that may be closed by this pull request
@JBorrow JBorrow deleted the JBorrow/issue27 branch February 23, 2024 18:51
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.

Implement file searching Refactor CLI and associated tests
2 participants