Closed brendanjmeade closed 1 month ago
Try client server version that serves the main app with: bokeh serve --show result_manager.py
This is working for 2 folders in https://github.com/brendanjmeade/result_manager/commit/3452e8176dcafcae2d3485298602e861ad542326
A few issues/things to decide:
load_data1
and load_data2
. This isn't too elegant but it's functional. I think we could potentially just have one function and immediately copy the loaded variables stasource
, segsource
, and tdesource
to stasource_1
, segsource_1
, and tdesource_1
, but I'm not sure in practice how this would work. A side note is that, to make a copy of a ColumnDataSource, use stasource_2 = ColumnDataSource(stasource_1.data.copy())
stasource_2
and whatever ColumnDataSource ends up holding the comparison residual velocities). I'm going to reference #3 here because I think these issues are related. 0000000344/model_station.csv
to have all zeros for the north component of rotation velocities, just so the visual difference between something in folder 1 and folder 2 was more stark. The original file still exists. Another really minor issue (but sometimes confusing UX) is that, when loading a folder for the first time (doesn't seem to matter which button is clicked), the file picker shows up properly. Everything is loaded fine, but the active app is python 3.10. When loading a second folder, the python 3.10 app bounces in the Dock, and I need to manually switch to that app to bring up the file picker. If I don't see the bounce, I click the Load button again, and it gets a little confused (but ultimately loads the folder's files correctly). I don't know if there's a way to explicitly tell the file picker code to switch back and forth between apps (browser and python 3.10).
I haven't tried it yet, but here's ChatGPT's suggestion: https://chatgpt.com/share/0f9b4d83-52e9-4fac-99a6-9ff5e5d697d6
As is, this breaks the file picker. Slightly modified (deleting root.mainloop()
), it works, but it doesn't really help with bringing the file picker to the front when clicking the load button a second time. It also causes the Python 3.10 app to quit unexpectedly when I Ctrl+c in terminal to quit the bokeh server (though maybe there's a more elegant way to quit the server!)
- [x] I just copied the whole button loading routine, so there are now functions named
load_data1
andload_data2
. This isn't too elegant but it's functional. I think we could potentially just have one function and immediately copy the loaded variablesstasource
,segsource
, andtdesource
tostasource_1
,segsource_1
, andtdesource_1
, but I'm not sure in practice how this would work. A side note is that, to make a copy of a ColumnDataSource, usestasource_2 = ColumnDataSource(stasource_1.data.copy())
I think it might be best to leave these button functions as separate entities, given how the station data is loaded into CDSs with different key names, so I'm going to check this task off.
I think this is closed for now as things are working well enough.
Use Bokeh button with tk reader example in
result_manager_experiments.ipynb
.This should return the run folder name and automatically read station file and save it as a ColumnDataSource.