mamba-org / gator

Conda environment and package management extension from within Jupyter
Other
260 stars 31 forks source link

Added ability to list conda-store environments #155

Closed peytondmurray closed 2 years ago

peytondmurray commented 3 years ago

Background info: conda-store

This PR adds initial support for conda-store, an environment management system which aims to provide reproducible conda environments in as many ways as possible to users and services. From the conda-store documentation:

Conda Store controls the environment lifecycle: management, builds, and serving of environments.

It manages conda environments by:

  • provides a web ui to take advantage of many of conda-stores advanced capabilities and providing an easy interface to modify environments
  • watching specific files or directories for changes in environment filename specifications
  • provides a REST api for managing environments (which a jupyterlab plugin is being actively developed for)
  • provides a command line utility for interacting with conda-store conda-store env [create, list]
  • full role based access controls (rbac) around environment view, creation, update, and deletion.
  • It builds conda specifications in a scalable manner using N workers communicating using Celery to keep track of queued up environment builds.
  • It serves conda environments via a filesystem, lockfiles, tarballs, and soon a docker registry. Tarballs and docker images can carry a lot of bandwidth which is why conda-store integrates optionally with s3 to actually serve the blobs.

Summary

This PR adds the ability to list conda-store environments from a new menu option. This PR is larger because this is foundational work for adding conda-store support; subsequent PRs will be smaller. Thanks for your patience with this!

Changes

@fcollonval If you get a chance to review this PR, I would be grateful for any feedback you have.

github-actions[bot] commented 3 years ago

Binder :point_left: Launch a binder notebook on the branch Quansight/gator/refactor-split-plugins

peytondmurray commented 2 years ago

Thank you @fcollonval for the constructive feedback. Here's my plan going forward:

  1. I'll define a model for the React components to use to interact with conda-store
  2. I'll move away from defining separate conda-store functional components and put a greater emphasis on reusing existing class-based components
  3. I'll modify the existing list components to allow us to detect when the user has scrolled all the way to the bottom of a list, in order to be able to use paginated API responses (which conda-store currently uses)

I'll update this thread when I have these prepared. Thanks again!

fcollonval commented 2 years ago

Thanks @peytondmurray

1. I'll define a model for the React components to use to interact with conda-store

:+1:

2. I'll move away from defining separate conda-store functional components and put a greater emphasis on reusing existing class-based components

Don't hesitate to replace some existing components by your functional one if it simplifies/improves the current ones.

3. I'll modify the existing list components to allow us to detect when the user has scrolled all the way to the bottom of a list, in order to be able to use paginated API responses (which conda-store currently uses)

:+1:

Small comment, in the latest commit you removed the plugin id for conda-store instead of renaming it. You should definitely use another name otherwise JupyterLab won't see the two plugins (aka the one for conda from cli and the one for conda-store).

peytondmurray commented 2 years ago

@fcollonval The conda-store integration is ready for a second look.

peytondmurray commented 2 years ago

Gentle ping @fcollonval can you take another look at the this PR and see if it is ready to merge?

peytondmurray commented 2 years ago

@fcollonval Okay, this should be ready for another look.

fcollonval commented 2 years ago

@fcollonval Okay, this should be ready for another look.

I'll do that tomorrow. I'm working to fix the CI.

fcollonval commented 2 years ago

@peytondmurray would you mind to rebase the PR on the latest master to restore the CI. Then if it passes, we are good to go.

peytondmurray commented 2 years ago

Excellent, thanks for the help! I've rebased onto master. There's a few commits which appear here which are in master but not in conda-store-integration which have been picked up here, but that's okay.

fcollonval commented 2 years ago

Thanks @peytondmurray merging now...