ohbm / hackathon2022

Website for the 2022 OHBM Hackathon
https://ohbm.github.io/hackathon2022/
MIT License
5 stars 11 forks source link

browbids - make the browser run pybids #65

Open surchs opened 2 years ago

surchs commented 2 years ago

Title

Browbids - Make the browser run pybids

Short description and the goals for the OHBM BrainHack

Browsers (typically) don't run Python code. That's a shame, because the neuroimaging community has so many great tools written in Python that could be reused in interactive, graphical web apps without requiring users to install anything on their machine. If you're working with BIDS, you are probably familiar with the bids-validator project that you can simply access with your web browser. Wouldn't it be nice if you could just run some simple pyBIDS queries on your local BIDS dataset like that, directly in the browser, without having to first source your python environment and installing some libraries? And ideally without having to reimplement pyBIDS as a javascript library?

Luckily, new solutions for python in the browser are currently being developed: Pyodide and pyscript are two (fairly) recent efforts to bring python to the browser using the webassembly language. These projects not only allow us to run Python code in the browser and use the output, but we can also install (some) Python libraries from PyPI and use them directly. So you can install ancp_bids inside pyodide, and then load a local BIDS dataset in your browser and run some basic queries. Here is a very simple prototype: https://browbids.netlify.app/ . But there are still a lot of challenges to solve, particularly with file system access and python dependencies that don't play nice with pyodide.

The rough goals for this hackathon are:

Link to the Project

https://github.com/neurobagel/browbids

Image for the OHBM brainhack website

https://github.com/neurobagel/browbids/blob/main/public/browbids.png?raw=true

Project lead

Sebastian Urchs (Github: @surchs - Discord: surchs#8490)

Main Hub

Glasgow

Other Hub covered by the leaders

Skills

We are very much starting from the beginning (although there is a simple proof of concept) and are trying to find a good way to address this project. Many of the initial challenges will probably require experience with javascript and web development as well as pyBIDS, but there is also a need for a BIDS user perspective to answer understand what would be useful things to do with pyBIDS in the browser.

So any combination of

Recommended tutorials for new contributors

Good first issues

No response

Twitter summary

browbids https://github.com/neurobagel/browbids Do you want to parse and query a BIDS dataset directly in the browser using python? Our hackathon project will use @pyodide / @pyscript_dev to make this work. @surchs

OHBMHackathon #Brainhack #OHBM2022

Short name for the Discord chat channel (~15 chars)

browbids

Please read and follow the OHBM Code of Conduct

djarecka commented 2 years ago

Thank you for submitting the project! We have 35 projects right now, woohoo! But that means the projects pitches will have to be short. We will give you tomorrow 2 minutes to pitch your project, you can have one slide or no slides! If you decide to use a slide, please include the link to the slide here.

And don't worry, you will still have more time to talk about your project during the BrainHack :-)

surchs commented 2 years ago

Hi @djarecka, I got a slide for our project here: https://docs.google.com/presentation/d/e/2PACX-1vQwdK_n3ZXgiawMzJuQ3-dLCf_ymK8SKzeH61g80RrvtMsT3D4rjCw9pLQvBXuZOyJkajApYtU905vB/pub?start=false&loop=false&delayms=3000