Skip to content

Commit

Permalink
Merge branch 'osgeo-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
a0x8o committed Jul 10, 2024
2 parents eec6e0d + 95f198e commit 582ffb8
Show file tree
Hide file tree
Showing 1,511 changed files with 75,233 additions and 3,366 deletions.
14 changes: 5 additions & 9 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ per-file-ignores =
doc/python/vector_example_ctypes.py: F403, F405
doc/python/m.distance.py: F403, F405, E501
doc/gui/wxpython/example/dialogs.py: F401
locale/grass_po_stats.py: E122, E128, E231, E401, E722, E741
locale/grass_po_stats.py: E122, E128, E231, E401, E722
gui/scripts/d.wms.py: E501
gui/wxpython/core/gcmd.py: E402
gui/wxpython/core/gthread.py: F841
Expand Down Expand Up @@ -126,7 +126,6 @@ per-file-ignores =
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/modules/interface/*.py: F401
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
Expand All @@ -136,13 +135,11 @@ per-file-ignores =
python/grass/temporal/datetime_math.py: F841, E722
python/grass/temporal/open_stds.py: F841
python/grass/temporal/spatial_topology_dataset_connector.py: E722
python/grass/temporal/temporal_algebra.py: E741, F841, E722
python/grass/temporal/temporal_algebra.py: F841, E722
python/grass/temporal/temporal_granularity.py: F841, E722
python/grass/temporal/temporal_raster_algebra.py: E741
python/grass/temporal/temporal_raster_base_algebra.py: F841, E722
python/grass/temporal/temporal_raster3d_algebra.py: E741
python/grass/temporal/temporal_topology_dataset_connector.py: E722
python/grass/temporal/temporal_vector_algebra.py: E741, F841
python/grass/temporal/temporal_vector_algebra.py: F841
python/grass/temporal/univar_statistics.py: E231
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
Expand All @@ -161,7 +158,7 @@ per-file-ignores =
# E402 module level import not at top of file
scripts/d.polar/d.polar.py: F841
scripts/r.in.wms/wms_gdal_drv.py: F841, E722
scripts/r.in.wms/wms_cap_parsers.py: F841, E741
scripts/r.in.wms/wms_cap_parsers.py: F841
scripts/r.in.wms/wms_drv.py: E402, E722
scripts/r.in.wms/srs.py: E722
scripts/r.semantic.label/r.semantic.label.py: F841, E501
Expand All @@ -170,8 +167,7 @@ per-file-ignores =
scripts/g.extension/g.extension.py: F841, E722, E501
scripts/v.unpack/v.unpack.py: F841, E722, E501
scripts/v.import/v.import.py: F841, E722, E501
scripts/db.univar/db.univar.py: E741, E501
scripts/d.rast.leg/d.rast.leg.py: E741
scripts/db.univar/db.univar.py: E501
scripts/d.frame/d.frame.py: E722
scripts/i.pansharpen/i.pansharpen.py: E722, E501
scripts/r.in.srtm/r.in.srtm.py: E722
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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
id: upload-changes
if: >-
${{ always() &&
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ 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@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ jobs:
latest=false
suffix=-${{ matrix.os }}
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0
- name: Login to DockerHub
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@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
with:
push: true
pull: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
nc_spm_full_v2alpha2.tar.gz"
- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-macOS
path: testreport
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:

- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-${{ matrix.os }}
path: testreport
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/post-pr-reviews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: Create a .git directory needed by reviewdog
run: git init
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
id: diff
continue-on-error: true
with:
Expand Down Expand Up @@ -47,6 +47,7 @@ jobs:
INPUT_TOOL_NAMES: >-
black
clang-format
ruff
- name: Post Black suggestions
if: ${{ steps.tools.outputs.black == 'true' }}
run: |
Expand Down Expand Up @@ -83,3 +84,21 @@ jobs:
CI_REPO_OWNER: ${{ github.event.workflow_run.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.workflow_run.repository.name }}
# CI_PULL_REQUEST: "" # Populated from reviewdog's "-guess" flag since hard to get
- name: Post Ruff suggestions
if: ${{ steps.tools.outputs.ruff == 'true' }}
run: |
TMPFILE="diff-${INPUT_TOOL_NAME}.patch"
GITHUB_ACTIONS="" reviewdog \
-name="${INPUT_TOOL_NAME:-reviewdog-suggester}" \
-f=diff \
-f.diff.strip=1 \
-filter-mode=nofilter \
-guess \
-reporter="github-pr-review" < "${TMPFILE}"
env:
INPUT_TOOL_NAME: ruff
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_COMMIT: ${{ github.event.workflow_run.head_sha }}
CI_REPO_OWNER: ${{ github.event.workflow_run.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.workflow_run.repository.name }}
# CI_PULL_REQUEST: "" # Populated from reviewdog's "-guess" flag since hard to get
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1

- name: Install Python dependencies
run: |
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
PYLINT_VERSION: "2.12.2"
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.7.9"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.5.1"

runs-on: ${{ matrix.os }}
permissions:
Expand All @@ -50,6 +52,7 @@ jobs:
echo Flake8: ${{ env.FLAKE8_VERSION }}
echo Pylint: ${{ env.PYLINT_VERSION }}
echo Bandit: ${{ env.BANDIT_VERSION }}
echo Ruff: ${{ env.RUFF_VERSION }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

Expand All @@ -61,6 +64,21 @@ jobs:
- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install Ruff
run: pip install ruff==${{ env.RUFF_VERSION }}
- name: Run Ruff
run: ruff check --output-format=github . --preview --fix --unsafe-fixes
- name: Create and uploads code suggestions to apply for Ruff
# Will fail fast here if there are changes required
id: diff-ruff
# To run after ruff step exits with failure when rules don't have fixes available
if: ${{ !cancelled() }}
uses: ./.github/actions/create-upload-suggestions
with:
tool-name: ruff
# To keep repo's file structure in formatted changes artifact
extra-upload-changes: pyproject.toml

- name: Install Black only
run: pip install black[jupyter]==${{ env.BLACK_VERSION }}

Expand Down Expand Up @@ -108,7 +126,7 @@ jobs:
bandit -c pyproject.toml -iii -r . -f sarif -o bandit.sarif --exit-zero
- name: Upload Bandit Scan Results
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: bandit.sarif
path: bandit.sarif
Expand All @@ -126,7 +144,7 @@ jobs:
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- uses: rui314/setup-mold@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1
- name: Build
run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install

Expand Down Expand Up @@ -180,7 +198,7 @@ jobs:
cp -rp dist.$ARCH/docs/html/libpython sphinx-grass
- name: Make Sphinx documentation available
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: sphinx-grass
path: sphinx-grass
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# list of files that changed across commits
fetch-depth: 0
- name: Lint code base
uses: super-linter/super-linter/slim@88ea3923a7e1f89dd485d079f6eb5f5e8f937589 # v6.6.0
uses: super-linter/super-linter/slim@3fe03abab2eafb293ace16d4a3b07aeabcb3f1a0 # v6.7.0
env:
DEFAULT_BRANCH: main
# To report GitHub Actions status checks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:

- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-${{ matrix.os }}-${{ matrix.config }}-${{ matrix.extra-include }}
path: testreport
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ repos:
python/libgrass_interface_generator/ctypesgen/|
lib/fonts/fonts/.*
)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.1
hooks:
# Run the linter.
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --preview]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
Expand Down
13 changes: 13 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
Expand All @@ -27,6 +28,8 @@
>>>>>>> 6f30700108 (wxpyimgview: explicit conversion to int (#2704))
=======
>>>>>>> 8f5c741ca6 (wxpyimgview: explicit conversion to int (#2704))
=======
>>>>>>> osgeo-main
CHANGES in GRASS GIS 8.x
=======
CHANGES in GRASS GIS 8.x compared to GRASS GIS 7.x
Expand Down Expand Up @@ -60,6 +63,7 @@ List of releases:
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> osgeo-main
=======
>>>>>>> osgeo-main
Expand Down Expand Up @@ -185,13 +189,16 @@ List of releases:
>>>>>>> osgeo-main
>>>>>>> 6cf60c76a4 (wxpyimgview: explicit conversion to int (#2704))
=======
=======
>>>>>>> osgeo-main
CHANGES in GRASS GIS 8.x

https://trac.osgeo.org/grass/wiki/Grass8/NewFeatures80
https://trac.osgeo.org/grass/wiki/Grass8/NewFeatures82

List of releases:

<<<<<<< HEAD
>>>>>>> 8422103f4c (wxpyimgview: explicit conversion to int (#2704))
<<<<<<< HEAD
<<<<<<< HEAD
Expand All @@ -218,6 +225,9 @@ List of releases:
>>>>>>> 6f30700108 (wxpyimgview: explicit conversion to int (#2704))
=======
=======
>>>>>>> 6cf60c76a4 (wxpyimgview: explicit conversion to int (#2704))
>>>>>>> osgeo-main
=======
CHANGES in GRASS GIS 8.x

https://trac.osgeo.org/grass/wiki/Grass8/NewFeatures80
Expand All @@ -226,7 +236,10 @@ https://trac.osgeo.org/grass/wiki/Grass8/NewFeatures82
List of releases:

>>>>>>> 8422103f4c (wxpyimgview: explicit conversion to int (#2704))
<<<<<<< HEAD
>>>>>>> 8f5c741ca6 (wxpyimgview: explicit conversion to int (#2704))
=======
>>>>>>> osgeo-main
- GitHub list: https://github.com/OSGeo/grass/releases
- Overview list: https://trac.osgeo.org/grass/wiki/Release
- History: https://grass.osgeo.org/home/history/releases/ (starting 1984!)
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ You can use your favorite tools to change source code or other files
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
Expand All @@ -149,6 +150,8 @@ You can use your favorite tools to change source code or other files
>>>>>>> 6f30700108 (wxpyimgview: explicit conversion to int (#2704))
=======
>>>>>>> 8f5c741ca6 (wxpyimgview: explicit conversion to int (#2704))
=======
>>>>>>> osgeo-main
in the local copy of the code. When making changes, please follow the
[Programming Style Guide](./doc/development/style_guide.md).

Expand Down Expand Up @@ -176,6 +179,7 @@ to your code.
=======
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 8422103f4c (wxpyimgview: explicit conversion to int (#2704))
=======
Expand All @@ -184,6 +188,10 @@ to your code.
=======
>>>>>>> 8422103f4c (wxpyimgview: explicit conversion to int (#2704))
>>>>>>> 8f5c741ca6 (wxpyimgview: explicit conversion to int (#2704))
=======
=======
>>>>>>> 8422103f4c (wxpyimgview: explicit conversion to int (#2704))
>>>>>>> osgeo-main
in the local copy of the code. When making changes, please follow
Submitting Guidelines at
<http://trac.osgeo.org/grass/wiki/Submitting>.
Expand Down Expand Up @@ -233,6 +241,7 @@ For Python, run `black .` to apply standardized formatting. You can
also run linter tools such as Pylint which will suggest different improvements
to your code.
<<<<<<< HEAD
<<<<<<< HEAD
=======
<<<<<<< HEAD
<<<<<<< HEAD
Expand Down Expand Up @@ -358,6 +367,8 @@ also run linter tools such as Pylint which will suggest different improvements
to your code.
=======
>>>>>>> 8f5c741ca6 (wxpyimgview: explicit conversion to int (#2704))
=======
>>>>>>> osgeo-main
### Committing

Expand Down
Loading

0 comments on commit 582ffb8

Please sign in to comment.