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

Change Input File Format from .py to .yaml #2634

Open
JacksonBurns opened this issue Mar 15, 2024 · 4 comments
Open

Change Input File Format from .py to .yaml #2634

JacksonBurns opened this issue Mar 15, 2024 · 4 comments
Assignees

Comments

@JacksonBurns
Copy link
Contributor

Motivation or Problem

Right now to run RMG, users write a functional Python script which is then actually executed (using exec) by RMG to load the requested reactors, species etc. into memory. The problems with this are:

  • this is formatting sensitive and tedious
  • exec is a security risk
  • exec is difficult to debug
  • exec requires passing the global and local namespace to the executed file, which is slow

Desired Solution

I mentioned in #2633 that the Green group has been planning to switch the input file format to YAML, and with the opening of #2633 it seems like a good time to announce this formally.

In line with cantera, RMS, and so many other modern tools, users will specify their simulation setup in a yaml format like:

 - reactor:
    - type: simple
    - temperature: 200 K
 - species:
    - smiles: C
    - smiles: CC
 - constraints:
    - max_size: 4

which will then be loaded by RMG.

Potential Alternatives

The easy thing to do would be to just not do this, but for the outlined reasons this is a bad idea.

etc.

@jonwzheng
Copy link
Contributor

This is a great initiative and I'm on board with this. A couple of initial thoughts:

  • ARC already uses the .yml input format and overlaps strongly / utilizes RMG & Arkane in its codebase. It might be worth chatting with people who've worked on ARC (@alongd) because some of the work might already be "done" in ARC.
  • No strong feelings yet on if we should supply a conversion script. My initial thought is to allow both .py and .yml for now, with a DepreciationWarning if .py is used, and slowly transition to .yml in a future release. I agree a conversion script might be a lot of work, and input files tend not to be super complex, so I would also lean towards not providing it, as long as we provide some examples of "before" and "after" input files.

Copy link

This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.

@github-actions github-actions bot added the stale stale issue/PR as determined by actions bot label Jun 17, 2024
@JacksonBurns JacksonBurns removed the stale stale issue/PR as determined by actions bot label Jun 17, 2024
Copy link

This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.

@github-actions github-actions bot added the stale stale issue/PR as determined by actions bot label Sep 16, 2024
@JacksonBurns
Copy link
Contributor Author

Should probably reformat this as a RIP

@github-actions github-actions bot removed the stale stale issue/PR as determined by actions bot label Sep 17, 2024
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