Skip to content

Commit

Permalink
Merge branch 'main' into fix_wxgui_single_win_mode_map_disp_full_screen
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Feb 2, 2025
2 parents 0d0cda4 + 09f9235 commit 6451dfa
Show file tree
Hide file tree
Showing 516 changed files with 11,101 additions and 10,442 deletions.
22 changes: 4 additions & 18 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,38 +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
# F821 undefined name 'cmp'
# https://github.com/OSGeo/grass/issues/1809
python/grass/pydispatch/saferef.py: F821
# 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
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,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 +145,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@bac87d5a5820d626ba77131fbbfbce77faf03b6e # 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@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
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@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
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
11 changes: 8 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ on:
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 @@ -47,6 +48,10 @@ jobs:
- ubuntu_wxgui
fail-fast: false

permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -66,7 +71,7 @@ jobs:
latest=false
suffix=-${{ matrix.os }}
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Login to DockerHub
Expand All @@ -76,7 +81,7 @@ jobs:
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
Expand Down
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
21 changes: 18 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ env:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

permissions: {}

jobs:
macos_build:
name: macOS build
Expand Down Expand Up @@ -49,11 +52,23 @@ jobs:
id: date
# Year and week of year so cache key changes weekly
run: echo "date=$(date +%Y-%U)" >> "${GITHUB_OUTPUT}"
- name: Prepare Conda environment file
env:
test_dependencies: |
ipython
pytest
pytest-github-actions-annotate-failures
pytest-timeout
pytest-xdist
pyyaml
run: |
cp ./macos/files/conda-requirements-dev-arm64.txt "${RUNNER_TEMP}/macos_dependencies.txt"
echo "$test_dependencies" | sed "s/ /\n/g" >> "${RUNNER_TEMP}/macos_dependencies.txt"
- name: Setup Mamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc # v2.0.4
with:
init-shell: bash
environment-file: .github/workflows/macos_dependencies.txt
environment-file: ${{ runner.temp }}/macos_dependencies.txt
environment-name: grass-env
# Persist on the same period (date).
cache-environment-key: environment-${{ steps.date.outputs.date }}
Expand Down Expand Up @@ -107,7 +122,7 @@ jobs:
nc_spm_full_v2alpha2.tar.gz"
- name: Make HTML test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: testreport-macOS
path: testreport
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/milestones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ on:
pull_request_target:
types: [closed]

permissions: {}

jobs:
assign-milestone:
runs-on: ubuntu-latest
if: github.event.pull_request.merged
permissions:
contents: read
pull-requests: write
steps:
# Retreiving the current milestoone from API instead of github context,
# Retrieving the current milestone from API instead of github context,
# so up-to-date information is used when running after being queued or for reruns
# Otherwise, the information should be available using
# ${{ github.event.pull_request.milestone.title }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/osgeo4w.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.os }} build and tests
Expand Down Expand Up @@ -138,7 +140,7 @@ jobs:

- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: testreport-${{ matrix.os }}
path: testreport
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/periodic_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
# See https://crontab.guru/#32_10_*/100,1-7_*_WED
- cron: "32 10 */100,1-7 * WED"

permissions: {}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
update-configure:
# The type of runner that the job will run on
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Create URL to the run output
Expand All @@ -33,7 +39,7 @@ jobs:
run: git status --ignored
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
with:
commit-message: "config.guess + config.sub: updated from http://git.savannah.gnu.org/cgit/config.git/plain/"
branch: periodic/update-configure
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- releasebranch_*
pull_request:

permissions: {}

jobs:
pytest:
concurrency:
Expand Down Expand Up @@ -35,7 +37,7 @@ jobs:
- 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: ${{ matrix.python-version }}
cache: pip
Expand All @@ -48,7 +50,7 @@ jobs:
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- uses: rui314/setup-mold@bac87d5a5820d626ba77131fbbfbce77faf03b6e # v1
- uses: rui314/setup-mold@f80524ca6eeaa76759b57fb78ddce5d87a20c720 # v1

- name: Install Python dependencies
run: |
Expand Down Expand Up @@ -115,15 +117,15 @@ jobs:
coverage html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
verbose: true
flags: pytest-python-${{ matrix.python-version }}
name: pytest-python-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Make python-only code coverage test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: python-codecoverage-report-${{ matrix.os }}-${{ matrix.python-version }}
path: coverage_html_report
Expand Down
Loading

0 comments on commit 6451dfa

Please sign in to comment.