-
Notifications
You must be signed in to change notification settings - Fork 10
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
Pass the param dict directly to the backend? #53
Comments
This will do: from nsls2ptycho.core.ptycho.ptycho_trans_ml import ptycho_trans
pty = ptycho_trans(None) |
This is the first two steps in #53: - Instantiate the backend ptycho_trans class directly in the frontend, and dump its attributes to disk as before - Eliminate the intermediate Param class
We needed to dump the dict as a text file for the backend to read because otherwise the backend had no way to tell the working directory (and |
Problems:
This effort is currently in this branch: https://github.com/leofang/ptycho_gui/tree/refactor |
Currently we maintain, effectively, 4 distinct dicts:
Param()
class here: https://github.com/leofang/ptycho_gui/blob/b64326d7d0db5f05bda684a55f295bf1fdeb57e2/nsls2ptycho/ptycho_gui.py#L104-L108configparser
: https://github.com/leofang/ptycho/blob/b0b39bd849ad65842659e29dc446f9629fa1433e/utils.py#L8ptycho_trans
class https://github.com/leofang/ptycho/blob/b0b39bd849ad65842659e29dc446f9629fa1433e/ptycho_trans_ml.py#L79This has caused a significant headache every time we want to pass new attributes from the fronted to the backend: We have to update all the four files above plus https://github.com/leofang/ptycho/blob/master/recon_ptycho_gui.py to get it work, which is too tedious from the maintenance point of view.
The goal is to maintain a single dictionary across both frontend and backend. Steps to resolve this are:
ptycho_trans
class directly in the frontend, and dump its attributes to disk as beforeParam
classconfigparser
The text was updated successfully, but these errors were encountered: