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: configuration file support #45

Open
4 tasks
cmdoret opened this issue Jul 26, 2024 · 1 comment
Open
4 tasks

feat: configuration file support #45

cmdoret opened this issue Jul 26, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@cmdoret
Copy link
Member

cmdoret commented Jul 26, 2024

It should be possible to provide configuration options via a config file, for options which are largely invariant within a project / environment. We should follow general recommendations (clig.dev, 12 factor).

NOTE: adding a -c/--config flag will require renaming the rules specification flag (maybe -r/--rules?)

Objective: support layered config via cli options or config flags

Requirements:

  • decide on implementation (possible solutions: config-rs, clap+serde)
  • rename existing options as needed
  • implement according to above recommendations
  • demo config + tests
@cmdoret cmdoret linked a pull request Aug 6, 2024 that will close this issue
7 tasks
@cmdoret cmdoret reopened this Aug 8, 2024
@cmdoret cmdoret removed a link to a pull request Aug 8, 2024
7 tasks
@cmdoret
Copy link
Member Author

cmdoret commented Aug 9, 2024

Started something with clap+serde in the branch feat/config-file, but this would require more work because:

  • optional variables do not work: as missing arguments cause clap to fail
  • merging config with args is not possible as-is
    This would require a more advanced crate (clap-serde or something simlar), which requires defining a separate config struct.
    Maybe overkill for now

@cmdoret cmdoret added the good first issue Good for newcomers label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant