From 5102c4e57f9c89827b4ea4658741d9290dd696e1 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 30 Apr 2024 10:01:56 +0800 Subject: [PATCH 1/7] CI: Update the SCM-check workflow (#8466) --- .github/workflows/remind.yml | 2 +- .github/workflows/scm-check.yml | 88 ++++++++++++++++++--------------- 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index 66895a1e4d3..1050fbe2068 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -29,5 +29,5 @@ jobs: gh issue create --title "$title" --body-file report.md fi env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/scm-check.yml b/.github/workflows/scm-check.yml index 347e5fb4779..6dcea9e8c8d 100644 --- a/.github/workflows/scm-check.yml +++ b/.github/workflows/scm-check.yml @@ -17,53 +17,59 @@ jobs: scm-check: name: SCM Check runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - name: Check the latest release + id: scm + run: | + scm_version_in_gmt=8.0.0 - - name: Check the latest release - id: scm - run: | - scm_version_in_gmt=8.0.0 + # Get version string and date from Zenodo API + # https://doi.org/10.5281/zenodo.1243862 + scm_version=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.version' | sed 's/"//g') + scm_version_date=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.publication_date' | sed 's/"//g') + echo "SCM version ${scm_version} (${scm_version_date})" - # Get version string and date from Zenodo API - # https://doi.org/10.5281/zenodo.1243862 - scm_version=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.version' | sed 's/"//g') - scm_version_date=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.publication_date' | sed 's/"//g') - echo "SCM version ${scm_version} (${scm_version_date})" + # Set output of the current step + echo "scm_version=${scm_version}" >> $GITHUB_OUTPUT + echo "scm_version_date=${scm_version_date}" >> $GITHUB_OUTPUT + if [ "${scm_version}" != ${scm_version_in_gmt} ]; then + echo "The latest SCM version (${scm_version}) is different from the one in GMT (${scm_version_in_gmt})!" + echo "error_code=2" >> $GITHUB_OUTPUT + fi - # Set output of the current step - echo "scm_version=${scm_version}" >> $GITHUB_OUTPUT - echo "scm_version_date=${scm_version_date}" >> $GITHUB_OUTPUT - if [ "${scm_version}" != ${scm_version_in_gmt} ]; then - echo "The latest SCM version (${scm_version}) is different from the one in GMT (${scm_version_in_gmt})!" - echo "error_code=2" >> $GITHUB_OUTPUT - fi + - name: Create an update request + if: ${{ steps.scm.outputs.error_code == 2 }} + run: | + title="New ScientificColourMaps version ${{ steps.scm.outputs.scm_version }} found" + cat > report.md << 'EOF' + A new Scientific Colour Maps release was found. - - name: Create an update request - if: ${{ steps.scm.outputs.error_code == 2 }} - uses: nashmaniac/create-issue-action@v1.2 - with: - title: New ScientificColourMaps version ${{ steps.scm.outputs.scm_version }} found - token: ${{secrets.GITHUB_TOKEN}} - body: | - A new Scientific Colour Maps release was found. + - website: https://www.fabiocrameri.ch/colourmaps.php + - version: ${{ steps.scm.outputs.scm_version }} + - date: ${{ steps.scm.outputs.scm_version_date }} - - website: https://www.fabiocrameri.ch/colourmaps.php - - version: ${{ steps.scm.outputs.scm_version }} - - date: ${{ steps.scm.outputs.scm_version_date }} + Todo list: - Todo list: + - [ ] Download latest ScientificColourMapsV.zip file from https://doi.org/10.5281/zenodo.1243862 + to a folder, e.g. ~/Downloads/ScientificColourMapsV, where V is the version number (e.g. 7). + - [ ] Run `./admin/build-scientific-colors-cpt.sh ~/Downloads/ScientificColourMapsV/` to update CPTs. + - [ ] Move newly generated CPTs to `share/cpt` using `mv ~/Downloads/ScientificColourMapsV/gmt_cpts/* share/cpt/` + - [ ] Make sure to update the following files: + - [ ] Version number in `admin/build-scientific-colors-cpt.sh` and `.github/workflows/scm-check.yml` + - [ ] List of colour maps in `src/gmt_cpt_masters.h` using lines in `/tmp/cpt_strings.txt` (only if new colour maps were added) + - [ ] Counts of colour maps in `doc/rst/source/reference/cpts.rst` (only if new colour maps were added) + - [ ] List of colour maps and counts in `doc/scripts/GMT_App_M_1*.sh` (only if new colour maps were added) + - [ ] Update the associated `doc/scripts/GMT_App_M_1*.ps` file(s) + - [ ] Commit all changes and open a PR - - [ ] Download latest ScientificColourMapsV.zip file from https://doi.org/10.5281/zenodo.1243862 - to a folder, e.g. ~/Downloads/ScientificColourMapsV, where V is the version number (e.g. 7). - - [ ] Run `./admin/build-scientific-colors-cpt.sh ~/Downloads/ScientificColourMapsV/` to update CPTs. - - [ ] Move newly generated CPTs to `share/cpt` using `mv ~/Downloads/ScientificColourMapsV/gmt_cpts/* share/cpt/` - - [ ] Make sure to update the following files: - - [ ] Version number in `admin/build-scientific-colors-cpt.sh` and `.github/workflows/scm-check.yml` - - [ ] List of colour maps in `src/gmt_cpt_masters.h` using lines in `/tmp/cpt_strings.txt` (only if new colour maps were added) - - [ ] Counts of colour maps in `doc/rst/source/reference/cpts.rst` (only if new colour maps were added) - - [ ] List of colour maps and counts in `doc/scripts/GMT_App_M_1*.sh` (only if new colour maps were added) - - [ ] Update the associated `doc/scripts/GMT_App_M_1*.ps` file(s) - - [ ] Commit all changes and open a PR + **Note**: If new CPTs were added (check using `ls ~/Downloads/ScientificColourMaps`), update the + `admin/build-scientific-colors-cpt.sh` script first to include the new CPTs, and then rerun it again. + EOF - **Note**: If new CPTs were added (check using `ls ~/Downloads/ScientificColourMaps`), update the - `admin/build-scientific-colors-cpt.sh` script first to include the new CPTs, and then rerun it again. + gh issue create --title "${title}" --body-file report.md + env: + GH_TOKEN: ${{ github.token }} From e2592e1e58a115a34c7a30a0bad0d83a90a42cd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:03:52 +0800 Subject: [PATCH 2/7] Bump actions/checkout from 4.1.1 to 4.1.4 (#8468) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.1...v4.1.4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/check-links.yml | 2 +- .github/workflows/ci-caches.yml | 2 +- .github/workflows/code-validator.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/docs.yml | 4 ++-- .github/workflows/dvc-diff.yml | 2 +- .github/workflows/lint-checker.yml | 2 +- .github/workflows/release-baseline-images.yml | 2 +- .github/workflows/remind.yml | 2 +- .github/workflows/scm-check.yml | 2 +- .github/workflows/tests.yml | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e46e5ce18df..9fe8e7897a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 851d749b3ee..eea4430079d 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout the repository - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Link Checker id: lychee diff --git a/.github/workflows/ci-caches.yml b/.github/workflows/ci-caches.yml index b0965d61468..a11765d917c 100644 --- a/.github/workflows/ci-caches.yml +++ b/.github/workflows/ci-caches.yml @@ -114,7 +114,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Install vcpkg libraries run: bash ci/install-dependencies-windows.sh diff --git a/.github/workflows/code-validator.yml b/.github/workflows/code-validator.yml index 7b80ae764bc..7dccdd49ae6 100644 --- a/.github/workflows/code-validator.yml +++ b/.github/workflows/code-validator.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Check PSL_strings.h run: | diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d9934d61536..2568a89e6df 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -68,7 +68,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Install GMT dependencies run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d97aa6078bd..23ee97c9493 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -57,7 +57,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 @@ -157,7 +157,7 @@ jobs: echo "${INSTALLDIR}/bin" >> $GITHUB_PATH - name: Checkout the gh-pages branch in a separate folder - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 with: ref: gh-pages # Checkout to this folder instead of the current one diff --git a/.github/workflows/dvc-diff.yml b/.github/workflows/dvc-diff.yml index b0a0cd511a9..908c88eab91 100644 --- a/.github/workflows/dvc-diff.yml +++ b/.github/workflows/dvc-diff.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup data version control (DVC) uses: iterative/setup-dvc@v1.1.2 diff --git a/.github/workflows/lint-checker.yml b/.github/workflows/lint-checker.yml index fc4af3de3e6..a3de420b374 100644 --- a/.github/workflows/lint-checker.yml +++ b/.github/workflows/lint-checker.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Install cppcheck run: | diff --git a/.github/workflows/release-baseline-images.yml b/.github/workflows/release-baseline-images.yml index 2f0c0011a07..2c515fbd3d3 100644 --- a/.github/workflows/release-baseline-images.yml +++ b/.github/workflows/release-baseline-images.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup data version control (DVC) uses: iterative/setup-dvc@v1.1.2 diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index 1050fbe2068..a2b62723d6a 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Find and report known failures run: | diff --git a/.github/workflows/scm-check.yml b/.github/workflows/scm-check.yml index 6dcea9e8c8d..c129f5765cd 100644 --- a/.github/workflows/scm-check.yml +++ b/.github/workflows/scm-check.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Check the latest release id: scm diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 63b27edb038..30d3028915a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 From a82b5b9756cb014321b05c4491f159815440f8bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 15:51:47 +0800 Subject: [PATCH 3/7] Bump lycheeverse/lychee-action from 1.9.3 to 1.10.0 (#8472) Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.9.3 to 1.10.0. - [Release notes](https://github.com/lycheeverse/lychee-action/releases) - [Commits](https://github.com/lycheeverse/lychee-action/compare/v1.9.3...v1.10.0) --- updated-dependencies: - dependency-name: lycheeverse/lychee-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/check-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index eea4430079d..47bc140376b 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -27,7 +27,7 @@ jobs: - name: Link Checker id: lychee - uses: lycheeverse/lychee-action@v1.9.3 + uses: lycheeverse/lychee-action@v1.10.0 with: # 429: Too many requests args: > From 65a209999f498a29cc4fd376b41140a07cc10b7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 15:52:03 +0800 Subject: [PATCH 4/7] Bump codecov/codecov-action from 4.2.0 to 4.3.1 (#8471) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.2.0 to 4.3.1. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.2.0...v4.3.1) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30d3028915a..4ded228160d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -192,7 +192,7 @@ jobs: if: failure() - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.2.0 + uses: codecov/codecov-action@v4.3.1 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: From 4ef118ac9b9756fa9d2566d03cdfa32cf31d3b1f Mon Sep 17 00:00:00 2001 From: Federico Esteban Date: Wed, 1 May 2024 13:36:38 -0300 Subject: [PATCH 5/7] Upgrade anim01 (#8470) * Upgrade anim01 * update youtube link * Update description and link of the rst file * remove 'cat' from Unix progs --- doc/examples/anim01/anim01.sh | 22 +++++++++++----------- doc/rst/source/animations/anim01.rst | 12 +++++------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/doc/examples/anim01/anim01.sh b/doc/examples/anim01/anim01.sh index ae4a65e7e27..857161d5f6b 100755 --- a/doc/examples/anim01/anim01.sh +++ b/doc/examples/anim01/anim01.sh @@ -2,15 +2,14 @@ # GMT ANIMATION 01 # # Purpose: Make simple MP4 of sine function -# GMT modules: math, basemap, text, plot, movie -# Unix progs: echo, convert, cat +# GMT modules: math, basemap, text, plot, movie, event +# Unix progs: cat # # The finished movie is available in our YouTube channel as well: -# https://youtu.be/5m3gRhFFFLA +# https://youtu.be/NjSDpQ5S3FM # 1. Create files needed in the loop cat << 'EOF' > pre.sh -gmt math -T0/360/10 T SIND = sin_point.txt gmt math -T0/360/1 T SIND = sin_curve.txt gmt begin gmt basemap -R0/360/-1.2/1.6 -JX22c/11.5c -X1c -Y1c \ @@ -20,14 +19,15 @@ EOF # 2. Set up the main frame script cat << 'EOF' > main.sh gmt begin + gmt basemap -R0/360/-1.2/1.6 -JX22c/11.5c -X1c -Y1c -B+n # Plot smooth blue curve and dark red dots at all angle steps so far - last=$(gmt math -Q ${MOVIE_FRAME} 10 MUL =) - gmt convert sin_curve.txt -qi0:${last} | gmt plot -W1p,blue -R0/360/-1.2/1.6 -JX22c/11.5c -X1c -Y1c - gmt convert sin_point.txt -qi0:${MOVIE_FRAME} | gmt plot -Sc0.1i -Gdarkred -# Plot bright red dot at current angle and annotate - gmt plot -Sc0.1i -Gred <<< "${MOVIE_COL0} ${MOVIE_COL1}" - printf "0 1.6 a = %3.3d" ${MOVIE_COL0} | gmt text -F+f14p,Helvetica-Bold+jTL -N -Dj0.1i/0.05i + gmt events sin_curve.txt -i0,1,0 -T${MOVIE_FRAME} -Ar -Es -W1p,blue + gmt plot sin_curve.txt -Sc0.25c -Gdarkred -qi0:10:${MOVIE_FRAME} + +# Plot bright red dot at current angle + gmt events sin_curve.txt -T${MOVIE_FRAME} -Sc0.1i -Gred -i0,1,0 -L0 gmt end EOF # 3. Run the movie -gmt movie main.sh -Sbpre.sh -Chd -Tsin_point.txt -Vi -D5 -Zs -Nanim01 -Fmp4 +gmt movie main.sh -Sbpre.sh -Chd -Tsin_curve.txt -Vi -D50 -Zs -Nanim01 -Fmp4 \ + -Lf+t"a = %3.3d"+f14p,Helvetica-Bold+jTL+o1.25/1.15 \ No newline at end of file diff --git a/doc/rst/source/animations/anim01.rst b/doc/rst/source/animations/anim01.rst index 4c0d7c555a7..2eb6b5b57d1 100644 --- a/doc/rst/source/animations/anim01.rst +++ b/doc/rst/source/animations/anim01.rst @@ -4,12 +4,10 @@ ---------------------------------- Our first animation is not very ambitious: We wish to plot the sine -function from 0-360 and take snap shots every 10. To get a smooth curve -we must sample the function much more frequently; we settle on 10 times -more frequently than the frame spacing. We place a bright red circle at -the leading edge of the curve, and as we move forward in time (here, -angles) we dim the older circles to a dark red color. We add a label -that indicates the current angle value. Once the 36 frames are completed +function from 0-360 and take snap shots every 1.We place a bright red +circle at the leading edge of the curve, and as we move forward in time +(here, angles) we dim the older circles to a dark red color. We add a label +that indicates the current angle value. Once the 361 frames are completed we convert them to a single mp4 file. .. literalinclude:: /_verbatim/anim01.txt @@ -21,5 +19,5 @@ use for the map projection, the region, the spacing around the frame, etc. so that the final result gave a reasonable layout. Do this planning on a single PostScript plot before running a lengthy animation script. -.. youtube:: 5m3gRhFFFLA +.. youtube:: NjSDpQ5S3FM :width: 100% From 0655aae2697b1bdbf70f32eff02e0f3782c0009f Mon Sep 17 00:00:00 2001 From: andreas Date: Sun, 5 May 2024 00:00:42 +0200 Subject: [PATCH 6/7] gmt.conf.rst: link directly to data server mirrors list --- doc/rst/source/gmt.conf.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/source/gmt.conf.rst b/doc/rst/source/gmt.conf.rst index 0972dc26f24..83f40625857 100644 --- a/doc/rst/source/gmt.conf.rst +++ b/doc/rst/source/gmt.conf.rst @@ -367,7 +367,7 @@ GMT Miscellaneous Parameters **GMT_DATA_SERVER** Name (or URL) of a GMT data server [default is **oceania**]. Please set to the data server closest to your location for faster data download. See - `Data Server Mirrors `_ + `Data Server Mirrors `_ for a list of the currently available mirrors. **GMT_DATA_SERVER_LIMIT** From 8e3cd98c0ccca538611b67b09cdc32f66833c85e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 5 May 2024 21:04:56 +0800 Subject: [PATCH 7/7] CI: Pin to macOS 13 (#8469) --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4ded228160d..aaec9104eb0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,7 @@ jobs: - name: Linux os: ubuntu-latest - name: macOS - os: macos-latest + os: macos-13 # macos-14 use M1 chips, which causes many failures - name: Windows os: windows-latest