4 ms·
Well the thing is that it's code that's already been written, and honestly is kind of a mess. It would take more effort than it's worth to try and rewrite using
by ktm5j 2y ago
Well the thing is that it's code that's already been written, and honestly is kind of a mess. It would take more effort than it's worth to try and rewrite using a different GUI framework.
I much prefer Qt but this was written before I started here so it is what it is :/
The longer the test runs we end up losing data because they're looping over a dataframe that keeps growing and growing and the program just can't finish that loop in the 2 seconds that it has to run. But it's not a big enough deal for us to fix
- westurner 2y agoFWICS pyqtwebgraph has a TableWidget: https://pyqtgraph.readthedocs.io/en/latest/api_reference/widgets/tablewidget.html https://pyqtgraph.readthedocs.io/en/latest/api_reference/wid... https://github.com/pyqtgraph/pyqtgraph/blob/master/pyqtgraph/examples/TableWidget.py https://github.com/pyqtgraph/pyqtgraph/blob/master/pyqtgraph... : > Extends QTableWidget with some useful functions for automatic data handling and copy / export context menu. Can automatically format and display a variety of data types (see setData() for more information DataTreeWidget handles nested structs: https://pyqtgraph.readthedocs.io/en/latest/api_reference/widgets/datatreewidget.html https://pyqtgraph.readthedocs.io/en/latest/api_reference/wid... SO says it's better to extend Qt QTableView and do pagination for larger datasets: https://stackoverflow.com/questions/61517220/pyqt-pandas-fastest-way-to-update-table-widget-data#comment108833723_61517220 https://stackoverflow.com/questions/61517220/pyqt-pandas-fas... https://www.pythonguis.com/tutorials/qtableview-modelviews-numpy-pandas/#pandas https://www.pythonguis.com/tutorials/qtableview-modelviews-n... pyqtgraph mentions CUDA and NumPy support, but not pandas. Hard to believe there's not yet specific support for drawing spreadsheets of pandas dataframes in qt or pyqtgraph yet. dask.DataFrame and dask-CuDF also support CUDA. sympy's lambdify function compiles readable symbolic algebra to fast code for various libraries and GPUs. The Dataframe Protocol __dataframe__ interface spec Purpose and Scope doc mentions the NumPy __array_interface__ protocol; which may do sufficient auto-casting to a NumPy array before trying to draw a data table with formatting derived from then-removed columnar metadata: https://data-apis.org/dataframe-protocol/latest/purpose_and_scope.html https://data-apis.org/dataframe-protocol/latest/purpose_and_... Practically, pd.DataFrame(,dtype_backend="arrow") may be a quick performance boost. Jupyter kernels with Papermill or cron and templated parameters at the top of a notebook with a dated filename in a (repo2docker compatible) git repo also solve for interactive reports. To provision a temporary container for a user editing report notebooks, there's Voila on binderhub / jupyterhub, https://github.com/binder-examples/voila https://github.com/binder-examples/voila or repo2jupyterlite in WASM with MathTex and Pyodide's NumPy/pandas/sympy: https://github.com/jupyterlite/repo2jupyterlite https://github.com/jupyterlite/repo2jupyterlite But that's not a GUI, that's notebooks. For Jupyter integration, TIL pyqtgraph has jupyter_rfb, Remote Frame Buffer: https://github.com/vispy/jupyter_rfb https://github.com/vispy/jupyter_rfb