Skip to content

Commit

Permalink
Merge branch 'main' into v.ppa
Browse files Browse the repository at this point in the history
  • Loading branch information
cwhite911 authored Feb 19, 2025
2 parents a1ddb26 + 688e625 commit 7b58b82
Show file tree
Hide file tree
Showing 1,177 changed files with 86,349 additions and 10,711 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ docker
!docker/alpine/grass_tests.sh
.gitignore
.github
.travis
.travis.yml
# Do not copy files from previous compilations
dist.*

Expand Down
19 changes: 4 additions & 15 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
ignore =
# whitespace before ':' (Black)
E203,
# E501 line too long
E501,
# line break before binary operator (Black)
W503,

Expand All @@ -20,35 +22,22 @@ per-file-ignores =
# E741 ambiguous variable name 'l'
man/build_html.py: E501
man/build_md.py: E501
doc/python/m.distance.py: E501
doc/examples/python/m.distance.py: E501
gui/scripts/d.wms.py: E501
gui/wxpython/image2target/g.gui.image2target.py: E501
gui/wxpython/photo2image/g.gui.photo2image.py: E501
gui/wxpython/psmap/*: E501
gui/wxpython/vdigit/*: E722, F405, F403
gui/wxpython/animation/g.gui.animation.py: E501
gui/wxpython/tplot/g.gui.tplot.py: E501
gui/wxpython/iclass/g.gui.iclass.py: E501
gui/wxpython/iclass/statistics.py: F841, F405, F403
gui/wxpython/location_wizard/wizard.py: E722
gui/wxpython/mapdisp/main.py: E722
gui/wxpython/mapdisp/test_mapdisp.py: E501
gui/wxpython/mapswipe/g.gui.mapswipe.py: E501
gui/wxpython/mapwin/base.py: E722
gui/wxpython/mapwin/buffered.py: E722
gui/wxpython/timeline/g.gui.timeline.py: E501
# Generated file
gui/wxpython/menustrings.py: E501
# C wrappers call libgis.G_gisinit before importing other modules.
# TODO: Is this really needed?
python/grass/pygrass/vector/__init__.py: E402
python/grass/temporal/datetime_math.py: E722
python/grass/temporal/spatial_topology_dataset_connector.py: E722
python/grass/temporal/temporal_algebra.py: E722
python/grass/temporal/temporal_granularity.py: E722
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
python/grass/pygrass/tests/benchmark.py: F821
python/grass/jupyter/__init__.py: E501
# Configuration file for Sphinx:
# Ignoring import/code mix and line length.
# Files not managed by Black
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/create-upload-suggestions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ runs:
echo "diff-file-name=${INPUT_DIFF_FILE_NAME}" >> "${GITHUB_OUTPUT}"
env:
INPUT_DIFF_FILE_NAME: ${{ steps.tool-name-safe.outputs.diff-file-name }}
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
id: upload-diff
if: >-
${{ (steps.files_changed.outputs.files_changed == 'true') &&
Expand All @@ -200,7 +200,7 @@ runs:
echo 'Suggestions can only be added near to lines changed in this PR.'
echo 'If any fixes can be added as code suggestions, they will be added shortly from another workflow.'
} >> "${GITHUB_STEP_SUMMARY}"
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
id: upload-changes
if: >-
${{ always() &&
Expand Down
6 changes: 2 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ CI:
- changed-files:
- any-glob-to-any-file:
- .github/**
- .travis/**
- binder/**
- .travis.yml
- renovate.json
- .pre-commit-config.yaml
Windows:
Expand All @@ -96,7 +94,7 @@ Windows:
macOS:
- changed-files:
- any-glob-to-any-file:
- macosx/**
- macos/**
Linux:
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -145,7 +143,7 @@ notebook:
- changed-files:
- any-glob-to-any-file:
- '**/*.ipynb'
- doc/notebooks/**
- doc/examples/notebooks/**
- python/grass/jupyter/**
C:
- changed-files:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

permissions: {}

jobs:
additional-checks:
name: Additional checks
Expand All @@ -43,7 +45,7 @@ jobs:
exclude: mswindows .*\.bat .*/testsuite/data/.*

- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: '3.10'

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
language:
- c-cpp
- python
- actions

concurrency:
group: ${{ github.workflow }}-${{
Expand All @@ -42,7 +43,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: '3.x'
- name: Install non-Python dependencies
Expand All @@ -52,11 +53,11 @@ jobs:
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- uses: rui314/setup-mold@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1
- uses: rui314/setup-mold@f80524ca6eeaa76759b57fb78ddce5d87a20c720 # v1
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -81,6 +82,6 @@ jobs:
run: .github/workflows/build_ubuntu-22.04.sh "${HOME}/install"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: '3.11'
- name: Create output directory
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
sha256sum ${{ env.GRASS }}.tar.xz > ${{ env.GRASS }}.tar.xz.sha256
- name: Publish draft distribution to GitHub (for tags only)
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
with:
name: GRASS GIS ${{ github.ref_name }}
body: |
Expand Down
122 changes: 108 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,22 @@ on:
branches:
- main
- releasebranch_*
- '!releasebranch_7_*'
- "!releasebranch_7_*"
# tags: ['*.*.*']
paths-ignore: [doc/**]
pull_request:
paths:
- .github/workflows/docker.yml
- Dockerfile
- docker/**
- "!docker/**.md"
workflow_dispatch:
release:
types: [published]

jobs:
permissions: {}

jobs:
# Run for push to configured branches and all published releases.
# Take care of different os.
# For main branch, created tags are:
Expand All @@ -34,10 +42,17 @@ jobs:
# For a release, e.g. 8.3.0, created tags are:
# 8.3.0-alpine, 8.3.0-debian, 8.3.0-ubuntu and latest (with ubuntu)
docker-os-matrix:
name: build and push ${{ matrix.os }} for ${{ github.ref }}
if: github.repository_owner == 'OSGeo'
name: ${{ matrix.os }} for ${{ github.ref }}
runs-on: ubuntu-latest

concurrency:
group: >-
${{ github.workflow }}-${{ matrix.os }}-${{ github.event_name }}-
${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
# Cancel in progress in pull requests.
# Otherwise, limit to one in progress and one queued for each type.
# Only the latest queued job per event type will be kept, older will be cancelled.
# The already running job will be completed.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
strategy:
matrix:
os:
Expand All @@ -47,41 +62,120 @@ jobs:
- ubuntu_wxgui
fail-fast: false

permissions:
attestations: write
contents: read
id-token: write
packages: write

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Get the latest tag and release branches
id: tag-branch
run: |
# Make sure tags are fetched
git fetch --tags
# Get sorted list of tags, keep the first that has a semver pattern (not RCs)
latest_tag="$(git tag --sort=-v:refname \
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' \
| head -n 1)"
latest_rel_branch="$(git branch --all --list 'origin/*' \
--contains "${latest_tag}" --format "%(refname:lstrip=3)")"
echo "latest_tag=${latest_tag}" >> "${GITHUB_OUTPUT}"
echo "latest_tag is: ${latest_tag}"
echo "latest_rel_branch=${latest_rel_branch}" >> "${GITHUB_OUTPUT}"
echo "latest_rel_branch is: ${latest_rel_branch}"
- name: Get enable values for meta step
id: enable
run: |
latest="${{
(github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name))
== format('refs/tags/{0}', steps.tag-branch.outputs.latest_tag)
&& matrix.os == 'ubuntu' }}"
current="${{
( contains(fromJSON('["tag", "release"]'), github.event_name)
&& (github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name))
== format('refs/tags/{0}', steps.tag-branch.outputs.latest_tag)
)
|| github.ref == format('refs/heads/{0}', steps.tag-branch.outputs.latest_rel_branch)
}}"
echo "latest=${latest}" >> "${GITHUB_OUTPUT}"
echo "latest is $latest"
echo "current=${current}" >> "${GITHUB_OUTPUT}"
echo "current is $current"
- name: Docker meta
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
with:
images: osgeo/grass-gis
images: |
name=docker.io/osgeo/grass-gis,enable=${{ github.repository_owner == 'OSGeo'
&& github.event_name != 'pull_request' }}
name=ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=ref,event=branch
type=raw,value=current,enable=${{ github.ref == format('refs/heads/{0}', 'releasebranch_8_3') }}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/8.3') && matrix.os == 'ubuntu' }},suffix=
type=ref,event=pr
type=raw,value=current,enable=${{ steps.enable.outputs.current }}
type=raw,value=latest,enable=${{ steps.enable.outputs.latest }},suffix=
flavor: |
latest=false
suffix=-${{ matrix.os }}
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3.4.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Login to DockerHub
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: ${{ github.repository_owner == 'OSGeo' && github.event_name != 'pull_request' }}
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
with:
push: true
pull: true
push: ${{ github.event_name != 'pull_request' }}
context: .
tags: ${{ steps.meta.outputs.tags }}
file: docker/${{ matrix.os }}/Dockerfile
annotations: ${{ steps.meta.outputs.annotations }}
provenance: mode=max
sbom: true
# Don't use cache for releases.
no-cache: ${{ contains(fromJSON('["tag", "release"]'), github.event_name) && true }}
# Don't use gha cache for releases. Cache is not used if `cache-from:` is empty
cache-from: >-
${{ !contains(fromJSON('["tag", "release"]'), github.event_name)
&& format('type=gha,scope={0}', matrix.os) || '' }}
cache-to: type=gha,mode=max,scope=${{ matrix.os }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Attest docker.io image
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
# If there isn't a digest, an annotation cannot be added
if: >-
${{ github.repository_owner == 'OSGeo' && github.event_name != 'pull_request'
&& steps.docker_build.outputs.digest }}
id: attest
with:
subject-name: docker.io/osgeo/grass-gis
subject-digest: ${{ steps.docker_build.outputs.digest }}
push-to-registry: ${{ github.repository_owner == 'OSGeo' && github.event_name != 'pull_request' }}
- name: Attest ghcr.io image
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
# If there isn't a digest, an annotation cannot be added
if: ${{ steps.docker_build.outputs.digest }}
id: attest-ghcr
with:
subject-name: ghcr.io/${{ github.repository }}
subject-digest: ${{ steps.docker_build.outputs.digest }}
push-to-registry: ${{ github.event_name != 'pull_request' }}
2 changes: 2 additions & 0 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- releasebranch_*
pull_request:

permissions: {}

jobs:
build:
name: ${{ matrix.c }} & ${{ matrix.cpp }}
Expand Down
Loading

0 comments on commit 7b58b82

Please sign in to comment.