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

Migrate provision-with-micromamba to setup-micromamba #2536

Merged
merged 18 commits into from
May 12, 2023
Merged

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented May 11, 2023

Description of proposed changes

The mamba-org/provision-with-micromamba GitHub Action is about to be deprecated in favour of https://github.com/mamba-org/setup-micromamba, see mamba-org/provision-with-micromamba#122. Also replaced the extra-specs parameter with create-args instead.

Migration reference: mamba-org/provision-with-micromamba#114

Supersedes #2435

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.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

The mamba-org/provision-with-micromamba GitHub Action is about to be deprecated in favour of https://github.com/mamba-org/setup-micromamba, see mamba-org/provision-with-micromamba#122. Also replaced the extra-specs paramete with create-args instead.
@weiji14 weiji14 self-assigned this May 11, 2023
@weiji14 weiji14 marked this pull request as draft May 11, 2023 04:34
@pavelzw
Copy link

pavelzw commented May 11, 2023

In ci_tests.yaml, you need to switch from

        include:
          - python-version: '3.9'
            numpy-version: '1.21'
            optional-packages: ''
          - python-version: '3.11'
            numpy-version: '1.24'
            optional-packages: |
              contextily
              geopandas
              ipython
              rioxarray
              sphinx-gallery
[...]
            packaging
            ${{ matrix.optional-packages }}
            build

to

        include:
          - python-version: '3.9'
            numpy-version: '1.21'
            optional-packages: ''
          - python-version: '3.11'
            numpy-version: '1.24'
            optional-packages: >-
               contextily
              geopandas
              ipython
              rioxarray
              sphinx-gallery
[...]
            packaging${{ matrix.optional-packages }}
            build

(beware the extra space at contextily) since the new action expects all dependencies to be separated by spaces.
The | YAML block scalar doesn't convert new lines to spaces but leaves them as newlines.

@weiji14
Copy link
Member Author

weiji14 commented May 11, 2023

In ci_tests.yaml, you need to switch
to

        include:
          - python-version: '3.9'
            numpy-version: '1.21'
            optional-packages: ''
          - python-version: '3.11'
            numpy-version: '1.24'
            optional-packages: >-
               contextily
              geopandas
              ipython
              rioxarray
              sphinx-gallery
[...]
            packaging${{ matrix.optional-packages }}
            build

(beware the extra space at contextily) since the new action expects all dependencies to be separated by spaces. The | YAML block scalar doesn't convert new lines to spaces but leaves them as newlines.

Thanks for the tip @pavelzw! I was wondering why the error for the CI test with optional dependencies was different to the one without. The single space before contextily didn't work at 58c807c, something about a YAML lint error. I just changed everything to a single line instead of multi-line at b5cc1c7 and now it runs!

@weiji14 weiji14 marked this pull request as ready for review May 11, 2023 21:12
@weiji14 weiji14 added maintenance Boring but important stuff for the core devs needs review This PR has higher priority and needs review. labels May 11, 2023
@seisman seisman added this to the 0.10.0 milestone May 12, 2023
Co-Authored-By: Dongdong Tian <seisman.info@gmail.com>
@seisman
Copy link
Member

seisman commented May 12, 2023

In PR #2435, I removed the mamba list step because the old mamba-org/provision-with-micromamba action already did it (https://github.com/GenericMappingTools/pygmt/pull/2435/files#r1173833125).

I don't find the package list in the new action output. I think we should add micromamba list back.

@weiji14
Copy link
Member Author

weiji14 commented May 12, 2023

In PR #2435, I removed the mamba list step because the old mamba-org/provision-with-micromamba action already did it (https://github.com/GenericMappingTools/pygmt/pull/2435/files#r1173833125).

I don't find the package list in the new action output. I think we should add micromamba list back.

Good catch. done in 9808f18 and ea3afa9 (need to use micromamba list).

Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

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

Looks good.

@seisman seisman removed the needs review This PR has higher priority and needs review. label May 12, 2023
@weiji14
Copy link
Member Author

weiji14 commented May 12, 2023

Hmm, the readthedocs build is failing with an unrelated fiona.errors.DriverError: '/vsizip/vsicurl/ error. Might be due to changes with the geopandas 0.13.0 release (see geopandas/geopandas#2796 (comment)).

@pavelzw
Copy link

pavelzw commented May 12, 2023

I don't find the package list in the new action output. I think we should add micromamba list back.

I wanted to add this in setup-micromamba but forgot until now, thanks for reminding me :)

@pavelzw
Copy link

pavelzw commented May 12, 2023

If you update to v1.4.0 (or use @v1 to always get the most recent vx.y.z), you can remove the micromamba list again.

@weiji14 weiji14 merged commit c443374 into main May 12, 2023
@weiji14 weiji14 deleted the setup-micromamba branch May 12, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants