Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

(Experimental) Port Envs to use conda-js #8

Merged
merged 73 commits into from
Aug 14, 2014

Conversation

lidavidm
Copy link
Contributor

@lidavidm lidavidm commented Jul 9, 2014

This is ready for review.

Changes:

  • Uses conda-js. Runs conda through a subprocess
  • Does not load all environments on page load
  • Uses Ractive.js in some parts for templating (this is something I was experimenting with for performance reasons)
  • Implements package installation, uninstallation, upgrading, downgrading; environment creation, cloning, deletion; changing settings; cleaning caches; reverting revisions
  • Implements progress bars where appropriate (uses WebSockets)
  • Makes "installed" tab primary one
  • Can do multiple install/uninstall/upgrade
  • Checks for upgrades (it does its own "new version" check for speed, but we could use conda update --all --dry-run instead)
  • "Sticky" top bar (scrolls with page)
  • Windows users are warned to close programs before proceeding

TODO:

  • I think there may be some cases where the UI can get in an inconsistent state? Please let me know if you run into an instance where it didn't update the UI but should have.

Images:

image
image
image
image

};

return promise;
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General note on this file -- it's better to use bower to pull this in rather than copy in the code directly. This file is also named wrong as it's not minified.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In bokeh we stay away from bower and we will happily drop npm if time permits.

@lidavidm
Copy link
Contributor Author

lidavidm commented Jul 9, 2014

Changes:

  • Clone, delete, new environment work
  • All views import conda through api.coffee to ensure API_ROOT is appropriately set
  • Port package installation dialog to conda-js

@lidavidm
Copy link
Contributor Author

lidavidm commented Jul 9, 2014

Alright, so now this PR ports everything to conda-js except for the 'Activate' call (whose functionality I'm not sure of).

@mattpap
Copy link
Contributor

mattpap commented Jul 9, 2014

except for the 'Activate' call (whose functionality I'm not sure of).

As in source activate $ENV_NAME. See also https://github.com/ContinuumIO/conda-ui/issues/7, thought it doesn't bring much to this discussion, at least for now.

@lidavidm
Copy link
Contributor Author

source activate $ENV_NAME

But that makes sense only in the context of a shell, right? Though that's not really relevant here.

@mattpap
Copy link
Contributor

mattpap commented Jul 10, 2014

Unless an environment can be made persistent (I doubt this), then yes, this will have to be removed.

@lidavidm
Copy link
Contributor Author

Any general comments on this version vs. master?

@mattpap
Copy link
Contributor

mattpap commented Jul 10, 2014

I will review this later today.

@lidavidm
Copy link
Contributor Author

Proof of concept of progress bars, using Tornado/SockJS

As written the progressbar will jump around/restart itself for each new package to fetch.

During installation:
image

When finished:
image

@lidavidm
Copy link
Contributor Author

Here's an idea I had for how the 'Packages' list could be used. The user could check the boxes for all the packages they wanted to install/uninstall/update and then select the action at the bottom. This would make more sense with the single-page two-table layout @tswicegood was talking about, though, and if the buttons disabled themselves dynamically (e.g. you shouldn't be able to 'install' packages already installed or remove uninstalled packages).

image

@asmeurer
Copy link
Collaborator

Does the column to the right indicate whether it is installed or not? Otherwise, it is confusing whether the checkboxes mean "select" or "install(ed)".

@lidavidm
Copy link
Contributor Author

It means "select". What I'm working on is putting "installed" and "all packages" in the same tab, and changing "all packages" to "available packages" so packages don't appear in both.

@lidavidm
Copy link
Contributor Author

Though, I think it makes more sense now to keep them on different tabs, and have "install" only show up on one tab and "update/uninstall" on the other. Oh well.

@lidavidm
Copy link
Contributor Author

Lots of UI changes here. This should be essentially feature-complete, except you can't downgrade packages or revert to a previous revision. The other major conda commands should all work. including the ability to downgrade or revert packages. Only conda run is unsupported (as the launcher covers that)

- flask
- conda
- tornado
- sockjs-tornado
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sockjs-tornado has to be propagated to repo.continuum.io.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can help, but first I need a recipe. Can you add one to conda-recipes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I've pushed the recipe up to conda-recipes.

@mattpap
Copy link
Contributor

mattpap commented Aug 7, 2014

@lidavidm, this looks really good. Huge improvement over the initial implementation. There was one issue, which prevented me from running this for a while, mainly checking for str, but not unicode in parse(). I fixed this in https://github.com/ContinuumIO/conda-ui/commit/f9adb4861f3c3eac439bf7e826d98524b14d668c. There are a couple rough edges, especially with error checking and reporting, but lets improve those gradually later.

Note to anyone who would like to try this out: you need conda at master.

@mattpap
Copy link
Contributor

mattpap commented Aug 7, 2014

@asmeurer, when this is merged, I think we should move the conda-ui to conda organization (?).

@lidavidm
Copy link
Contributor Author

lidavidm commented Aug 7, 2014

@mattpap Thanks for reviewing this. If you or anyone has specific comments on the functionality I can fix those (and I'll get the sockjs-tornado recipe up).

@asmeurer
Copy link
Collaborator

asmeurer commented Aug 7, 2014

@asmeurer, when this is merged, I think we should move the conda-ui to conda organization (?).

Someone apparently already did this (?)

@mattpap
Copy link
Contributor

mattpap commented Aug 8, 2014

Someone apparently already did this (?)

Yes, @teoliphant went ahead and moved the repository.

@lidavidm
Copy link
Contributor Author

@mattpap Should we merge this and then keep working on it?

@mattpap
Copy link
Contributor

mattpap commented Aug 14, 2014

@lidavidm, please merge. Sorry, I got sidetracked with other work.

lidavidm added a commit that referenced this pull request Aug 14, 2014
(Experimental) Port Envs to use conda-js
@lidavidm lidavidm merged commit e85d6a8 into master Aug 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants