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 "GMT Dev Tests" workflow to test macOS-11.0 and pre-release Python packages #1105

Merged
merged 7 commits into from
Mar 23, 2021

Conversation

seisman
Copy link
Member

@seisman seisman commented Mar 23, 2021

Description of proposed changes

  • Install pre-release Python packages using pip install --pre, so that the workflow also tests dev Python packages
  • Change "macOS-10.15" to "macOS-11.0"
  • Change "ubuntu-20.04" to "ubuntu-latest" (ubuntu-latest is just an alias of ubuntu-20.04)
  • Add "activate-environment: pygmt" to the setup-miniconda step
  • Add more paths to paths-ignore

Fixes #

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 adding new functionality, add an example to docstrings or tutorials.

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

- Add more paths to `paths-ignore`
- Change "ubuntu-20.04" to "ubuntu-latest", "macOs-10.15" to "macOS-latest"
- Add "activate-environment: pygmt" to the setup-miniconda step
- Install PyGMT dependencies from conda-forge, not pip
@seisman seisman marked this pull request as ready for review March 23, 2021 00:57
@seisman seisman added the maintenance Boring but important stuff for the core devs label Mar 23, 2021
@seisman seisman added this to the 0.4.0 milestone Mar 23, 2021
@seisman seisman added the skip-changelog Skip adding Pull Request to changelog label Mar 23, 2021
@seisman
Copy link
Member Author

seisman commented Mar 23, 2021

NOTE: after merging this PR, we also need to specify the numpy version in the "GMT Dev Tests" workflow in #1074.

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

NOTE: after merging this PR, we also need to specify the numpy version in the "GMT Dev Tests" workflow in #1074.

Do we actually need to specify the NumPy version? I think it's fine to just grab the latest as is being done currently.

On a related note, maybe it's a good idea to check pre-release versions of NumPy in this dev workflow (i.e. use pip install --pre numpy) so that we can test NumPy release candidates (when they are available every 6 months or so, see https://pypi.org/project/numpy/#history).

.github/workflows/ci_tests_dev.yaml Outdated Show resolved Hide resolved
@seisman seisman marked this pull request as draft March 23, 2021 02:34
@seisman seisman marked this pull request as ready for review March 23, 2021 02:34
Co-authored-by: Wei Ji <[email protected]>
@seisman
Copy link
Member Author

seisman commented Mar 23, 2021

/test-gmt-dev

https://github.com/GenericMappingTools/pygmt/actions/runs/678197698

Edit: If I understand it correctly, slash command /test-gmt-dev always uses the workflows in the master branch, for security reasons. So the above runs still use macOS 10.15.

@seisman seisman marked this pull request as draft March 23, 2021 02:45
@seisman seisman marked this pull request as ready for review March 23, 2021 02:50
@seisman
Copy link
Member Author

seisman commented Mar 23, 2021

macOS-11.0 works well: https://github.com/GenericMappingTools/pygmt/pull/1105/checks?check_run_id=2171816161

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

macOS-11.0 works well: https://github.com/GenericMappingTools/pygmt/pull/1105/checks?check_run_id=2171816161

Excellent! Not that I use macOS, but I'm sure it'll be good news for many people.

I think we can remove the skip-changelog tag and change the title of this PR to "Update ci_tests_dev.yaml to test macOS-11.0 and pre-release Python packages", or something along those lines.

.github/workflows/ci_tests_dev.yaml Outdated Show resolved Hide resolved
Co-authored-by: Wei Ji <[email protected]>
@seisman seisman removed the skip-changelog Skip adding Pull Request to changelog label Mar 23, 2021
@seisman seisman changed the title Synchronize recent changes in ci_tests.yaml to ci_tests_dev.yaml Update "GMT Dev Tests" workflow to test macOS-11.0 and pre-release Python packages Mar 23, 2021
@seisman seisman marked this pull request as draft March 23, 2021 04:01
@seisman seisman marked this pull request as ready for review March 23, 2021 04:01
Copy link
Member

@weiji14 weiji14 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 to me, but someone can have another look too.

@weiji14 weiji14 added the final review call This PR requires final review and approval from a second reviewer label Mar 23, 2021
@seisman seisman marked this pull request as draft March 23, 2021 05:05
@seisman seisman marked this pull request as ready for review March 23, 2021 05:05
@seisman
Copy link
Member Author

seisman commented Mar 23, 2021

FYI, dvc pull fails on Windows if dvc is installed using pip:

ERROR: unexpected error - DLL load failed while importing win32file: The specified module could not be found.

so we have to install dvc using conda, not pip.

@seisman
Copy link
Member Author

seisman commented Mar 23, 2021

For anyone who want to review this PR, the latest runs of the "GMT Tests workflow" are available at: https://github.com/GenericMappingTools/pygmt/actions/runs/678466597

The tests fail because the baseline images are not updated for GMT 6.2.0.

All other steps work, and all Python packages are installed using pip, as expected.

@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Mar 23, 2021
@seisman seisman merged commit 1ac4c59 into master Mar 23, 2021
@seisman seisman deleted the update-test-dev branch March 23, 2021 22:26
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…thon packages (GenericMappingTools#1105)

- Install pre-release Python packages using pip install --pre, 
  so that the workflow also tests dev Python packages
- Change "macOS-10.15" to "macOS-11.0"
- Change "ubuntu-20.04" to "ubuntu-latest" (ubuntu-latest is just an alias of ubuntu-20.04)
- Add "activate-environment: pygmt" to the setup-miniconda step
- Add more paths to paths-ignore

Co-authored-by: Wei Ji <[email protected]>
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.

2 participants