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

Implement config interface #13

Open
treykeown opened this issue Jun 13, 2023 · 1 comment
Open

Implement config interface #13

treykeown opened this issue Jun 13, 2023 · 1 comment
Labels
design needed Code architectural or aesthetic-related enhancement New feature or request
Milestone

Comments

@treykeown
Copy link
Owner

treykeown commented Jun 13, 2023

Loading configuration is a very common pattern for CLIs - we need a way to do this. Design should use something like arguably.arg.config() and use the values in there to replace default values.

@treykeown treykeown added the enhancement New feature or request label Jun 13, 2023
@treykeown treykeown changed the title Configure options via a .yml Load configuration for a script via a .yml Jun 13, 2023
@treykeown treykeown added the design needed Code architectural or aesthetic-related label Jun 18, 2023
@treykeown treykeown added this to the v2.0.0 milestone Jun 19, 2023
@treykeown treykeown changed the title Load configuration for a script via a .yml Implement arguably.arg.config() Jun 19, 2023
@treykeown treykeown changed the title Implement arguably.arg.config() Implement config interface Jun 20, 2023
@treykeown
Copy link
Owner Author

Current plan is this:

  • Add a config_flag kwarg to arguably.run(), as we do with --version
  • Lay out config file in a way that mirrors the command structure
  • Based off of the arg type, parse values in the toml/yaml/etc file.
  • Automatically wire in config values

Open questions:

  • May be better not to have config file layout mirror command structure?
    • Should config files be required to change if command structure changes?
    • If not this, how can we specify which config values correspond to which command/arg?

This effort and #10 are very closely related.

@treykeown treykeown modified the milestones: v2.0.0, Goals Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design needed Code architectural or aesthetic-related enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant