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

Use TOML as a way to manage recipes #705

Open
b-butler opened this issue Mar 3, 2020 · 0 comments
Open

Use TOML as a way to manage recipes #705

b-butler opened this issue Mar 3, 2020 · 0 comments

Comments

@b-butler
Copy link

b-butler commented Mar 3, 2020

Describe the behavior you would like added to mBuild
Manage recipes using some configuration file format. I suggest TOML.

This would allow for users to manage recipes using a human readable configuration format and interop nicely with #704. We would need to change the import logic for mbuild to also handle this configuration file.

Describe the solution you'd like

I would recommend something like this syntax

[[recipes]]
plugins = ["special_compound.SpecialCompound"]
other_options = ""

[[recipes]]
plugins = ["number2.Number2"]

other_configs = [
  "file1",
  "file2"
]

As for location, I think adhering to system standards (Windows, MacOS, and Linux) would be good. We could also add an option to the command line interface proposed in #704 to change the standard location. However, I think the best solution is the other_configs list presented above that points to other configuration files that can be added via #704. We would need to depend on a TOML file parser in python (of which their are many, TOML) is a simple standard.

Describe alternatives you've considered
YAML or JSON are other options could be used, but I believe that in general YAML is too complicated and parsers are complicated, and JSON doesn't achieve the human readability that TOML does.

@justinGilmer feel free to add any other thoughts you wanted to put from our discussion on this topic.

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

No branches or pull requests

1 participant