Quansight / conda-store-jupyterlab

JupyterLab extension for conda store
0 stars 0 forks source link

Collab with mamba gator app #11

Open jess-x opened 2 years ago

jess-x commented 2 years ago

The existing mamba gator app: https://github.com/mamba-org/gator provides Conda/Mamba environment and package management as a standalone application or as extension for JupyterLab. Integrating conda-store with the mamba gator app might be a more sustainable path.

pierrotsmnrd commented 2 years ago

Things to take into account :

pierrotsmnrd commented 2 years ago

On the backend side, my understanding is :

Regarding the previous points I mentioned :

saulshanabrook commented 2 years ago

From a code perspective, the extensions looks great and it would be preferable to contribute to an existing one then start our own! So I am +1 on trying to re-use that existing work.

Conda store adds some abstractions, like a sequence of builds of an environment, that are not present in conda itself, so the main question for me is what the combined UI would look like and whether the gator maintainors would be open to us adding that to their extension.

peytondmurray commented 2 years ago

:point_up: Totally agree with the idea to integrate with gator. I think it would be really nice to manage environments from a single place, rather than in multiple places with multiple different tools. So from the user perspective I think it would be really great therefore to integrate conda-store with gator.

saulshanabrook commented 2 years ago

We just had a chat with @costrouc and settled on trying to have gator use conda store as a backend initially, and then explore how to add more its UX, as we need it to expose more advanced conda store concepts likes builds and rollbacks.

I proposed then trying to add an extension mechanism to gator, to allow it to switch how it fetches the data and sends updates. That way, we could develop an independent gator-conda-store package that would provide a way for conda store to use gator, but not have to integrate it directly. We could hopefully re-use the existing conda store REST API in that extension, and just reformat the requests and responses client side to suite gator.

Thoughts?

dharhas commented 2 years ago

I like this plan. Seems like a decent approach.

saulshanabrook commented 2 years ago

I started doing a little research on this and found that gator already supports an interface/token/plugin for an EnvironmentManager that I believe we could try to fulfill with conda store: https://github.com/mamba-org/gator/blob/80b6879fe2fe62740a6b8afa12a1734ecd9911d9/packages/common/src/tokens.ts

I would say to just disable their extension than for that token and write out own, but unfortunately, it looks like their extension not only provides that manager on activation (which we would want to override), but also does some other setup that we want to maintain: https://github.com/mamba-org/gator/blob/80b6879fe2fe62740a6b8afa12a1734ecd9911d9/packages/labextension/src/index.ts#L32-L133, like setting up the shell and such.

@fcollonval do you have any ideas on how we could attempt to replace the Gator backend to use the Conda Store API instead? One thought I had is we could split the current condaManager extension (https://github.com/mamba-org/gator/blob/80b6879fe2fe62740a6b8afa12a1734ecd9911d9/packages/labextension/src/index.ts#L169-L175) into two extensions, one that just provides the IEnvironmentManager, and another that depends on that and does all the initialization with it, and returns void? That way we could swap out the IEnvironmentManager and maintain your initialization.

fcollonval commented 2 years ago

do you have any ideas on how we could attempt to replace the Gator backend to use the Conda Store API instead? One thought I had is we could split the current condaManager extension (https://github.com/mamba-org/gator/blob/80b6879fe2fe62740a6b8afa12a1734ecd9911d9/packages/labextension/src/index.ts#L169-L175) into two extensions, one that just provides the IEnvironmentManager, and another that depends on that and does all the initialization with it, and returns void? That way we could swap out the IEnvironmentManager and maintain your initialization.

Hey @saulshanabrook the current implementation came from the need to use the conda manager in third party extensions. Hence it was not moved in its own plugin. But sure, that sounds like a good refactoring that should cover your need.

fcollonval commented 2 years ago

Don't hesitate to open PRs for discussion if some interfaces require modifications.