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

Strategy on overriding certain options, storing default options #238

Open
formatc1702 opened this issue Aug 25, 2021 · 1 comment
Open
Milestone

Comments

@formatc1702
Copy link
Collaborator

formatc1702 commented Aug 25, 2021

#214 has added the possibility of configuring certain options (colors, fonts, BOM formatting, language for color display names, ...) in the YAML, as originally proposed in #158.

The following functionalities would be highly desirable:

  • To be able to define "global" defaults, to avoid defining them in every individual harness YAML file.
  • To be able to override options from the command line for one-off use
    (e.g. quickly export a version with German color names on the fly, without touching the YAML)

A hierarchy of prioritization of the different configuration sources should be defined, for predictable outputs.
Proposal:

  1. Setting options via command line parameters (not likely to be required often, but should have # 1 priority)
  2. Setting options in the harness YAML file
  3. Setting options in the prepended YAML file (likely to be used for user- / company-wide defaults to use in all harnesses)
  4. Setting options in the WireViz config file* (currently not implemented).

*Some ideas on the config file:

  • Could be a YAML-formatted file, perhaps named .wvconfig or similar, and stored in a user's home folder
  • If it exists, it should set the default options to use whenever running wireviz
  • Could be used to specify a default prepend file, to avoid the need for specifying it in the CLI every time
  • Could be expanded over time to cover many more config options
    • Which columns to display in the BOM table, in what order, which language to use for column headers, ...
    • ...
@formatc1702 formatc1702 changed the title Strategy on overriding certain options/parameters Strategy on overriding certain options, storing default options Aug 25, 2021
@formatc1702 formatc1702 added this to the v0.4 and later milestone Aug 28, 2021
@kvid
Copy link
Collaborator

kvid commented Aug 29, 2021

I also suggest a CLI option to ignore any global options. This is useful when wanting an output that only depends on the imput YAML file, e.g. when running build_examples.py for comparison purposes.

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

No branches or pull requests

2 participants