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

Update only base conda env #495

Merged

Conversation

marcelotrevisani
Copy link
Contributor

@marcelotrevisani marcelotrevisani commented Jul 12, 2023

Please update just the base env, it is common to have others environment activated and I don't want to update them. The important bit that should be updated is the base env, I modified the code to update just the base environment in conda and also in mamba.

Standards checklist:

  • The PR title is descriptive.
  • I have read CONTRIBUTING.md
  • The code compiles (cargo build)
  • The code passes rustfmt (cargo fmt)
  • The code passes clippy (cargo clippy)
  • The code passes tests (cargo test)
  • Optional: I have tested the code myself
    • I also tested that Topgrade skips the step where needed

If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.

@SteveLauC
Copy link
Member

SteveLauC commented Jul 12, 2023

I am not familiar with these 2 tools, and since you are a member of conda, in your opinion, do you think updating only the base environment is suitable for most users?

If yes, do you think it is necessary to add a configuration entry to updating all environments, like this:

# Updating all the environments instead of just the base one
[conda]
update_all = true

[mamba]
update_all = true

@marcelotrevisani
Copy link
Contributor Author

marcelotrevisani commented Jul 13, 2023

I am not familiar with these 2 tools, and since you are a member of conda, in your opinion, do you think updating only the base environment is suitable for most users?

If yes, do you think it is necessary to add a configuration entry to updating all environments, like this:

# Updating all the environments instead of just the base one
[conda]
update_all = true

[mamba]
update_all = true

hey, sorry for my delay.

Usually people want to update conda/mamba and not all the environments, the current behaviour will update the environment that is activated. I don't think to update all environments should be a default behaviour or even if it should be a feature, it might be optional, but I doubt that much people will enable it.

Just to be clear, conda and also mamba are installed just in the base environment, that is the environment where resides just conda/mamba dependencies and tools responsible to manage all the environments, that is the reason I am proposing to change it to be just the base env.

@SteveLauC
Copy link
Member

In r-darwish/topgrade#829, the op said:

Which exact commands should Topgrade run?

I'd say conda update --all -y, but I'm not sure it upgrades all the environments and not only the currently selected one.

Considering that, this PR LGTM:)

@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #495 (2448c67) into master (9cd155f) will decrease coverage by 0.15%.
The diff coverage is 2.12%.

@@            Coverage Diff            @@
##           master    #495      +/-   ##
=========================================
- Coverage    3.50%   3.36%   -0.15%     
=========================================
  Files          27      31       +4     
  Lines        3141    4194    +1053     
=========================================
+ Hits          110     141      +31     
- Misses       3031    4053    +1022     
Impacted Files Coverage Δ
src/command.rs 0.00% <0.00%> (ø)
src/ctrlc/interrupted.rs 0.00% <ø> (ø)
src/error.rs 0.00% <0.00%> (ø)
src/execution_context.rs 0.00% <0.00%> (ø)
src/executor.rs 0.00% <0.00%> (ø)
src/main.rs 0.36% <0.00%> (-0.06%) ⬇️
src/report.rs 0.00% <0.00%> (ø)
src/runner.rs 0.00% <0.00%> (ø)
src/steps/containers.rs 0.00% <0.00%> (ø)
src/steps/emacs.rs 0.00% <0.00%> (ø)
... and 20 more

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

Successfully merging this pull request may close these issues.

3 participants