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

Use pip instead of conda to speed up Actions #216

Merged
merged 6 commits into from
Nov 13, 2020
Merged

Use pip instead of conda to speed up Actions #216

merged 6 commits into from
Nov 13, 2020

Conversation

leouieda
Copy link
Member

Switch to using the built-in Python and pip to setup Actions workflows
instead of conda/miniconda. This speeds up the workflows by a large
amount and is worth the trade-off since we don't have any dependencies
that require conda.

Reminders:

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst and the base __init__.py file for the package.
  • Write detailed docstrings for all functions/classes/methods. It often helps to design better code if you write the docstrings first.
  • If adding new functionality, add an example to the docstring, gallery, and/or tutorials.
  • Add your full name, affiliation, and ORCID (optional) to the AUTHORS.md file (if you haven't already) in case you'd like to be listed as an author on the Zenodo archive of the next release.

Switch to using the built-in Python and pip to setup Actions workflows
instead of conda/miniconda. This speeds up the workflows by a large
amount and is worth the trade-off since we don't have any dependencies
that require conda.
@leouieda
Copy link
Member Author

Tests now take around 1m to complete instead of 5-6minutes for Windows and Mac with conda.

@leouieda leouieda marked this pull request as ready for review November 13, 2020 11:37
@leouieda leouieda requested a review from hugovk November 13, 2020 11:38
@hugovk
Copy link
Member

hugovk commented Nov 13, 2020

It's possible to cache pip stuff too, something like this:

      - name: Get pip cache dir
        id: pip-cache
        run: |
          echo "::set-output name=dir::$(pip cache dir)"

      - name: Cache
        uses: actions/cache@v2
        with:
          path: ${{ steps.pip-cache.outputs.dir }}
          key:
            pip-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('requirements*.txt') }}
          restore-keys: |
            pip-${{ runner.os }}-${{ matrix.python }}-

Might make things a bit quicker too, and help ease the strain on PyPI just a little bit.

I also saw in some logs:

Using legacy 'setup.py install' for pytest-localftpserver, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pyftpdlib, since package 'wheel' is not installed.

Could also install wheel so pip'll build a wheel for those and store that in the cache for next time?

@leouieda
Copy link
Member Author

Thanks for the tip on caching pip packages!

@leouieda leouieda merged commit 62bc211 into master Nov 13, 2020
@leouieda leouieda deleted the actions-pip branch November 13, 2020 14:46
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.

2 participants