Dylan-Pugh / ioos-qc-front-end

MIT License
1 stars 3 forks source link

Use pyscript instead of streamlit? #2

Open MathewBiddle opened 2 years ago

MathewBiddle commented 2 years ago

Is your feature request related to a problem? Please describe. Right now the web application has a dependency on streamlit.

Describe the solution you'd like Wouldn't it be nice if we didn't need to have the dependency on streamlit? @ocefpaf mentioned pyscript could be a neat solution to building this web application.

PyScript is a framework that allows users to create rich Python applications in the browser using HTML’s interface. PyScript aims to give users a first-class programming language that has consistent styling rules, is more expressive, and is easier to learn.

Describe alternatives you've considered Leaving the dependency on streamlit

Additional context cc: @ocefpaf

ocefpaf commented 2 years ago

The main advantages of pyscript for this apo would be:

MathewBiddle commented 2 years ago

more fodder to move to pyscript. When I try to go to the Live Web App, I receive this error:

image

ocefpaf commented 1 year ago

I forgot to report here but the latest version of ioos_qc works beautifully with pyodide+pyscript. Here is a draft with a few examples. One can test it here: https://ocefpaf.github.io/ioos_qc_webapp/ioos_qc_browser.html

@Dylan-Pugh and @gp86041 it would be nice to re-write this app with pyscript only. If you want to experiment with that please ping me and I can help you out.

MathewBiddle commented 1 year ago

During this years DMAC meeting there was a presentation of QC tests ran in the cloud. That made me think of this effort, but unfortunately streamlit stopped this activity. Any continued thoughts on moving to pyscript?

MathewBiddle commented 1 year ago

Looks like it's broken image

gp86041 commented 1 year ago

https://gp86041-ioos-qc-front-end-streamlit-file-upload-hmzvor.streamlit.app/

Above works. The app was put to sleep since no one was using it.

gp86041 commented 1 year ago

During this years DMAC meeting there was a presentation of QC tests ran in the cloud. That made me think of this effort, but unfortunately streamlit stopped this activity. Any continued thoughts on moving to pyscript?

@MathewBiddle I am interested in helping with this effort. The problem is my availabilities are non-existent these days. What is an ideal target deadline?

MathewBiddle commented 1 year ago

Maybe 2024 IOOS Code Sprint this spring?

Dylan-Pugh commented 1 year ago

That sounds good to me @MathewBiddle - I'm in the same boat as Jeff, interested but busy!

gp86041 commented 1 year ago

Sounds good, @MathewBiddle.

@Dylan-Pugh Looking forward to continuing working on this with you next year! I might start tiny bits here and there, but major progress will definitely be for Code Sprint.

Dylan-Pugh commented 1 year ago

Looking forward to it! Thinking long-term, a great first step might be to build a public API for the IOOS QC library, which is something we discussed last time. I've done something similar with this internal tool, which I contribute to sporadically:

https://github.com/Dylan-Pugh/TACT

I've found that Streamlit plays nicely with a REST API, but it would also allow us to swap the front-end at will. I have the beginnings of a GUI for QC here:

https://github.com/Dylan-Pugh/TACT/blob/master/tact/UI/streamlit/pages/4_Run_IOOS_QC.py