Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Nov 1, 2024
2 parents 5d43887 + 3f0b69f commit 56d5ec8
Show file tree
Hide file tree
Showing 1,110 changed files with 19,080 additions and 20,745 deletions.
65 changes: 65 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[run]
; branch = True
; dynamic_context = test_function
concurrency = multiprocessing,thread
parallel = True
data_file = ${INITIAL_PWD-.}/.coverage
omit =
${INITIAL_PWD-.}/testreport
${INITIAL_PWD-.}/.github/*
${INITIAL_PWD-.}/bin.*/*
${INITIAL_PWD-.}/dist.*/*
**/gui/wxpython/*/**
**/OBJ.*/*
source =
.
${INITIAL_PWD-.}/
${INITIAL_GISBASE-/usr/local/grass??}/

[paths]
root =
./
${INITIAL_GISBASE-/usr/local/grass??}/
/home/*/install/grass??/
python =
./python/
${INITIAL_GISBASE-/usr/local/grass??}/etc/python/
/home/*/install/grass??/etc/python/
special_d_mon =
./display/d.mon/
${INITIAL_GISBASE-/usr/local/grass??}/etc/d.mon/
/home/*/install/grass??/etc/d.mon/
special_r_in_wms =
./scripts/r.in.wms/
${INITIAL_GISBASE-/usr/local/grass??}/etc/r.in.wms/
/home/*/install/grass??/etc/r.in.wms/


[report]
; Since our file structure isn't an importable package, not all files are found
; This allows to find python files even if there is missing __init__.py files, but is slow
include_namespace_packages = True
skip_covered = False
; Regexes for lines to exclude from consideration
exclude_also =
; Don't complain about missing debug-only code:
def __repr__
if self\.debug

; Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

; Don't complain if non-runnable code isn't run:
; if 0:
; if __name__ == .__main__.:

; Don't complain about abstract methods, they aren't run:
@(abc\.)?abstractmethod

ignore_errors = True
precision = 2

[html]
directory = coverage_html_report
show_contexts = true
129 changes: 25 additions & 104 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -15,78 +15,18 @@ per-file-ignores =
# E501 line too long
# E722 do not use bare 'except'
# W605 invalid escape sequence
# F401 imported but unused
# F821 undefined name 'unicode'
# F841 local variable assigned to but never used
# E741 ambiguous variable name 'l'
__init__.py: F401, F403
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
man/build_class.py: F403, F405
man/build_class_rest.py: F403, F405
man/build_check.py: F403, F405
man/build_full_index.py: F403, F405
man/build_index.py: F403, F405
man/build_index_rest.py: F403, F405
man/build_keywords.py: F403, F405, E722
man/build_topics.py: F403, F405, E722
__init__.py: F403
man/build_html.py: E501
imagery/i.atcorr/create_iwave.py: F632, F821, W293
doc/python/raster_example_ctypes.py: F403, F405
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
doc/python/m.distance.py: E501
gui/scripts/d.wms.py: E501
gui/wxpython/core/gcmd.py: E402
gui/wxpython/core/gthread.py: F841
gui/wxpython/core/gconsole.py: E722
gui/wxpython/core/toolboxes.py: E722
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
gui/wxpython/core/settings.py: E722
gui/wxpython/core/watchdog.py: E402
gui/wxpython/datacatalog/tree.py: E731, E402
gui/wxpython/dbmgr/base.py: E722, F841
gui/wxpython/dbmgr/dialogs.py: F841, E722
gui/wxpython/dbmgr/sqlbuilder.py: E722, F841
gui/wxpython/dbmgr/manager.py: E722
gui/wxpython/dbmgr/vinfo.py: F841
gui/wxpython/docs/wxgui_sphinx/conf.py: E402, W291
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
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
gui/wxpython/gui_core/preferences.py: E266, F841
gui/wxpython/gui_core/treeview.py: F841
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, 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
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/image2target/g.gui.image2target.py: E501
gui/wxpython/photo2image/g.gui.photo2image.py: E501
gui/wxpython/psmap/*: E501, E722
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
gui/wxpython/tplot/g.gui.tplot.py: E501
gui/wxpython/rdigit/g.gui.rdigit.py: F841
Expand Down Expand Up @@ -122,67 +62,48 @@ 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/invoker.py: E721
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/category.py: E721
python/grass/pygrass/rpc/__init__.py: F401, F403
python/grass/pygrass/rpc/__init__.py: F403
python/grass/pygrass/utils.py: E402
python/grass/temporal/abstract_space_time_dataset.py: F841, E722
python/grass/temporal/c_libraries_interface.py: F841, E722
python/grass/temporal/abstract_space_time_dataset.py: E722
python/grass/temporal/c_libraries_interface.py: E722
python/grass/temporal/core.py: E722
python/grass/temporal/datetime_math.py: F841, E722
python/grass/temporal/open_stds.py: F841
python/grass/temporal/datetime_math.py: E722
python/grass/temporal/spatial_topology_dataset_connector.py: E722
python/grass/temporal/temporal_algebra.py: F841, E722
python/grass/temporal/temporal_granularity.py: F841, E722
python/grass/temporal/temporal_raster_base_algebra.py: F841, E722
python/grass/temporal/temporal_algebra.py: E722
python/grass/temporal/temporal_granularity.py: E722
python/grass/temporal/temporal_raster_base_algebra.py: E722
python/grass/temporal/temporal_topology_dataset_connector.py: E722
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.
python/grass/pygrass/tests/benchmark.py: E402, F401, F821
python/grass/pygrass/tests/benchmark.py: E402, F821
# Configuration file for Sphinx:
# Ignoring import/code mix and line length.
python/grass/docs/conf.py: E402
# Files not managed by Black
python/grass/imaging/images2gif.py: E226
# Unused imports in init files
# F401 imported but unused
# F403 star import used; unable to detect undefined names
python/grass/*/__init__.py: F401, F403
python/grass/*/*/__init__.py: F401, F403
python/grass/*/*/*/__init__.py: F401, F403
python/grass/*/*/__init__.py: F403
python/grass/*/*/*/__init__.py: F403
# 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
scripts/r.in.wms/wms_gdal_drv.py: E722
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
scripts/v.report/v.report.py: F841, E721
scripts/r.semantic.label/r.semantic.label.py: E501
scripts/db.out.ogr/db.out.ogr.py: F841
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/g.extension/g.extension.py: E501
scripts/v.unpack/v.unpack.py: E501n
scripts/v.import/v.import.py: E501
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
scripts/r.fillnulls/r.fillnulls.py: E722
scripts/d.rast.edit/d.rast.edit.py: E722
scripts/v.what.strds/v.what.strds.py: E722, E501
scripts/i.pansharpen/i.pansharpen.py: E501
scripts/v.what.strds/v.what.strds.py: E501
# Line too long (esp. module interface definitions)
scripts/*/*.py: E501
# local variable 'column' is assigned to but never used
temporal/t.rast.to.vect/t.rast.to.vect.py: F841, E501
# local variable 'stdstype' is assigned to but never used
temporal/t.vect.algebra/t.vect.algebra.py: F841, E501
# ## used (##% key: r etc)
# local variable 'map_list' is assigned to but never used
temporal/t.rast.what/t.rast.what.py: E265, E266, F841, E501
temporal/t.rast.to.vect/t.rast.to.vect.py: E501
temporal/t.vect.algebra/t.vect.algebra.py: E501
temporal/t.rast.what/t.rast.what.py: E501
# Line too long (esp. module interface definitions)
temporal/*/*.py: E501

Expand Down
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Description
<!-- Describe your changes in detail -->

## Motivation and context
<!-- Why is this change required? What problem does it solve? -->
<!-- If it fixes an open issue, please link the issue here. -->

## How has this been tested?
<!-- Please describe how you tested your changes. -->

## Screenshots (if appropriate)

## Types of changes
<!-- What types of changes does your code introduce? -->
<!-- Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as before)

## Checklist
<!-- See the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, please ask. We're here to help! -->
- [ ] PR title provides summary of the changes and starts with one of the
[pre-defined prefixes](../../utils/release.yml)
<!-- For example: "doc: Add example to db.describe documentation" -->
<!-- or if it is a fix use "db.describe: fix JSON output format" -->
- [ ] My code follows the [code style](../../doc/development/style_guide.md)
of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
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@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
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@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
id: upload-changes
if: >-
${{ always() &&
Expand Down
2 changes: 0 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ docs:
- '**/*.png'
- '**.cff'
- CITING
- CHANGES
- AUTHORS
- NEWS
- TODO
- all-globs-to-all-files:
- '!doc/development/rfc/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

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

Expand All @@ -43,7 +43,7 @@ jobs:
exclude: mswindows .*\.bat .*/testsuite/data/.*

- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.10'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ libfftw3-dev
libgdal-dev
libgl1-mesa-dev
libglu1-mesa-dev
liblapacke-dev
libnetcdf-dev
libopenblas-dev
libpdal-dev
libpng-dev
libproj-dev
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@11b773b1598aa4ae3b32f023701bca5201c3817d # v0.17
- uses: DoozyX/clang-format-lint-action@c71d0bf4e21876ebec3e5647491186f8797fde31 # v0.18.2
with:
source: "."
clangFormatVersion: 17
clangFormatVersion: 18.1.8
inplace: True
- name: Create and uploads code suggestions to apply
id: diff
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.x'
- name: Install non-Python dependencies
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@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1
- uses: rui314/setup-mold@b015f7e3f2938ad3a5ed6e5111a8c6c7c1d6db6e # v1
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.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@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Get dependencies
run: |
Expand Down
Loading

0 comments on commit 56d5ec8

Please sign in to comment.