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

[ENH] - GUI Environment Editor version constraints widget doesn't allow reasonable MatchSpec choices and can't display many common constraints #376

Open
dharhas opened this issue Mar 5, 2024 · 2 comments
Assignees
Labels

Comments

@dharhas
Copy link
Member

dharhas commented Mar 5, 2024

Feature description

Currently the GUI cannot create or display many common version constraints that are commonly used to build actual environments. This means that in practice using conda-store in all but the simplest cases requires abandoning the GUI and only using the yaml editor.

The GUI widget on allows the an operator from the set of [=, >, <, >=, <=] combined with an exact version number. This is insufficient for many use cases.

image

A related issue is that version constraints that are entered in the yaml editor that are not possible in the GUI widget are not displayed (See #249)

i.e. setting pandas=2.2 is a short form for the latest version of the pandas 2.2.x series

image

this is not displayed in the GUI

image

Common constraints

  • numpy = 1.8
  • numpy 1.8*
  • numpy 1.8.1
  • numpy >=1.8
  • numpy ==1.8.1
  • numpy >=1.8,<2

The full set of matchspec options is likely too complex to be captured in a GUI widget.

Originally, I had proposed that we would have a version constraint builder widget that would populate a textbox that could also be edited manually. i.e. common use cases could be handled by the widget but you would have the ability to manually type more complex constraints.

Value and/or benefit

  • Avoid needing to switch to yaml view to set constraints
  • Non-yaml view hides many constraints and is not an accurate representation of actual constraints. This would be fixed.
  • Ability to use the GUI editor

Anything else?

No response

@trallard trallard moved this from New 🚦 to TODO 📬 in conda-store 🐍 Mar 12, 2024
@smeragoel smeragoel moved this from TODO 📬 to In Progress 🏗 in conda-store 🐍 Mar 25, 2024
@smeragoel
Copy link

@pavithraes had some thoughts on having some constraints so that the user selects the exact version. She's on PTO right now, so she can add her thoughts once she gets back. Meanwhile, I'm gonna design a "version constraint builder". I am planning to use a combination of dropdown and free form input to provide the user with the version suggestions while still giving them the flexibility of inputting via keyboard.

@smeragoel
Copy link

Here are some draft designs:

  1. Firstly, the default environment page:
    image

  2. Then we have the edit page, which is where we have the changes:
    image

Here's a closer look at the component:

image
I am using the MUI autocomplete component, which allows the user to add free form input, while also providing suggested/matching values.

We can also add more values to provide more flexibility with matching conditions:

image

And here's a quick video of the interaction (this is the create environment screen): https://www.loom.com/share/3d3291fc418b4f44b2c84d3d304ccfab?sid=ba91af01-0405-464e-a23b-0bdebe61fcb6

@smeragoel smeragoel moved this from In Progress 🏗 to In review 👀 in conda-store 🐍 Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In review 👀
Development

No branches or pull requests

3 participants