yjmantilla / sovabids

A python package for the automatic conversion of EEG datasets to the BIDS standard, with a focus on making the most out of metadata.
https://sovabids.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Making a simple web-app GUI #14

Closed yjmantilla closed 2 years ago

yjmantilla commented 3 years ago

Seeing the web interface of the COBIDAS project I think making a relatively simple web form interface could be approached. See the artemis example

@leoBAHM Given your time constraints could you approach this part of the project?

What comes to my mind is for example at this stage make a FORM for making/editing the rules file. So it should be able to read/write it.

Initially it should be able to edit the obligatory info required by BIDS, then we can extend.

See this link for the (to the best of my knowledge) are the required BIDS fields for eeg.

The app from #2 may also serve as examples to do the web gui through flask

yjmantilla commented 3 years ago

I dont know if this is possible but for the web-gui it would be awesome to implement something like this for the filepath parser:

The code for parsing is https://github.com/yjmantilla/sovabids/blob/f6a8c0f8801bf1d8806b1e3bb4d537927ab06bef/sovabids/utils.py#L90-L139

yjmantilla commented 3 years ago

Another idea I have for the gui is that first a single example eeg is read by the software and the user sees what data is inferred, then he corrects what is wrong by editing the rules file from the gui.

yjmantilla commented 3 years ago

I think eel would be a nice approach to do this. Here is a nice tutorial

Another option is to use pywebview

stebo85 commented 3 years ago

they both look good. Since you are using python anyway would it also make sense to use something like wxPython (https://wxpython.org/)? It is cross-platform and it doesn't really need a web-app, right?

yjmantilla commented 3 years ago

@stebo85 We were also thinking about going with pyQt5 (which we have explored before). Now, the main motivation for going with a webapp is so that it is almost ready to be deployed on a server. I'm not sure this is possible with eel but we wanted to try and see how was doing it from a web perspective.

If it fails I guess we will go with either pyQt5 or wxpython.

stebo85 commented 3 years ago

if you want something that runs in the browser and the desktop would node.js compiled to webassembly mabye be more useful? e.g. https://github.com/bioimagesuiteweb/examples

yjmantilla commented 3 years ago

@stebo85 Thanks, I took a look at it. Seems to be a really mature repo, lot to explore.

Discussing with @leoBAHM he suggested just going with Flask (since Django has a harder learning curve and ideally we would want something minimal and simple to understand for people to contribute).

So in a sense it would be a flask web app that had an initializer for running it locally.

civier commented 3 years ago

Hi @yjmantilla

Having a simple web interface could be great, but remember that the main reason we decided against including it in the project officially is the difficulty in maintaining a web app. Unfortunately, there aren't that many GUI developers that contribute to open-source projects. I would be much more keen to invest in developing a flexible API that would enable external GUIs to communicate with SOVABIDS better. If you want to have a simple GUI, we can even think of simple things like Google forms and such, and then reading the output spreadsheet (something that won't require maintenance). Maybe @TomEmotion can comment on that. In the end, our plan is to use someone else's GUI, so no point to invest much in ours (speaking of that -- did you get any further feedback from Brainlife/ezBids?). That said, if you want to program the GUI on top of the existing deliverable, it's completely your choice.

Best, Oren

yjmantilla commented 3 years ago

@civier

the difficulty in maintaining a web app

True, maintaining them is a head-ache. Mostly the idea I have is to provide a really minimal gui for basic usage.

I would be much more keen to invest in developing a flexible API that would enable external GUIs to communicate with SOVABIDS better.

I agree, following that thought, one of the excuses to make this simple GUI is to think what kind of stuff will be needed in the API. Because the stuff I'm implementing is mostly from the cli perspective. Some hints of what could be needed for the API is in the plugin schema of bidscoin, but it is still unclear to me.

If you want to have a simple GUI, we can even think of simple things like Google forms and such, and then reading the output spreadsheet (something that won't require maintenance).

This could work at least for the setting up of the rules file in a more user-friendly manner 🤔 , waiting for the comments of @TomEmotion . One of the problems I see is that it is kind of a "blind" approach, that is, the user fills the form and enters that stuff in sovabids; if there was an error he needs to go to the form and try again which is a bit cumbersome.

One of the ideas I had was for a responsive GUI that would allow you to preview the output/mapping, but well, that is an advanced feature which is not the priority right now.

our plan is to use someone else's GUI, so no point to invest much in ours (speaking of that -- did you get any further feedback from Brainlife/ezBids?).

They are really busy right now, basically the conclusion was that I would advanced the backend the most I could while they worked in the stuff they have right now on top of them.

Mostly the problem with this is that I don't have much experience regarding how an API should be like. So I hopped that by making a very basic and minimal gui some ideas of how it should be would become more obvious. I'm thinking this "API" design should be another issue altogether.

aswinnarayanan commented 3 years ago

@yjmantilla native gui seems a bit overkill at this stage, due to the high chance of having to scrap it later on.

We're looking at an:

A basic flask web app sounds like a good idea. It can help you plan out the backend interfaces without investing into the gui much.

yjmantilla commented 2 years ago

closing this for now since a preliminary version of the flask app was implemented