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

Add project preferences #9804

Open
4 tasks
goanpeca opened this issue Jul 10, 2019 · 17 comments
Open
4 tasks

Add project preferences #9804

goanpeca opened this issue Jul 10, 2019 · 17 comments

Comments

@goanpeca
Copy link
Member

goanpeca commented Jul 10, 2019

  • Include support for configuration setup (Global vs. Project)
  • Hide configuration that do not make sense to display for projects (if user selects Project level config)
  • Include project configuration on the preferences
  • Add entry to the Projects menu to change configuration of the current project.

Screen Shot 2019-07-18 at 09 06 13

• Environment variables: Aqui debería ir una tabla con las variables de entorno definidas en el proyecto, junto la posibilidad de añadir o eliminar variables
• Packages: Aquí debería verse la lista de paquetes guardados con anaconda-proyect
• Conda Environment: Aquí debería verse el conda env asociado al proyeto, pero de pronto podemos unir esta entrada con Packages
• Master file: Este es el archivo maestro para correr el proyecto (edited)

@ccordoba12
Copy link
Member

@dalthviz, did you find the notes I gave you in January for this?

@dalthviz
Copy link
Member

@ccordoba12 I searched but I didn't find them :/

@ccordoba12
Copy link
Member

Ok, no worries. I'll try to remember what I was thinking about it.

@goanpeca
Copy link
Member Author

@ccordoba12 could you paste the paper here :-) ? thanks!

@goanpeca
Copy link
Member Author

goanpeca commented Jul 22, 2019

I still need to update icons and the actual logic for environments (a separate PR for anaconda-project). Is this what you had in mind @ccordoba12?

Screen Shot 2019-07-22 at 12 29 49

Screen Shot 2019-07-22 at 12 30 03

Environment and packages

For this one I think the user should only be able to change the package from the last option? A user using the default spyder env or another env should not be able to modify this since these other envs might not be handled by anaconda project at all. Also, how should we signal, conda vs pip ?

My idea is to have add create a small dialog where we can validate input and then populate the table. Clicking on the table for edition would pop up this dialog. I think this makes the process easier, since we can validate at the dialog level and not the table level.

Thoughts @ccordoba12 ?

Screen Shot 2019-07-22 at 12 30 12

Screen Shot 2019-07-22 at 12 30 17

@goanpeca
Copy link
Member Author

goanpeca commented Jul 22, 2019

We could also add something related to Version Control which could be a separate page, or be part of the general one? Information to display here could be the remotes of the project? or the original repo it was cloned from (if the project was created from a git clone).

Where should we include the Use Global Preferences vs Use Project Preferences option? in the general page?

@goanpeca
Copy link
Member Author

@jnsebgosselin do you have some suggestions for the icons we could use :-) ?

@ccordoba12
Copy link
Member

ccordoba12 commented Jul 23, 2019

Is this what you had in mind

Yes, this is pretty much what I had in mind! Thanks!

About your screenshots:

  • The "Variables" entry should be renamed to "Environment variables" to be quite clear about the meaning of that.
  • The "Environment and packages" entry should be renamed simply to "Conda enviroment" and it should be deactivated (or better still, not shown at all) if Spyder is not running under Anaconda. Besides, that entry should have two tabs: one called "Environment" and the other one called "Packages". I think in "Environment" we should only show "Use existing conda environment" (without the base env on that list) and "Project environment". The idea with that is to force people to not use the base env, which is a killer for reproducibility. And the "Packages" tab should show the table of packages you already created.
  • Perhaps "Master file" should be removed as an entry and moved as a tab in "General"? What do you think?

About your questions:

  • We could also add something related to Version Control which could be a separate page, or be part of the general one?

    I think we should add a separate page (entry) for this.

  • Where should we include the Use Global Preferences vs Use Project Preferences option? in the general page?

    Yes, I think we should add this to "General".

@goanpeca
Copy link
Member Author

goanpeca commented Jul 23, 2019

The "Variables" entry should be renamed to "Environment variables" to be quite clear about the meaning of that.

👍

The "Environment and packages" entry should be renamed simply to "Conda enviroment" and it should be deactivated (or better still, not shown at all) if Spyder is not running under Anaconda. Besides, that entry should have two tabs: one called "Environment" and the other one called "Packages". I think in "Environment" we should only show "Use existing conda environment" (without the base env on that list) and "Project environment". The idea with that is to force people to not use the base env, which is a killer for reproducibility. And the "Packages" tab should show the table of packages you already created.

Ok, but I need some extra pointers on how we will handle some things. What packages should we display on the packages tab when:

  • Project env: This is clear that we will track only the packages the user explicitly asked for.
  • Use existing conda environment: What packages here? All the packages that currently are installed on the env? or? Should user be able to add and remove any package here?

Perhaps "Master file" should be removed as an entry and moved as a tab in "General"? What do you think?

Yes I think it makes sense for now.

We could also add something related to Version Control which could be a separate page, or be part of the general one? I think we should add a separate page (entry) for this.

Ok will do.

@ccordoba12
Copy link
Member

ccordoba12 commented Jul 23, 2019

Use existing conda environment: What packages here? All the packages that currently are installed on the env? or?

I agree this is the crucial point. Without users letting us know a specific set of packages in their environment, it's not possible for us to guarantee project reproducibility.

I see two options here:

  1. Discouraging the usage of previously created conda envs at project creation and also when users select "Use existing conda environment". We could do that by showing a modal dialog, saying that it's not possible to guarantee reproducibility of the project in that case.
  2. Disabling the "Packages" tab, or showing the entire list of packages in the env along with a warning instructing users to select the main dependencies of the project (e.g. Numpy, Pandas, Matplotlib, and not libgcc-ng) so we can register them in anaconda-project.yml.

@ccordoba12
Copy link
Member

Perhaps both options apply?

@goanpeca
Copy link
Member Author

goanpeca commented Jul 23, 2019

Disabling the "Packages" tab, or showing the entire list of packages in the env along with a warning instructing users to select the main dependencies of the project (e.g. Numpy, Pandas, Matplotlib, and not libgcc-ng) so we can register them in anaconda-project.yml.

The issue I see with this option (besides adding greater complexity) is that two or more projects could be using this other conda environment so, if the user has different dependencies on different projects, that conda env might reach a point where it will have to update some packages on project switch (because the user selected different "packages" as the main packages of their environment).

The only "solution" to this is that a project could only use another existing conda env, but this also probably defeat its purpose for users wanting to recycle the same env for may different projects.

Disabling the "Packages" tab, or showing the entire list of packages

What I think would make sense to me is that if the user select an existing environment, we can display the whole list (as information for the user) but disable any modification of that env from the spyder interface (remove or disable the add/edit/remove). This allows power users that want to recycle envs to use them (they can use the CLI to update the env at their own risk...), but enforces "best practices" for non power users.

Thoughts?

@ccordoba12
Copy link
Member

The issue I see with this option (besides adding greater complexity) is that two or more projects could be using this other conda environment so, if the user has different dependencies on different projects, that conda env might reach a point where it will has to update some packages on project switch (because the user selected different "packages" as the main packages of their environment).

Great point! I haven't thought about that!

What I think would make sense to me is that if the user select an existing environment, we can display the whole list (as information for the user) but disable any modification of that env from the spyder interface (remove or disable the add/edit/remove). This allows power users that want to recycle envs to use them, but enforces "best practices" for non power users.

Agreed, this is a very good option! Besides, we should show a QLabel with a warning saying that the project is not reproducible.

@goanpeca
Copy link
Member Author

pref

@ccordoba12
Copy link
Member

Looking good, thanks! My only recommendation (for now) is to remove the QGroupBoxes called "Environment packages" and "Conda environment" because now those are unnecessary with the new tabs.

@ccordoba12 ccordoba12 modified the milestones: v4.0beta4, v4.0beta5 Jul 24, 2019
@ccordoba12 ccordoba12 modified the milestones: v4.0beta5, v4.0rc, v5.0beta1 Sep 14, 2019
@goanpeca goanpeca removed this from the v5.0beta1 milestone Feb 18, 2020
@ccordoba12 ccordoba12 changed the title Update project preferences Add project preferences Feb 28, 2020
@mrclary
Copy link
Contributor

mrclary commented May 16, 2022

@ccordoba12 @goanpeca, it seems to me that there are elements here that we can extract to the Environment Manager plugin #17654.

Also, is there any consideration for having multiple projects open at one time? But maybe this is not necessary if IPython consoles are not restarted when switching projects.

@ccordoba12
Copy link
Member

ccordoba12 commented May 21, 2022

it seems to me that there are elements here that we can extract to the Environment Manager

Agreed. We need to discuss further about it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants