-
Notifications
You must be signed in to change notification settings - Fork 21
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
[Draft] File Importing #785
base: development
Are you sure you want to change the base?
Conversation
Was not properly displaying the correct information when both space charge and csr were selected
to the dashboard and auto-populate the UI with their configurations. | ||
""" | ||
|
||
def file_details(file) -> None: |
Check notice
Code scanning / CodeQL
First parameter of a method is not named 'self' Note
elif file_size_in_bytes < 1024 * 1024: | ||
size_str = f"{file_size_in_bytes/1024:.1f} KB" | ||
|
||
state.import_file_details = f"({size_str}) {file['name']}" |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable Error
|
||
state.import_file_details = f"({size_str}) {file['name']}" | ||
|
||
def parse_impactx_simulation_file(file) -> None: |
Check notice
Code scanning / CodeQL
First parameter of a method is not named 'self' Note
|
||
return parsed_values_dictionary | ||
|
||
def populate_impactx_simulation_file_to_ui(file) -> None: |
Check notice
Code scanning / CodeQL
First parameter of a method is not named 'self' Note
This PR allows users to upload .py simulation files and have the dashboard auto-populate inputs based on sim file info. The parser currently expects input files to be structured in the same structure as the dashboard export files.
Current limitations:
sim.lattice.extend
andsim.lattice.append
). The initial parser is limited - can only correctly all extract elements if the input file is structured similar to the export file.Merge after #780
Takes care of #668