Skip to content

Commit

Permalink
Merge branch 'main' into 722-temporal
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Dec 12, 2024
2 parents 24cbf26 + 3022d9f commit ca49c05
Show file tree
Hide file tree
Showing 110 changed files with 1,144 additions and 639 deletions.
6 changes: 3 additions & 3 deletions .cppcheck-suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ syntaxError:display/displaydrivers.html
# dist.x86_64-pc-linux-gnu
syntaxError:dist.x86_64-pc-linux-gnu/*

# doc
# doc
syntaxError:doc/*

# docker
Expand All @@ -51,7 +51,7 @@ negativeIndex:imagery/i.atcorr/computations.cpp:1025
syntaxError:include/Makefile
syntaxError:include/VERSION:1

# text files
# text files
syntaxError:INSTALL.md
syntaxError:install-sh
syntaxError:GPL.TXT
Expand Down Expand Up @@ -131,7 +131,7 @@ syntaxError:mswindows/*
invalidFunctionArg:raster/r.sim/simlib/random.c:36
invalidFunctionArg:raster/r.sim/simlib/random.c:57

## Different rules under different ifdef.
## Different rules under different ifdef.
ctuOneDefinitionRuleViolation:raster/r.in.pdal/grassrasterwriter.h:39
syntaxError:raster/rasterintro.html
syntaxError:raster/Makefile:155
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ dist.*
!.git/refs/heads
!.git/objects
.git/objects/*
!.git/objects/pack
2 changes: 0 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ per-file-ignores =
# C wrappers call libgis.G_gisinit before importing other modules.
# TODO: Is this really needed?
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/raster/__init__.py: E402
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/utils.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
2 changes: 1 addition & 1 deletion .github/actions/create-upload-suggestions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ runs:
env:
FORMATTED_URL: >-
[`formatted-${{ steps.tool-name-safe.outputs.tool-name }}`](${{
steps.upload-changes.outputs.artifact-url }})
steps.upload-changes.outputs.artifact-url }})
- name: Fail action if some files were changed
if: >-
${{ (steps.files_changed.outputs.files_changed == 'true') &&
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/init@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
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@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/analyze@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
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@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
with:
name: GRASS GIS ${{ github.ref_name }}
body: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Year and week of year so cache key changes weekly
run: echo "date=$(date +%Y-%U)" >> "${GITHUB_OUTPUT}"
- name: Setup Mamba
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # v2.0.2
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
init-shell: bash
environment-file: .github/workflows/macos_dependencies.txt
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
--min-success 100 --config .github/workflows/macos_gunittest.cfg
env:
SampleData: "https://grass.osgeo.org/sampledata/north_carolina/\
nc_spm_full_v2alpha2.tar.gz"
nc_spm_full_v2alpha2.tar.gz"
- name: Make HTML test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: msys2/setup-msys2@c52d1fa9c7492275e60fe763540fb601f5f232a1 # v2.25.0
- uses: msys2/setup-msys2@d44ca8e88d8b43d56cf5670f91747359d5537f97 # v2.26.0
with:
path-type: inherit
location: D:\
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
coverage html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
verbose: true
flags: pytest-python-${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.8.0"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.8.1"
RUFF_VERSION: "0.8.2"

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@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/upload-sarif@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
with:
sarif_file: bandit.sarif

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.1
rev: v0.8.2
hooks:
# Run the linter.
- id: ruff
Expand Down
4 changes: 2 additions & 2 deletions display/d.mon/render_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def adjust_region(width, height):

region["nsres"] = mapheight / height
region["ewres"] = mapwidth / width
region["rows"] = int(round(mapheight / region["nsres"]))
region["cols"] = int(round(mapwidth / region["ewres"]))
region["rows"] = round(mapheight / region["nsres"])
region["cols"] = round(mapwidth / region["ewres"])
region["cells"] = region["rows"] * region["cols"]

kwdata = [
Expand Down
2 changes: 1 addition & 1 deletion docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.20@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a as common
FROM alpine:3.21@sha256:21dc6063fd678b478f57c0e13f47560d0ea4eeba26dfc947b2a4f81f686b9f45 as common

# Based on:
# https://github.com/mundialis/docker-grass-gis/blob/master/Dockerfile
Expand Down
20 changes: 10 additions & 10 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions gui/wxpython/core/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,9 +1409,9 @@ def DeleteLayer(self, layer, overlay=False):
"""
Debug.msg(3, "Map.DeleteLayer(): name=%s" % layer.name)

_list = self.overlays if overlay else self.layers
list_ = self.overlays if overlay else self.layers

if layer in _list:
if layer in list_:
if layer.mapfile:
base, mapfile = os.path.split(layer.mapfile)
tempbase = mapfile.split(".")[0]
Expand All @@ -1428,7 +1428,7 @@ def DeleteLayer(self, layer, overlay=False):
if os.path.isfile(layer._legrow):
os.remove(layer._legrow)

_list.remove(layer)
list_.remove(layer)

self.layerRemoved.emit(layer=layer)
return layer
Expand Down Expand Up @@ -1563,10 +1563,10 @@ def GetLayerIndex(self, layer, overlay=False):
:return: layer index
:return: -1 if layer not found
"""
_list = self.overlays if overlay else self.layers
list_ = self.overlays if overlay else self.layers

if layer in _list:
return _list.index(layer)
if layer in list_:
return list_.index(layer)

return -1

Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/core/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def formatDist(distance, mapunits):
outdistance = round(distance / divisor, 1)
elif (distance / divisor) > 0.0:
outdistance = round(
distance / divisor, int(math.ceil(3 - math.log10(distance / divisor)))
distance / divisor, math.ceil(3 - math.log10(distance / divisor))
)
else:
outdistance = float(distance / divisor)
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def __ll_parts(value, reverse=False, precision=3):
if value == 0.0:
return "%s%.*f" % ("00:00:0", precision, 0.0)

d = int(int(value))
d = int(value)
m = int((value - d) * 60)
s = ((value - d) * 60 - m) * 60
if m < 0:
Expand Down
14 changes: 5 additions & 9 deletions gui/wxpython/gmodeler/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ def OnRightClick(self, x, y, keys=0, attachment=0):
self.frame.Bind(wx.EVT_MENU, self.OnEnable, id=self.popupID["enable"])
if isinstance(shape, (ModelAction, ModelComment)):
popupMenu.AppendSeparator()
if isinstance(shape, ModelAction):
popupMenu.Append(self.popupID["label"], _("Set label"))
self.frame.Bind(wx.EVT_MENU, self.OnSetLabel, id=self.popupID["label"])
if isinstance(shape, (ModelAction, ModelComment)):
if isinstance(shape, ModelAction):
popupMenu.Append(self.popupID["label"], _("Set label"))
self.frame.Bind(wx.EVT_MENU, self.OnSetLabel, id=self.popupID["label"])

popupMenu.Append(self.popupID["comment"], _("Set comment"))
self.frame.Bind(wx.EVT_MENU, self.OnSetComment, id=self.popupID["comment"])

Expand Down Expand Up @@ -440,12 +440,8 @@ def _onSelectShape(self, shape, append=False):
shape.Select(False, dc)
else:
shapeList = canvas.GetDiagram().GetShapeList()
toUnselect = []

if not append:
for s in shapeList:
if s.Selected():
toUnselect.append(s)
toUnselect = [s for s in shapeList if s.Selected()] if not append else []

shape.Select(True, dc)

Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/iscatt/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ def SetBusy(self, busy):

def CursorPlotMove(self, x, y, scatt_id):
try:
x = int(round(x))
y = int(round(y))
x = round(x)
y = round(y)
coords = True
except TypeError:
coords = False
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/iscatt/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def Plot(self, cats_order, scatts, ellipses, styles):
img = imshow(
self.axes,
merged_img,
extent=[int(ceil(x)) for x in self.full_extend],
extent=[ceil(x) for x in self.full_extend],
origin="lower",
interpolation="nearest",
aspect="equal",
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/psmap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,6 @@ def BBoxAfterRotation(w, h, angle):
x_min = x
x_max = x + wct - hst

width = int(ceil(abs(x_max) + abs(x_min)))
height = int(ceil(abs(y_max) + abs(y_min)))
width = ceil(abs(x_max) + abs(x_min))
height = ceil(abs(y_max) + abs(y_min))
return width, height
2 changes: 1 addition & 1 deletion gui/wxpython/rlisetup/g.gui.rlisetup.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ <h2>REFERENCES</h2>
<h2>SEE ALSO</h2>

<em>
<a href="r.li.html">r.li</a> - package overview,
<a href="r.li.html">r.li</a> (package overview),
<a href="r.li.daemon.html">r.li.daemon</a>
</em>
<p>
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/vdigit/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,8 @@ def UpdateSettings(self):
tree.SetLayerInfo(item, key="vdigit", value={"geomAttr": {}})

if checked: # enable
_type = key if key == "area" else "length"
unitsKey = Units.GetUnitsKey(_type, unitsIdx)
type_ = key if key == "area" else "length"
unitsKey = Units.GetUnitsKey(type_, unitsIdx)
tree.GetLayerInfo(item, key="vdigit")["geomAttr"][key] = {
"column": column,
"units": unitsKey,
Expand Down
6 changes: 3 additions & 3 deletions imagery/i.rectify/i.rectify.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ <h3>Resampling method</h3>
<p>In the bilinear, cubic and lanczos methods, if any of the surrounding cells used to
interpolate the new cell value are NULL, the resulting cell will be NULL, even if
the nearest cell is not NULL. This will cause some thinning along NULL borders,
such as the coasts of land areas in a DEM. The bilinear_f, cubic_f and lanczos_f
interpolation methods can be used if thinning along NULL edges is not desired.
These methods "fall back" to simpler interpolation methods along NULL borders.
such as the coasts of land areas in a DEM. The <em>bilinear_f</em>, <em>cubic_f</em>
and <em>lanczos_f</em> interpolation methods can be used if thinning along NULL edges is
not desired. These methods "fall back" to simpler interpolation methods along NULL borders.
That is, from lanczos to cubic to bilinear to nearest.
<p>If nearest neighbor assignment is used, the output map has the same raster
format as the input map. If any of the other interpolations is used, the
Expand Down
Loading

0 comments on commit ca49c05

Please sign in to comment.