Skip to content

Read python files directly from CLI and GUI#30

Merged
erwanp merged 5 commits intomainfrom
add/read_python_files_in_cli_and_gui
Aug 24, 2025
Merged

Read python files directly from CLI and GUI#30
erwanp merged 5 commits intomainfrom
add/read_python_files_in_cli_and_gui

Conversation

@erwanp
Copy link
Contributor

@erwanp erwanp commented Aug 24, 2025

Following #28 , Python files can be converted in a suitable Yaml file, with STONE format, by sim2stone.

This PR implements it automatically when :

  1. Loading Python files from the command-line-interface (CLI) with
boulder some_file.py
  1. Loading Python files from the "Drop or Select Config File" in the graphical-user-interface (GUI)
image

Therefore:

  • .py can now be read directly by Boulder.
  • A corresponding YAML file is generated on-the-fly.
  • If another YAML file already existed, it is compared and a warning message is raised. If different, the on-the-fly YAML corresponding to the .py file is generated next to the existing YAML file ; the existing YAML file is not replaced.

erwanp added 4 commits August 24, 2025 11:58
…tic conversion to .yaml using sim2stone

prompt: Now that sim2stone works , make it possible to import a .py file in Boulder in the CLI and UI load interface. If a .py is detected it will be automatically converted to .yaml first by running sim2stone , and then the .yaml is loaded. If a .yaml already exists, and it is different from the generated one, then generate new file do not overwrite .
@erwanp erwanp force-pushed the add/read_python_files_in_cli_and_gui branch from 957ba3f to 811a736 Compare August 24, 2025 13:53
@erwanp erwanp force-pushed the add/read_python_files_in_cli_and_gui branch from 811a736 to db1a1b5 Compare August 24, 2025 14:31
@erwanp erwanp changed the title Add/read python files in cli and gui Read python files directly from CLI and GUI Aug 24, 2025
@erwanp erwanp merged commit 7f7a96c into main Aug 24, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

1 participant