Skip to content

Commit

Permalink
Merge branch 'main' into docs_restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
pesekon2 authored Jan 8, 2025
2 parents fc573ae + ae08d8d commit 22ff7b5
Show file tree
Hide file tree
Showing 247 changed files with 2,441 additions and 4,264 deletions.
7 changes: 1 addition & 6 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ per-file-ignores =
gui/wxpython/image2target/g.gui.image2target.py: E501
gui/wxpython/photo2image/g.gui.photo2image.py: E501
gui/wxpython/psmap/*: E501
gui/wxpython/vdigit/*: F841, E722, F405, F403
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/frame.py: F405, F403
gui/wxpython/iclass/g.gui.iclass.py: E501
gui/wxpython/iclass/statistics.py: F841, F405, F403
gui/wxpython/location_wizard/wizard.py: E722
Expand All @@ -40,14 +39,10 @@ per-file-ignores =
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/jupyter/__init__.py: E501
python/grass/pygrass/vector/__init__.py: E402
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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@bac87d5a5820d626ba77131fbbfbce77faf03b6e # v1
- uses: rui314/setup-mold@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
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@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion .github/workflows/periodic_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1

- name: Install Python dependencies
run: |
Expand Down
50 changes: 26 additions & 24 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:

env:
# renovate: datasource=python-version depName=python
PYTHON_VERSION: "3.10"
MIN_PYTHON_VERSION: "3.8"
PYTHON_VERSION: "3.13"
MIN_PYTHON_VERSION: "3.9"
# renovate: datasource=pypi depName=black
BLACK_VERSION: "24.10.0"
# renovate: datasource=pypi depName=flake8
FLAKE8_VERSION: "7.1.1"
# renovate: datasource=pypi depName=pylint
PYLINT_VERSION: "2.12.2"
PYLINT_VERSION: "3.3.3"
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.8.0"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.8.4"
RUFF_VERSION: "0.8.6"

runs-on: ${{ matrix.os }}
permissions:
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
path: bandit.sarif

- name: Upload SARIF File into Security Tab
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
with:
sarif_file: bandit.sarif

Expand All @@ -147,7 +147,7 @@ jobs:
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- uses: rui314/setup-mold@bac87d5a5820d626ba77131fbbfbce77faf03b6e # v1
- uses: rui314/setup-mold@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1
- name: Build
run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install

Expand All @@ -156,37 +156,39 @@ jobs:
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Run Pylint on grass package
# Until slower checks (like similarity) are reenabled, running in one step is faster
if: false
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
cd python
pylint --persistent=no --py-version=${{ env.MIN_PYTHON_VERSION }} --jobs=$(nproc) grass
- name: Run Pylint on other files using pytest
# Until slower checks (like similarity) are reenabled, running in one step is faster
if: false
run: |
pipx inject --include-apps pylint pytest
pipx inject pylint pytest-pylint pytest-github-actions-annotate-failures pytest-timeout
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest --pylint -m pylint --pylint-jobs=$(nproc) \
--pylint-ignore-patterns="${{ env.PylintIgnore }}"
env:
PylintIgnore: "python/.*,gui/.*"

- name: Run Pylint on wxGUI
# Until slower checks (like similarity) are reenabled, running in one step is faster
if: false
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
cd gui/wxpython
pylint --persistent=no --py-version=${{ env.MIN_PYTHON_VERSION }} --jobs=$(nproc) *
pylint --persistent=no --py-version=${{ env.MIN_PYTHON_VERSION }} --jobs=$(nproc) gui
- name: Run Pylint on other files using pytest
- name: Run Pylint all in one pass
run: |
pipx inject --include-apps pylint pytest==7.4.4
pipx inject pylint pytest-pylint==0.19 pytest-github-actions-annotate-failures
echo "::warning file=.github/workflows/python-code-quality.yml,line=149,col=42,endColumn=48::\
Temporarily downgraded pytest-pylint and pytest to allow merging other PRs.\
The errors reported with a newer version seem legitimite and should be fixed \
(2023-10-18, see https://github.com/OSGeo/grass/pull/3205)\
(2024-01-28, see https://github.com/OSGeo/grass/issues/3380)"
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest --pylint -m pylint --pylint-rcfile=.pylintrc --pylint-jobs=$(nproc) \
--pylint-ignore-patterns="${{ env.PylintIgnore }}"
env:
PylintIgnore: "python/.*,gui/wxpython/.*,doc/.*,man/.*,utils/.*,locale/.*,raster/.*,\
imagery/.*,scripts/r.in.wms/wms_drv.py,scripts/g.extension/g.extension.py,\
temporal/t.rast.accdetect/t.rast.accdetect.py,temporal/t.rast.accumulate/t.rast.accumulate.py,\
scripts/d.rast.edit/d.rast.edit.py"
pylint --persistent=no --py-version=${{ env.MIN_PYTHON_VERSION }} --jobs=$(nproc) .
- name: Test compiling example modules
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
rev: v0.8.6
hooks:
# Run the linter.
- id: ruff
Expand Down
Loading

0 comments on commit 22ff7b5

Please sign in to comment.