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

Standardize code patterns for reading input files #54

Closed
gonuke opened this issue Mar 4, 2024 · 8 comments · Fixed by #55 or #70
Closed

Standardize code patterns for reading input files #54

gonuke opened this issue Mar 4, 2024 · 8 comments · Fixed by #55 or #70
Assignees

Comments

@gonuke
Copy link
Member

gonuke commented Mar 4, 2024

Each of the main parastell functions can be called independently as a script. We should develop a standard way to read and parse the yaml.

@gonuke gonuke added this to the First OO upgrades milestone Mar 4, 2024
@connoramoreno connoramoreno linked a pull request Mar 29, 2024 that will close this issue
@connoramoreno
Copy link
Collaborator

This may have been addressed in #55 but I'll suspend closing this until confirmation by @gonuke

@gonuke
Copy link
Member Author

gonuke commented Mar 29, 2024

I don't think this is quite ready.

First, I notice that in the current code in oo_version we don't all refer to the same data using the same keywords.

Second - and maybe overkill - but we could move the read_yaml_config to the utils and pass in a list of keywords to get back and then not have to reimplement these same ~6 lines in each file.

@connoramoreno
Copy link
Collaborator

  1. Perhaps I'm misunderstanding what you mean but I'm failing to see where they're different (at least where the same arguments are used)
  2. I think that's a good idea! We can just pass all_data back from read_yaml_config and have the corresponding script parse that data object

@gonuke
Copy link
Member Author

gonuke commented Mar 29, 2024

I t

  1. Perhaps I'm misunderstanding what you mean but I'm failing to see where they're different (at least where the same arguments are used)

I think I use vmec_file in source_mesh and you use just vmec in inboard_vessel? One of them is wrong?

@connoramoreno
Copy link
Collaborator

connoramoreno commented Mar 29, 2024

Both use vmec, which refers to the VMEC object created by PyStell-UW. vmec_file is only an input argument for parastell, which refers to the actual VMEC data file that is subsequently read into PyStell-UW and passed to invessel_build and source_mesh.

@gonuke
Copy link
Member Author

gonuke commented Mar 29, 2024

I just updated invessel_build in #64 I think

@connoramoreno
Copy link
Collaborator

I missed that vmec was what's being returned by read_yaml_config in invessel_build; that's my bad. Thanks for changing that.

@connoramoreno connoramoreno linked a pull request Apr 3, 2024 that will close this issue
@connoramoreno connoramoreno self-assigned this Apr 8, 2024
@connoramoreno
Copy link
Collaborator

Closed via #70

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