Skip to content

Update CI - Micromamba #1493

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

Merged
merged 2 commits into from
Jul 19, 2022
Merged

Update CI - Micromamba #1493

merged 2 commits into from
Jul 19, 2022

Conversation

jules-ch
Copy link
Contributor

@jules-ch jules-ch commented Jul 13, 2022

  • Closes Look into using mamba instead of conda for CI jobs #1472
  • I am familiar with the contributing guidelines
  • Tests added
    - [ ] Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
    - [ ] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

Update workflow to replace conda with micromamba.

  • Add step to install pvlib without installing deps
    • It is required to test the proper version of pvlib (pvlib is a dependency of pvfactors which install last version of pvlib)
  • Update Checkout step to limit depth
  • Add step to get tags to have version inference when installing pvlib

@kanderso-nrel I only added cache-downloads which is purged everyday. It does not cache the whole environment.
We could do that to speed things up even more, cached environment is cached for one day also.

See https://github.com/mamba-org/provision-with-micromamba

- Replace conda setup with micromamba
- Reduce fetch depth for checkout
- Fetch tags for version inference
- Install pvlib from source before testing

Closes pvlib#1472
Copy link
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

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

Thanks @jules-ch! One comment below, otherwise I think this LGTM. Time taken to set up the Windows 3.6 environment dropped from ~8 minutes in #1490 to ~2 minutes here, which is a very nice improvement. Here's a less precise comparison of total job runtimes between this PR and #1490, just using the "Successful in 1m" text in the checks summary:

#1490 #1493
macos-10.15, 3.6, bare 1m 1m
macos-10.15, 3.7, bare 2m 1m
macos-10.15, 3.8, bare 2m 1m
macos-10.15, 3.9, bare 2m 2m
ubuntu-latest, 3.6, bare 1m 1m
ubuntu-latest, 3.6, conda 4m 2m
ubuntu-latest, 3.6, conda, -min 1m 1m
ubuntu-latest, 3.7, bare 1m 1m
ubuntu-latest, 3.7, conda 3m 4m
ubuntu-latest, 3.8, bare 54s 54s
ubuntu-latest, 3.8, conda 3m 2m
ubuntu-latest, 3.9, bare 50s 1m
ubuntu-latest, 3.9, conda 4m 2m
windows-latest, 3.6, conda 10m 5m
windows-latest, 3.7, conda 9m 5m
windows-latest, 3.8, conda 8m 5m
windows-latest, 3.9, conda 6m 6m

@kandersolar kandersolar added this to the 0.9.2 milestone Jul 13, 2022
Copy link
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

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

I think I'm okay with this. Faster, plus it fixes at least one issue with versioning that probably would have popped up eventually. Anyone else want to take a look?

Copy link
Member

@wholmgren wholmgren left a comment

Choose a reason for hiding this comment

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

Thanks @jules-ch! I suggest we go ahead and merge

@kandersolar kandersolar merged commit 59cbae7 into pvlib:master Jul 19, 2022
@kandersolar
Copy link
Member

Thanks @jules-ch!

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

Successfully merging this pull request may close these issues.

Look into using mamba instead of conda for CI jobs
3 participants