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

Read defaults from a yaml file #21

Open
tbekolay opened this issue May 9, 2019 · 0 comments
Open

Read defaults from a yaml file #21

tbekolay opened this issue May 9, 2019 · 0 comments

Comments

@tbekolay
Copy link
Member

tbekolay commented May 9, 2019

It would be nice to move all possible values and especially to put default values in a separate YAML file rather than specifying them manually in nengo_bones.config.fill_defaults. Such a YAML file would be a convenient place to document all of the possible things you can do in a .nengobones.yml without needing to write lots of prose, as we're currently doing in the configuration.ipynb notebook.

A few difficulties for this:

  • Some of the defaults are generated in Python code and thus can't be easily included in a .yml file (e.g., copyright_start is datetime.now().year).
  • Some things can be repeated, and have defaults within those repeated sections (e.g., each job in travis_yml can have some defaults set).
  • Some keys are required but do not have defaults (e.g., project_name)

These difficulties mean that the defaults.yml file might have to have some special values that we will later interpret in code, which partly defeats the purpose, but would at least be an explicit way of saying "this value has a special default" or "this value can be repeated" or "this value is required but has no default".

Alternatively, it may the case that the YAML file listing all possible keys is separate from the YAML file listing defaults. Thinking about that is giving me some XSLT vibes... and doing a bit of googling, it looks like we could perhaps replace a lot of our custom logic with jsonnet, though that would be a very big change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant