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

Adds pyenv step #724

Merged
merged 2 commits into from
Feb 27, 2024
Merged

Adds pyenv step #724

merged 2 commits into from
Feb 27, 2024

Conversation

lucaspar
Copy link
Contributor

@lucaspar lucaspar commented Feb 27, 2024

Runs pyenv update as the new pyenv step, given that all conditions are met:

  • OS is Unix (Windows not supported by Pyenv);
  • The $PYENV_ROOT env variable points to a valid location; and
  • $PYENV_ROOT points to a Git directory.
    • This last check might not be the case for other methods of installing pyenv, for which a pyenv update may not be available, or may fail.

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 ran cargo run -- --verbose --only pyenv, which works as expected for me, but I'm not sure where/how to add automated unit tests.

For new steps

  • Optional: Topgrade skips this step where needed
  • Optional: The --dry-run option works with this step
  • Optional: The --yes option works with this step if it is supported by
    the underlying command
    • underlying command does not support --yes.

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.

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes are missing coverage. Please review.

Project coverage is 5.57%. Comparing base (9b6027f) to head (ee2eeeb).

Files Patch % Lines
src/steps/os/unix.rs 0.00% 19 Missing ⚠️
src/config.rs 0.00% 1 Missing ⚠️
src/main.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #724      +/-   ##
========================================
- Coverage   5.65%   5.57%   -0.09%     
========================================
  Files         37      37              
  Lines      11503   11675     +172     
========================================
  Hits         651     651              
- Misses     10852   11024     +172     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lucaspar lucaspar marked this pull request as ready for review February 27, 2024 01:09
@SteveLauC
Copy link
Member

Don't worry about the codecov CI failures, they don't matter for now.

@SteveLauC
Copy link
Member

Even though the pyenv command does not support the --dry-run option, Topgrade will handle it for you:

$ cargo r -- --only pyenv --dry-run

Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

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

Thanks!

@SteveLauC SteveLauC merged commit 650a143 into topgrade-rs:main Feb 27, 2024
17 of 19 checks passed
@lucaspar lucaspar deleted the lp/pyenv/1 branch February 27, 2024 01:30
InnocentZero pushed a commit to InnocentZero/topgrade that referenced this pull request May 25, 2024
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.

Support for pyenv
2 participants