Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joa-quim committed Apr 28, 2024
2 parents 7a9b878 + 8745e7b commit 4a6508d
Show file tree
Hide file tree
Showing 23 changed files with 140 additions and 116 deletions.
14 changes: 11 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "weekly"
day: "tuesday"
interval: "monthly"
# Allow up to 2 open pull requests at a time
open-pull-requests-limit: 2
# Specify labels for pull requests
labels:
- "maintenance"

- package-ecosystem: "pip"
directory: "/doc/rst/"
schedule:
interval: "monthly"
# Allow up to 2 open pull requests at a time
open-pull-requests-limit: 2
# Specify labels for pull requests
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,28 @@
name: Build

on:
pull_request:
paths-ignore:
- 'doc/**'
- '!doc/**/CMakeLists.txt'
push:
branches:
- master
- 6.[0-9]+
paths-ignore:
- 'doc/**'
- '!doc/**/CMakeLists.txt'
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/build.yml'
pull_request:
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- 'CMakeLists.txt'
- '.github/workflows/build.yml'

defaults:
run:
# default to use bash shell
shell: bash
shell: bash -el {0}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -67,6 +73,10 @@ jobs:
path: C:\vcpkg\installed\
if: runner.os == 'Windows'

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
if: runner.os == 'macOS'

- name: Install GMT dependencies
run: |
# $RUNNER_OS can be Linux, macOS or Windows
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# This workflow checks the links in plaintext files in the repository
# Check links in plaintext files in the repository
#
# This workflow runs the lychee tool to check all links in plaintext files. It will
# create an issue if broken links are found.
#
# It is scheduled to run weekly at 12 noon every Sunday.
#
name: Check Links

on:
# Uncomment the 'pull_request' line below to trigger the workflow in PR
# pull_request:
workflow_dispatch:
# Schedule runs on 12 noon every Sunday
schedule:
- cron: '0 12 * * 0'
Expand All @@ -12,12 +19,14 @@ jobs:
check_links:
name: Check Links
runs-on: ubuntu-latest
if: github.repository == 'GenericMappingTools/gmt'

steps:
- name: Checkout the repository
uses: actions/[email protected]

- name: Link Checker
id: lychee
uses: lycheeverse/[email protected]
with:
# 429: Too many requests
Expand All @@ -43,15 +52,15 @@ jobs:
**/*.rst
**/*.rst_
**/*.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report on ${{ steps.date.outputs.date }}
content-filepath: ./lychee/out.md
if: env.lychee_exit_code != 0
run: |
title="Link Checker Report on ${{ steps.date.outputs.date }}"
gh issue create --title "$title" --body-file ./lychee/out.md
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
13 changes: 10 additions & 3 deletions .github/workflows/code-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ on:
branches:
- master
- '[0-9]+.[0-9]+'
paths:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '!doc/**/CMakeLists.txt'
paths:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'

name: Code Validator

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ on:
- master
- 6.[0-9]+
paths:
- 'src/**'
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/docker.yml'
pull_request:
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/docker.yml'

defaults:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ on:
- master
- 6.[0-9]+
paths:
- 'doc/**'
- '.github/workflows/**'
- 'ci/**'
- 'doc/**'
- '**/CMakeLists.txt'
- '.github/workflows/docs.yml'
release:
types:
- published

defaults:
run:
# default to use bash shell
shell: bash
shell: bash -el {0}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -66,6 +67,10 @@ jobs:
path: C:\vcpkg\installed\
if: runner.os == 'Windows'

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
if: runner.os == 'macOS'

- name: Install GMT dependencies
run: |
# $RUNNER_OS can be Linux, macOS or Windows
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dvc-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: iterative/[email protected]

- name: Setup continuous machine learning (CML)
uses: iterative/setup-cml@v2.0.1
uses: iterative/setup-cml@v3

- name: Setup Micromamba
uses: mamba-org/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
on:
# enable pull request for debugging
# pull_request:
workflow_dispatch:
# Schedule runs daily
schedule:
- cron: '0 0 * * *'
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/release-baseline-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'GenericMappingTools/gmt'

permissions:
# To write assets to GitHub release
contents: write

steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -39,7 +43,6 @@ jobs:
shasum -a 256 baseline-images.zip
- name: Upload baseline image as a release asset
uses: shogo82148/[email protected]
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: baseline-images.zip
run: gh release upload ${{ github.ref_name }} baseline-images.zip
env:
GH_TOKEN: ${{ github.token }}
23 changes: 12 additions & 11 deletions .github/workflows/remind.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#
# Create an issue to remind us some important things.
#
# It's scheduled to run every 6 months.
#
name: Reminders

on:
workflow_dispatch:
# Scheduled to run at midnight on the 1st day every 6 months
schedule:
- cron: '0 0 1 */6 *' # Runs at midnight on the 1st day every 6th month
- cron: '0 0 1 */6 *'

jobs:
review-known-failures:
Expand All @@ -14,19 +21,13 @@ jobs:

- name: Find and report known failures
run: |
# Get the list of known failures
KNOWN_FAILURES=$(grep -rl 'GMT_KNOWN_FAILURE' test/**/*.sh)
title="Review GMT's known failures"
# If there are known failures, create an issue
if [ -n "$KNOWN_FAILURES" ]; then
title="Review GMT's known failures"
echo "The following tests are marked as GMT_KNOWN_FAILURE and need review:" > report.md
echo "" >> report.md
while IFS= read -r line ; do echo "1. $line"; done <<< $KNOWN_FAILURES >> report.md
bash admin/list_known_failures.sh > report.md
if [ -s "report.md" ]; then
gh issue create --title "$title" --body-file report.md
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1 change: 1 addition & 0 deletions .github/workflows/scm-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ name: SCM Check
on:
# uncomment the 'pull_request' line to test the workflow in PRs
# pull_request:
workflow_dispatch:
schedule:
# weekly cron job
- cron: '0 0 * * 0'
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@
name: Tests

on:
pull_request:
push:
branches:
- master
- 6.[0-9]+
paths:
- 'src/**'
- 'test/**'
- 'share/**'
- 'doc/examples/**'
- 'doc/scripts/**'
- '.github/workflows/**'
- 'ci/**'
- '.github/workflows/tests.yml'
pull_request:
paths:
- 'src/**'
- 'test/**'
- 'doc/examples/**'
- 'doc/scripts/**'
- '.github/workflows/tests.yml'

defaults:
run:
# default to use bash shell
shell: bash
shell: bash -el {0}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -66,6 +70,10 @@ jobs:
path: C:\vcpkg\installed\
if: runner.os == 'Windows'

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
if: runner.os == 'macOS'

- name: Install GMT dependencies
run: |
# $RUNNER_OS can be Linux, macOS or Windows
Expand Down
18 changes: 18 additions & 0 deletions admin/list_known_failures.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# Report the list of known failures.
#

if [ ! -d cmake ]; then
echo "Must be run from top-level gmt directory"
exit 1
fi

known_failures=$(grep -rl "GMT_KNOWN_FAILURE" test/**/*.sh doc/**/*.sh)
if [ -n "$known_failures" ]; then
echo "The following tests are marked as GMT_KNOWN_FAILURE and need review:"
echo ""
while IFS= read -r line; do
echo "- $line"
done <<< $known_failures
fi
2 changes: 1 addition & 1 deletion doc/rst/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip install -r doc/rst/requirements.txt
#
sphinx_rtd_theme==1.3.0
sphinx_rtd_theme==2.0.0
sphinx-copybutton==0.5.2
sphinx-design==0.5.0
sphinx-jinja==2.0.2
Expand Down
2 changes: 1 addition & 1 deletion doc/rst/source/grd2xyz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ precision of the ASCII output format by editing the
**--FORMAT_FLOAT_OUT**\ =\ *format* on the command line, or choose binary
output using single or double precision storage. As an option you may
output z-values without the (*x, y*) coordinates (see |-Z| below) or you can
save the grid in the STL format for 3-D printers. Also, by giving a CPT via
save the grid in the STL format for 3-D printers with |-T|. Also, by giving a CPT via
|-C| we will add *r*, *g*, *b*, *a* columns to the output based on *z* values.

Required Arguments
Expand Down
10 changes: 5 additions & 5 deletions doc/rst/source/mapproject.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,27 +251,27 @@ Optional Arguments
**-W**\ [**b**\|\ **B**\|\ **e**\|\ **E**\|\ **g**\|\ **h**\|\ **j**\|\ **m**\|\ **M**\|\ **n**\|\ **o**\|\ **O**\|\ **r**\|\ **R**\|\ **w**\|\ **x**][**+n**\ [*nx*\ [/*ny*]]]
Report a variety of plot dimensions or map regions in projected or geographic units.
No input files are read. With no argument we report the map width and height.
The chosen unit of reported plot dimensions may be changed via |-D|. For
The chosen unit of reported plot dimensions may be changed via |-D|. For
other results, select from these directives:

- **b** - Get the bounding box in longitude and latitude.
- **B** - Same, but get the result in -Rw/e/s/n string format returned as trailing text.
- **e** - Return the coordinates of the rectangular area encompassing the non-rectangular
area defined by your |-R| |-J|
area defined by your |-R| |-J|.
- **E** - Same, but in -Rw/e/s/n string format returned as trailing text.
- **g** - Output the plot coordinates of the appended map point *lon*/*lat*.
- **h** - Only output the height of the map.
- **j** - Output the map coordinates of a reference point by appending its *code* (with
standard two-character justification codes).
- **n** - Same, but appended reference point *rx*/*ry* is given as normalized positions
in the 0-1 range,.
in the 0-1 range.
- **o** - If an oblique domain is set via |-R|\ *xmin/xmax/ymin/ymax*\ **+u**\ *unit* then
return the diagonal corner coordinates in degrees (in the order *llx urx lly ury*)
return the diagonal corner coordinates in degrees (in the order *llx urx lly ury*).
- **O** - Same, but get the equivalent |-R| string format returned as trailing text.
- **m** - Get the rectangular region in projected plot coordinates instead.
- **M** - Same, but returned in |-R| string format returned as trailing text.
- **r** - Output the rectangular domain that covers an oblique area as defined by |-R| |-J|.
- **R** - Same, but get the result in -R| string format returned as trailing text.
- **R** - Same, but get the result in |-R| string format returned as trailing text.
- **w** - Only output the width of the map in current plot units.
- **x** - Output the map coordinates of the specific plot reference point *px*/*py*.

Expand Down
Loading

0 comments on commit 4a6508d

Please sign in to comment.