Skip to content

Commit

Permalink
Merge branch 'main' into cmake_build_work
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Jul 2, 2024
2 parents 7da00eb + 7f4aabf commit 45dad8f
Show file tree
Hide file tree
Showing 623 changed files with 9,715 additions and 8,435 deletions.
45 changes: 17 additions & 28 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ per-file-ignores =
# F841 local variable assigned to but never used
# E741 ambiguous variable name 'l'
__init__.py: F401, F403
lib/init/grass.py: E722, F821, F841, W605
utils/mkrest.py: W605
utils/gitlog2changelog.py: E722, E712, W605
utils/g.html2man/ggroff.py: W605
lib/init/grass.py: E722, F821, F841
utils/gitlog2changelog.py: E722, E712
man/build_check_rest.py: F403, F405
man/build_full_index_rest.py: F403, F405
man/parser_standard_options.py: F403, F405
Expand All @@ -45,10 +43,9 @@ per-file-ignores =
gui/scripts/d.wms.py: E501
gui/wxpython/core/gcmd.py: E402
gui/wxpython/core/gthread.py: F841
gui/wxpython/core/gconsole.py: E722, W605
gui/wxpython/core/globalvar.py: W605
gui/wxpython/core/gconsole.py: E722
gui/wxpython/core/toolboxes.py: E722
gui/wxpython/core/utils.py: E722, F841, W605
gui/wxpython/core/utils.py: E722, F841
gui/wxpython/core/workspace.py: E722
gui/wxpython/core/render.py: E722, F841
gui/wxpython/core/ws.py: F841
Expand All @@ -64,8 +61,8 @@ per-file-ignores =
gui/wxpython/gcp/g.gui.gcp.py: F841
gui/wxpython/gcp/manager.py: F841, E722
gui/wxpython/gcp/mapdisplay.py: F841
gui/wxpython/gui_core/*: F841, E266, E722, W605
gui/wxpython/gui_core/dialogs.py: E722, F841, W605
gui/wxpython/gui_core/*: F841, E266, E722
gui/wxpython/gui_core/dialogs.py: E722, F841
gui/wxpython/gui_core/forms.py: E722, F841
gui/wxpython/gui_core/ghelp.py: E722
gui/wxpython/gui_core/gselect.py: F841, E266, E722
Expand All @@ -74,27 +71,25 @@ per-file-ignores =
gui/wxpython/gui_core/widgets.py: F841, E722, E266
gui/wxpython/image2target/*: F841, E722, E265
gui/wxpython/image2target/g.gui.image2target.py: E501, E265, F841
gui/wxpython/iscatt/*: F841, E722, E741, F405, F403
gui/wxpython/lmgr/giface.py: E741
gui/wxpython/lmgr/frame.py: F841, E722, W605
gui/wxpython/iscatt/*: F841, E722, F405, F403
gui/wxpython/lmgr/frame.py: F841, E722
# layertree still includes some formatting issues (it is ignored by Black)
gui/wxpython/lmgr/layertree.py: E722, E266, W504, E225
gui/wxpython/lmgr/workspace.py: F841
gui/wxpython/modules/*: F841, E722, W605
gui/wxpython/nviz/*: F841, E266, E722, W605, F403, F405
gui/wxpython/modules/*: F841, E722
gui/wxpython/nviz/*: F841, E266, E722, F403, F405
gui/wxpython/photo2image/*: F841, E722, E265
gui/wxpython/photo2image/g.gui.photo2image.py: E501, F841
gui/wxpython/psmap/*: F841, E266, E722, F405, F403
gui/wxpython/vdigit/*: F841, E722, E741, F405, F403
gui/wxpython/vdigit/*: F841, E722, F405, F403
gui/wxpython/vnet/*: F841
gui/wxpython/wxgui.py: F841
gui/wxpython/animation/g.gui.animation.py: E501
gui/wxpython/animation/mapwindow.py: F841
gui/wxpython/animation/provider.py: F841
gui/wxpython/tplot/frame.py: F841, E722, E741
gui/wxpython/tplot/frame.py: F841, E722
gui/wxpython/tplot/g.gui.tplot.py: E501
gui/wxpython/rdigit/g.gui.rdigit.py: F841
gui/wxpython/iclass/dialogs.py: E741
gui/wxpython/iclass/digit.py: F405, F403
gui/wxpython/iclass/frame.py: F405, F403
gui/wxpython/iclass/g.gui.iclass.py: E501
Expand All @@ -112,14 +107,12 @@ per-file-ignores =
gui/wxpython/mapwin/buffered.py: E722
gui/wxpython/mapwin/graphics.py: E722
gui/wxpython/startup/locdownload.py: E722, E402
gui/wxpython/timeline/g.gui.timeline.py: E501, E741
gui/wxpython/timeline/frame.py: E741
gui/wxpython/timeline/g.gui.timeline.py: E501
gui/wxpython/tools/build_modules_xml.py: E722
gui/wxpython/web_services/cap_interface.py: E501
gui/wxpython/web_services/widgets.py: F841, E741, W605, E402
gui/wxpython/rlisetup/frame.py: E741
gui/wxpython/web_services/widgets.py: F841, E402
gui/wxpython/rlisetup/sampling_frame.py: F841
gui/wxpython/rlisetup/wizard.py: E722, E741
gui/wxpython/rlisetup/wizard.py: E722
# Generated file
gui/wxpython/menustrings.py: E501
# F821 undefined name 'cmp'
Expand All @@ -129,20 +122,15 @@ per-file-ignores =
# TODO: Is this really needed?
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/raster/__init__.py: E402
python/grass/gunittest/gmodules.py: W605
python/grass/gunittest/invoker.py: E721
python/grass/pygrass/vector/geometry.py: W605
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/modules/interface/*.py: F401
python/grass/pygrass/modules/interface/module.py: W605
python/grass/pygrass/modules/interface/parameter.py: W605
python/grass/pygrass/modules/grid/*.py: F401
python/grass/pygrass/raster/rowio.py: E741
python/grass/pygrass/raster/category.py: E721
python/grass/pygrass/rpc/__init__.py: F401, F403
python/grass/pygrass/utils.py: E402
python/grass/script/task.py: W605
python/grass/temporal/abstract_space_time_dataset.py: W605, F841, E722
python/grass/temporal/abstract_space_time_dataset.py: F841, E722
python/grass/temporal/c_libraries_interface.py: F841, E722
python/grass/temporal/core.py: E722
python/grass/temporal/datetime_math.py: F841, E722
Expand Down Expand Up @@ -204,6 +192,7 @@ per-file-ignores =


max-line-length = 88
# Remember to remove the exclusions from .pre-commit-config.yaml when removing here
exclude =
.git,
__pycache__,
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ jobs:

steps:
- name: Checkout repository contents
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 31

- name: Check what files were changed
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
precommit:
- '.pre-commit-config.yaml'
- name: Check for CRLF endings
uses: erclu/check-crlf@94acb86c2a41b0a46bd8087b63a06f0457dd0c6c # v1.2.0
with:
Expand All @@ -51,7 +59,7 @@ jobs:
- name: Generate release notes using git log
run: |
python -m pip install PyYAML
python -m pip install PyYAML requests
# Git works without any special permissions.
# Using current branch or the branch against the PR is open.
# Using the last 30 commits (for branches, tags, and PRs).
Expand All @@ -60,3 +68,6 @@ jobs:
${{ github.ref_name }} \
$(git rev-parse HEAD~30) \
""
- run: pip install pre-commit && pre-commit run -a
if: ${{ steps.changes.outputs.precommit == 'true' }}
8 changes: 4 additions & 4 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@11b773b1598aa4ae3b32f023701bca5201c3817d # v0.17
with:
source: "."
clangFormatVersion: 15
clangFormatVersion: 17
inplace: True
- name: Create and uploads code suggestions to apply
id: diff
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
Expand All @@ -52,11 +52,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@8de9eea54963d01c1a6c200606257d65bd53bea1 # v1
- uses: rui314/setup-mold@65685f45207903d37d006cd402c397653c57660e # v1
if: ${{ matrix.language == 'c-cpp' }}

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-22.04
if: github.repository == 'OSGeo/grass'
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Get dependencies
run: |
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
- .github/**
- utils/**

concurrency:
group: >-
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

env:
OUT_DIR: ${{ github.workspace }}/../grass_outdir
GRASS: grass-${{ github.ref_name }}
Expand All @@ -25,7 +30,7 @@ jobs:
contents: write
steps:
- name: Checks-out repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ github.ref }}
fetch-depth: 0
Expand Down Expand Up @@ -68,7 +73,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@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v2.0.6
with:
name: GRASS GIS ${{ github.ref_name }}
body: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Docker meta
Expand All @@ -70,13 +70,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Login to DockerHub
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
with:
push: true
pull: true
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,12 @@ jobs:
strategy:
matrix:
include:
- c: gnu99
cpp: c++11
- c: gnu11
cpp: c++11
- c: gnu11
cpp: c++14
- c: gnu17
cpp: c++17
fail-fast: false

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Get dependencies
run: |
sudo apt-get update -y
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
labeler:
permissions:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
/usr/bin/sudo /usr/bin/find /usr/local /opt/homebrew -mindepth 1 -maxdepth 1 \
-type f -print -delete
hash -r
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Mamba
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0
with:
Expand All @@ -55,14 +55,15 @@ jobs:
- name: Add the bin directory to PATH
run: echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Check installed version
if: always()
shell: bash -l {0}
run: source ./.github/workflows/print_versions.sh
- name: Run tests
shell: bash -el {0}
run: >
grass --tmp-location XY --exec \
grass --tmp-project XY --exec \
g.download.location url=${{ env.SampleData }} path=$HOME
grass --tmp-location XY --exec \
grass --tmp-project XY --exec \
python3 -m grass.gunittest.main \
--grassdata $HOME --location nc_spm_full_v2alpha2 --location-type nc \
--min-success 100 --config .github/workflows/macos_gunittest.cfg
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: msys2/setup-msys2@d0e80f58dffbc64f6a3a1f43527d469b4fc7b6c8 # v2.23.0
with:
path-type: inherit
Expand Down Expand Up @@ -66,15 +66,20 @@ jobs:
shell: msys2 {0}
run: .github/workflows/build_osgeo4w.sh

- name: Print installed versions
if: always()
shell: msys2 {0}
run: .github/workflows/print_versions.sh

- name: Test executing of the grass command
run: .github/workflows/test_simple.bat 'C:\OSGeo4W\opt\grass\grass84.bat'
run: .github/workflows/test_simple.bat 'C:\OSGeo4W\opt\grass\grass85.bat'

- name: Test executing of the grass command in bash
shell: msys2 {0}
run: .github/workflows/test_simple.sh

- name: Run tests
run: .github/workflows/test_thorough.bat 'C:\OSGeo4W\opt\grass\grass84.bat' 'C:\OSGeo4W\bin\python3'
run: .github/workflows/test_thorough.bat 'C:\OSGeo4W\opt\grass\grass85.bat' 'C:\OSGeo4W\bin\python3'

- name: Make HTML test report available
if: ${{ always() }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/periodic_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:
- name: Create URL to the run output
id: vars
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: "Check that autoconf scripts are up-to-date:"
run: |
rm -f config.guess config.sub
wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess && chmod +x config.guess
wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub && chmod +x config.sub
# Display changes, only to follow along in the logs.
- run: git diff config.guess config.sub
- run: git diff -- config.guess config.sub
- name: Double check if files are modified
run: git status --ignored
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
commit-message: "config.guess + config.sub: updated from http://git.savannah.gnu.org/cgit/config.git/plain/"
branch: periodic/update-configure
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/print_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ git --version

# This will fail if the build failed.
grass --version
grass --tmp-location XY --exec g.version -e
grass --tmp-project XY --exec g.version -ergb
# Detailed Python version info (in one line thanks to echo)
grass --tmp-location XY --exec bash -c "echo Python: \$(\$GRASS_PYTHON -c 'import sys; print(sys.version)')"
grass --tmp-project XY --exec bash -c "echo Python: \$(\$GRASS_PYTHON -c 'import sys; print(sys.version)')"
Loading

0 comments on commit 45dad8f

Please sign in to comment.