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

Making streamlit web app #20

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Making streamlit web app #20

wants to merge 4 commits into from

Conversation

shimwell
Copy link
Member

@shimwell shimwell commented Dec 19, 2022

Work in progress

This PR aims to add a html streamlit based web app GUI for the package.

@shimwell
Copy link
Member Author

shimwell commented Dec 24, 2022

currently getting an error, it looks like gmsh can't run from a streamlit app as it needs to run in the main thread.

ValueError: signal only works in main thread of the main interpreter
Traceback:

File "/home/jshimwell/miniforge/envs/cad_to_dagmc_dev/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 564, in _run_script
    exec(code, module.__dict__)
File "/home/jshimwell/cad_to_dagmc/src/cad_to_dagmc/app.py", line 131, in <module>
    main()
File "/home/jshimwell/cad_to_dagmc/src/cad_to_dagmc/app.py", line 111, in main
    my_model.export_dagmc_h5m_file()
File "/home/jshimwell/cad_to_dagmc/src/cad_to_dagmc/core.py", line 124, in export_dagmc_h5m_file
    brep_to_h5m(
File "/home/jshimwell/miniforge/envs/cad_to_dagmc_dev/lib/python3.10/site-packages/brep_to_h5m/core.py", line 46, in brep_to_h5m
    h5m_filename = mesh_to_h5m_in_memory_method(
File "/home/jshimwell/miniforge/envs/cad_to_dagmc_dev/lib/python3.10/site-packages/brep_to_h5m/core.py", line 162, in mesh_to_h5m_in_memory_method
    gmsh.finalize()
File "/home/jshimwell/miniforge/envs/cad_to_dagmc_dev/lib/python3.10/site-packages/gmsh.py", line 283, in finalize
    signal.signal(signal.SIGINT, oldsig)
File "/home/jshimwell/miniforge/envs/cad_to_dagmc_dev/lib/python3.10/signal.py", line 56, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))

@shimwell shimwell changed the title Making web app Making streamlit web app Jan 8, 2023
@shimwell shimwell marked this pull request as draft December 17, 2023 01:59
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