Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browbids - make the browser run pybids #65

Open
4 of 17 tasks
surchs opened this issue Jun 10, 2022 · 2 comments
Open
4 of 17 tasks

browbids - make the browser run pybids #65

surchs opened this issue Jun 10, 2022 · 2 comments
Labels

Comments

@surchs
Copy link
Contributor

surchs commented Jun 10, 2022

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:

  • understand what the most relevant pyBIDS use cases and queries are that can be implemented in the browser
  • find out how we can make a reusable wrapper / plugin of the pyodide-pyBIDS bundle that other projects can just load to gain this functionality
  • investigate ways to safely access the local filesystem so we can expose file metadata or even content to the python instance
  • document what we have learned for other projects that may be also interested in browserizing a python library
  • show a minimal but useful prototype of parsing a BIDS dataset in the browser using pyBIDS

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

  • Glasgow
  • Asia / Pacific
  • Europe / Middle East / Africa
  • Americas

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

  • experience using BIDS (to suggest or discuss use cases)
  • good at writing accessible documentation / tutorials
  • experience with Javascript (JS), any of
    • ideally some accessible frontend framework (e.g. Vue)
    • visualization libraries (e.g. d3)
    • JS testing (e.g. Jest, cypress.io)
    • packaging or distribution (e.g. npm / Vue plugin writing, ...)
  • browser filesystems, accessing local filesystem from browser,
  • python
  • familiarity with pybids / acnp_bids python API

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

  • I agree to follow the OHBM Code of Conduct during the hackathon
@surchs surchs changed the title browbids browbids - make the browser run pybids Jun 10, 2022
@djarecka
Copy link
Collaborator

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 :-)

@Remi-Gau Remi-Gau added the CHECK_LABEL Labels needs to be checked by a human label Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants