Skip to content

Commit

Permalink
Merge branch 'main' into wxgui-make-loc-download-dial-background
Browse files Browse the repository at this point in the history
  • Loading branch information
landam authored Mar 22, 2024
2 parents 90e4a7c + cb37ba7 commit 237cc9a
Show file tree
Hide file tree
Showing 521 changed files with 1,951,238 additions and 1,789,746 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ per-file-ignores =
gui/wxpython/core/giface.py: E501
gui/wxpython/core/gthread.py: F841
gui/wxpython/core/gconsole.py: E722, W605
gui/wxpython/core/globalvar.py: W605
gui/wxpython/core/toolboxes.py: E722, E501
gui/wxpython/core/utils.py: E722, F841, W605
gui/wxpython/core/workspace.py: E722, E501
Expand Down
172 changes: 172 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
---
libraries:
- changed-files:
- any-glob-to-any-file:
- lib/**
- include/grass/**
- python/**
module:
- changed-files:
- any-glob-to-any-file:
- db/**
- display/**
- general/**
- imagery/**
- misc/**
- ps/**
- raster/**
- raster3d/**
- scripts/**
- temporal/**
- vector/**

# Module categories
database:
- changed-files:
- any-glob-to-any-file:
- db/**
- lib/db/**
- scripts/db.*/**
- '**.sql'
display:
- changed-files:
- any-glob-to-any-file:
- display/**
- lib/display/**
- scripts/d.*/**
general:
- changed-files:
- any-glob-to-any-file:
- general/**
- scripts/g.*/**
GUI:
- changed-files:
- any-glob-to-any-file:
- gui/**
imagery:
- changed-files:
- any-glob-to-any-file:
- imagery/**
- lib/imagery/**
- scripts/i.*/**
misc:
- changed-files:
- any-glob-to-any-file:
- misc/**
- scripts/m.*/**
raster:
- changed-files:
- any-glob-to-any-file:
- raster/**
- lib/raster/**
- scripts/r.*/**
raster3d:
- changed-files:
- any-glob-to-any-file:
- raster3d/**
- lib/raster3d/**
- scripts/r3.*/**
temporal:
- changed-files:
- any-glob-to-any-file:
- temporal/**
- lib/temporal/**
- scripts/t.*/**
vector:
- changed-files:
- any-glob-to-any-file:
- vector/**
- lib/vector/**
- scripts/v.*/**

# Build, packaging, or OS related
CI:
- changed-files:
- any-glob-to-any-file:
- .github/**
- .travis/**
- binder/**
- .travis.yml
- renovate.json
- .pre-commit-config.yaml
Windows:
- changed-files:
- any-glob-to-any-file:
- mswindows/**
macOS:
- changed-files:
- any-glob-to-any-file:
- macosx/**
Linux:
- changed-files:
- any-glob-to-any-file:
- singularity/**
- rpm/**
docker:
- changed-files:
- any-glob-to-any-file:
- docker/**
- '**/*Dockerfile*'
- '**/*dockerfile*'
- .dockerignore

docs:
- all:
- changed-files:
- any-glob-to-any-file:
- doc/**
- man/**
- '**/*.md'
- '**/*.rst'
- '**/*.html'
- '**/*.dox'
- '**/*.png'
- '**.cff'
- CITING
- CHANGES
- AUTHORS
- NEWS
- TODO
- all-globs-to-all-files:
- '!doc/development/rfc/**'
RFC:
- changed-files:
- any-glob-to-any-file:
- doc/development/rfc/**
translation:
- changed-files:
- any-glob-to-any-file: locale/**

# based on file types
Python:
- changed-files:
- any-glob-to-any-file:
- '**/*.py'
- '**/pyproject.toml'
notebook:
- changed-files:
- any-glob-to-any-file:
- '**/*.ipynb'
- doc/notebooks/**
- python/grass/jupyter/**
C:
- changed-files:
- any-glob-to-any-file: '**/*.c'
C++:
- changed-files:
- any-glob-to-any-file: '**/*.cpp'
CSS:
- changed-files:
- any-glob-to-any-file: '**/*.css'
HTML:
- changed-files:
- any-glob-to-any-file: '**/*.html'
JavaScript:
- changed-files:
- any-glob-to-any-file: '**/*.js'

# test suite
tests:
- changed-files:
- any-glob-to-any-file:
- '**/testsuite/**'
2 changes: 1 addition & 1 deletion .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
exclude: mswindows .*\.bat .*/testsuite/data/.*

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/apt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ libpdal-dev
libpng-dev
libproj-dev
libreadline-dev
libsvm-dev
libzstd-dev
pdal
proj-bin
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_ubuntu-22.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export INSTALL_PREFIX=$1
--with-bzlib \
--with-blas \
--with-lapack \
--with-libsvm \
--with-readline \
--with-openmp \
--with-pdal \
Expand Down
88 changes: 78 additions & 10 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,88 @@ on:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
permissions: {}
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@11b773b1598aa4ae3b32f023701bca5201c3817d # v0.17
with:
source: "."
clangFormatVersion: 15
inplace: True
- name: Verify Changed files
uses: tj-actions/verify-changed-files@d774a4c7ebe335445d79c7b44138f56a76058ba0 # v19.0.0
id: verify-changed-files
- id: git-changed-files
run: |
{
echo 'CHANGED_FILES<<EOF'
git ls-files --other --modified --exclude-standard
echo EOF
} >> "$GITHUB_OUTPUT"
- name: List all changed files tracked and untracked files
run: |
echo "Changed files: ${{ steps.git-changed-files.outputs.CHANGED_FILES }}"
- name: Add job summary without changed files
if: ${{ steps.verify-changed-files.outputs.files_changed == 'false' }}
run: |
{
echo "### Changed files:"
echo "No files were changed by clang-format"
} >> "$GITHUB_STEP_SUMMARY"
- name: Add job summary with changed files
if: ${{ steps.verify-changed-files.outputs.files_changed == 'true' }}
run: |
{
echo '### Changed files:'
echo '```'
echo "${CHANGED_FILES}"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
env:
CHANGED_FILES: ${{ steps.git-changed-files.outputs.CHANGED_FILES }}
- name: Create unified diff of changes
if: ${{ steps.verify-changed-files.outputs.files_changed == 'true' }}
run: git diff --unified=0 --no-color --output=diff-clang-format.patch
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: ${{ steps.verify-changed-files.outputs.files_changed == 'true' }}
with:
name: diff
if-no-files-found: ignore
retention-days: 1
path: |
diff-clang-format.patch
- name: Add note to summary explaining that code suggestions will be applied if it is a PR
if: ${{ (github.event_name == 'pull_request') && (steps.verify-changed-files.outputs.files_changed == 'true') }}
run: |
{
echo ''
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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: always()
with:
clang-format-version: '15'
check-path: .
name: formatted-clang-format
retention-days: 10
path: |
.clang-format
${{ steps.git-changed-files.outputs.CHANGED_FILES }}
- name: Explain that more files need to be fixed
if: ${{ steps.verify-changed-files.outputs.files_changed == 'true' }}
run: |
{
echo ''
# shellcheck disable=SC2016
echo 'All fixed files are included in the `formatted-*` artifact. This artifact can be downloaded and copied to the repository to replace unformatted files with the formatted files.'
} >> "$GITHUB_STEP_SUMMARY"
exit 1
51 changes: 37 additions & 14 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,72 @@ on:
# Check every Saturday at 18:36
- cron: 36 18 * * 6

permissions: {}

jobs:
analyze:
name: ${{ matrix.language }}
name: Analyze
runs-on: ubuntu-22.04
permissions:
security-events: write
actions: read
contents: read

strategy:
fail-fast: false
matrix:
# C is included in cpp, no separate C language available on CodeQL
language:
- cpp
- c-cpp
- python

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

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml

- name: Get dependencies
python-version: '3.x'
- name: Install non-Python dependencies
if: ${{ matrix.language == 'c-cpp' }}
run: |
sudo apt-get update -y
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
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
setup-python-dependencies: false

- name: Create installation directory
run: |
mkdir $HOME/install
mkdir "${HOME}/install"
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${HOME}/install/lib" >> $GITHUB_ENV
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- name: Build
if: ${{ matrix.language == 'c-cpp' }}
env:
CFLAGS: -std=gnu11
CXXFLAGS: -std=c++11
run: .github/workflows/build_ubuntu-22.04.sh $HOME/install
run: .github/workflows/build_ubuntu-22.04.sh "${HOME}/install"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
Loading

0 comments on commit 237cc9a

Please sign in to comment.