Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ config-variables: null
paths:
# .github/workflows/**/*.yml:
# ignore: []
.github/workflows/**/*.yml:
ignore:
- 'reusable workflow call "\$/.+" at "uses" is not following the format' # [workflow-call]
- 'specifying action "\$/.+" in invalid format because ref is missing' # [action]
.github/workflows/python-code-quality.yml:
ignore:
- 'condition "false" is always evaluated to false. remove the if: section' # [if-cond]
2 changes: 1 addition & 1 deletion .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
id: diff-pre-commit
# To run after pre-commit step exits with failure
if: ${{ !cancelled() }}
uses: ./.github/actions/create-upload-suggestions
uses: $/.github/actions/create-upload-suggestions
with:
tool-name: pre-commit
# To keep repo's file structure in formatted changes artifact
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/periodic_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
STEPS_CPR_OUTPUTS_PULL_REQUEST_URL: ${{ steps.cpr.outputs.pull-request-url }}
update-i18n:
# The type of runner that the job will run on
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

permissions:
contents: write
Expand All @@ -86,16 +86,36 @@ jobs:
sudo apt update
sudo apt install -y --no-install-recommends --no-install-suggests \
gettext \
libcairo2-dev \
libfftw3-dev \
libfreetype-dev \
libgdal-dev \
libproj-dev
- name: Configure grass with minimal packages
libgeos-dev \
libgl-dev \
libglu1-mesa-dev \
libnetcdf-dev \
libpq-dev \
libproj-dev \
libsvm-dev \
python3-wxgtk4.0
- name: Configure grass with the packages needed for the menu strings
# wxPython is needed to generate the menu strings, and the tools
# that are not built get a placeholder instead of their description.
# Ubuntu 24.04 does not package PDAL or libLAS, so the point cloud
# import and export tools still get the placeholder.
run: |
./configure \
--with-cairo \
--with-fftw \
--with-freetype \
--with-freetype-includes=/usr/include/freetype2 \
--with-geos \
--with-libsvm \
--with-netcdf \
--with-nls \
--without-cairo \
--without-fftw \
--without-freetype \
--without-opengl \
--with-opengl \
--with-postgres \
--with-postgres-includes=/usr/include/postgresql \
--without-pdal
- name: Build grass core
run: make -j"$(nproc)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,6 @@ jobs:
needs:
- pytest
if: ${{ always() }}
uses: ./.github/workflows/verify-success.yml
uses: $/.github/workflows/verify-success.yml
with:
needs_context: ${{ toJson(needs) }}
4 changes: 2 additions & 2 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
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
uses: $/.github/actions/create-upload-suggestions
with:
tool-name: ruff
# To keep repo's file structure in formatted changes artifact
Expand Down Expand Up @@ -208,6 +208,6 @@ jobs:
needs:
- python-checks
if: ${{ always() }}
uses: ./.github/workflows/verify-success.yml
uses: $/.github/workflows/verify-success.yml
with:
needs_context: ${{ toJson(needs) }}
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,6 @@ jobs:
needs:
- ubuntu
if: ${{ always() }}
uses: ./.github/workflows/verify-success.yml
uses: $/.github/workflows/verify-success.yml
with:
needs_context: ${{ toJson(needs) }}
2 changes: 1 addition & 1 deletion .github/workflows/verify-success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ name: Verify Success reusable workflow
# - a-job-id
# - another-job-id
# if: ${{ always() }}
# uses: ./.github/workflows/verify-success.yml
# uses: $/.github/workflows/verify-success.yml
# with:
# needs_context: ${{ toJson(needs) }}
# ```
Expand Down
4 changes: 1 addition & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ repos:
hooks:
- id: actionlint
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.27.0
rev: v1.30.1
hooks:
- id: zizmor
args:
Expand Down Expand Up @@ -142,5 +142,3 @@ repos:
- c
- c++
- csv
- python
- tex
2 changes: 1 addition & 1 deletion db/db.columns/testsuite/test_db_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def test_dbcols_list_more_info(self):
)
self.assertEqual(cols, output_list_more_info)

# with semicolumn as separator:
# with semicolon as separator:
cols = read_command(
"db.columns",
table=self.invect,
Expand Down
10 changes: 5 additions & 5 deletions gui/wxpython/core/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,18 +516,18 @@ def __processLayerNvizVolume(self, nvizData, nodeVolume):
if node_res is not None:
nvizData["volume"]["draw"]["resolution"] = {}
for vol_type in ("isosurface", "slice"):
nd = node_res.find(vol_type)
value = int(self.__getNodeText(nd, "value"))
node_el = node_res.find(vol_type)
value = int(self.__getNodeText(node_el, "value"))
nvizData["volume"]["draw"]["resolution"][vol_type] = {
"value": value
}
node_shading = node_draw.find("shading")
if node_shading is not None:
nvizData["volume"]["draw"]["shading"] = {}
for vol_type in ("isosurface", "slice"):
nd = node_shading.find(vol_type)
value = int(self.__getNodeText(nd, "value"))
desc = self.__getNodeText(nd, "desc")
node_el = node_shading.find(vol_type)
value = int(self.__getNodeText(node_el, "value"))
desc = self.__getNodeText(node_el, "desc")
nvizData["volume"]["draw"]["shading"][vol_type] = {
"value": value,
"desc": desc,
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gcp/mapdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def __init__(
# do not init zoom history here, that happens when zooming to map(s)

#
# Re-use dialogs
# Reuse dialogs
#
self.dialogs = {}
self.dialogs["attributes"] = None
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/gmodeler/model_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ def ReformatRegions(self):
self.FormatText(dc, text, rnum)
rnum += 1

def OnSizingEndDragLeft(self, pt, x, y, keys, attch):
ogl.DividedShape.OnSizingEndDragLeft(self, pt, x, y, keys, attch)
def OnSizingEndDragLeft(self, pt, x, y, keys, attach):
ogl.DividedShape.OnSizingEndDragLeft(self, pt, x, y, keys, attach)
self.SetRegionSizes()
self.ReformatRegions()
self.GetCanvas().Refresh()
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/gui_core/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,10 @@ def EntityToComplete(self):
return toComplete

try:
splitted = utils.split(str(entry))
split_items = utils.split(str(entry))
except ValueError: # No closing quotation error
return toComplete
if len(splitted) > 0 and cmd in globalvar.grassCmd:
if len(split_items) > 0 and cmd in globalvar.grassCmd:
toComplete["cmd"] = cmd
if entry[-1] == " ":
words = entry.split(" ")
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/image2target/ii2t_mapdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def __init__(
# do not init zoom history here, that happens when zooming to map(s)

#
# Re-use dialogs
# Reuse dialogs
#
self.dialogs = {}
self.dialogs["attributes"] = None
Expand Down
4 changes: 0 additions & 4 deletions gui/wxpython/iscatt/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ def __init__(
gridSizer = wx.GridBagSizer(vgap=1, hgap=1)

row = 0
setts = {**self.colorsSetts, **self.sizeSetts}

settsOrder = [
"sel_pol",
Expand All @@ -433,7 +432,6 @@ def __init__(
"snap_tresh",
]
for settKey in settsOrder:
sett = setts[settKey]
gridSizer.Add(
settsLabels[settKey], flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, 0)
)
Expand All @@ -454,8 +452,6 @@ def __init__(
ellPolBoxSizer = wx.StaticBoxSizer(ell_box, wx.VERTICAL)
gridSizer = wx.GridBagSizer(vgap=1, hgap=1)

sett = setts[settKey]

row = 0
gridSizer.Add(
self.settings["show_ellips"], flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, 0)
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/lmgr/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def CreateRecentFilesMenu(self, menu=None):
def AddFileToHistory(self, file_path=None):
"""Add file to history (recent files)

:param str file_path: file path wit default arg None
:param str file_path: file path with default arg None

:return None
"""
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/mapdisp/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __init__(
self.printopt = PrintOptions(self, self.MapWindow)

#
# Re-use dialogs
# Reuse dialogs
#
self.dialogs = {}
self.dialogs["attributes"] = None
Expand Down Expand Up @@ -537,7 +537,7 @@ def AddNviz(self):

def Disable3dMode(self):
"""Disables 3D mode (NVIZ) in user interface."""
# TODO: this is broken since item is removed but switch is drived by
# TODO: this is broken since item is removed but switch is driven by
# index
if "3D" in self.toolbars["map"].combo.GetString(1):
self.toolbars["map"].combo.Delete(1)
Expand Down
12 changes: 6 additions & 6 deletions gui/wxpython/modules/colorrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,9 +1391,9 @@ def AddTemporaryColumn(self, type):
idx += 1
self.properties["tmpColumn"] = name + "_" + str(idx)

modul = "v.db.addcolumn" if self.version7 else "v.db.addcol"
module_name = "v.db.addcolumn" if self.version7 else "v.db.addcol"
RunCommand(
modul,
module_name,
parent=self,
map=self.inmap,
layer=self.properties["layer"],
Expand All @@ -1406,9 +1406,9 @@ def DeleteTemporaryColumn(self):
return

if self.inmap:
modul = "v.db.dropcolumn" if self.version7 else "v.db.dropcol"
module_name = "v.db.dropcolumn" if self.version7 else "v.db.dropcol"
RunCommand(
modul,
module_name,
map=self.inmap,
layer=self.properties["layer"],
column=self.properties["tmpColumn"],
Expand Down Expand Up @@ -1475,9 +1475,9 @@ def OnAddColumn(self, event):
self.columnsProp[self.attributeType]["name"]
not in self.fromColumn.GetColumns()
):
modul = "v.db.addcolumn" if self.version7 else "v.db.addcol"
module_name = "v.db.addcolumn" if self.version7 else "v.db.addcol"
RunCommand(
modul,
module_name,
map=self.inmap,
layer=self.properties["layer"],
columns="%s %s"
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/photo2image/ip2i_mapdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def __init__(
# do not init zoom history here, that happens when zooming to map(s)

#
# Re-use dialogs
# Reuse dialogs
#
self.dialogs = {}
self.dialogs["attributes"] = None
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/psmap/instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ def __delitem__(self, id):
continue
if each.type == "map":
# must remove raster, vector layers, labels too
vektor = self.FindInstructionByType("vector", list=True)
vector_list = self.FindInstructionByType("vector", list=True)
vProperties = self.FindInstructionByType("vProperties", list=True)
raster = self.FindInstructionByType("raster", list=True)
labels = self.FindInstructionByType("labels", list=True)
for item in vektor + vProperties + raster + labels:
for item in vector_list + vProperties + raster + labels:
if item in self.instruction:
self.instruction.remove(item)

Expand Down
8 changes: 4 additions & 4 deletions gui/wxpython/psmap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,20 +310,20 @@ def ComputeSetRegion(self, mapDict, env):
if not hasattr(self, "unitConv"):
self.unitConv = UnitConversion(self)

fromM = 1
from_meters = 1
if projInfo()["proj"] != "xy":
fromM = float(projInfo()["meters"])
from_meters = float(projInfo()["meters"])
rectHalfInch = (mapDict["rect"].width / 2, mapDict["rect"].height / 2)
rectHalfMeter = (
self.unitConv.convert(
value=rectHalfInch[0], fromUnit="inch", toUnit="meter"
)
/ fromM
/ from_meters
/ scale,
self.unitConv.convert(
value=rectHalfInch[1], fromUnit="inch", toUnit="meter"
)
/ fromM
/ from_meters
/ scale,
)

Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/rlisetup/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def checkMapExists(name, typ="raster") -> bool:
"""Check if a map already exist in the working mapset"""
env = grass.gisenv()
mapset = env["MAPSET"]
mapp = grass.find_file(name, typ, mapset)
return bool(mapp.name != "")
found_map = grass.find_file(name, typ, mapset)
return bool(found_map.name != "")


def convertFeature(vect, outrast, cat, origrast, layer="1", overwrite=False):
Expand Down
10 changes: 5 additions & 5 deletions gui/wxpython/tplot/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ def _getSTRDdata(self, timeseries):
self.temporalType = mode
return

def _parseVDbConn(self, mapp, layerInp):
def _parseVDbConn(self, map_name, layerInp):
"""find attribute key according to layer of input map"""
vdb = Module("v.db.connect", map=mapp, flags="g", stdout_=PIPE)
vdb = Module("v.db.connect", map=map_name, flags="g", stdout_=PIPE)

vdb = vdb.outputs.stdout
for line in vdb.splitlines():
Expand All @@ -514,9 +514,9 @@ def _parseVDbConn(self, mapp, layerInp):
return lsplit[2]
return None

def _getExistingCategories(self, mapp, cats):
def _getExistingCategories(self, map_name, cats):
"""Get a list of categories for a vector map"""
vdb = gs.read_command("v.category", input=mapp, option="print")
vdb = gs.read_command("v.category", input=map_name, option="print")
categories = vdb.splitlines()
if not cats:
return categories
Expand All @@ -526,7 +526,7 @@ def _getExistingCategories(self, mapp, cats):
message=_(
"Category {ca} is not on vector map"
" {ma} and it will be not used"
).format(ma=mapp, ca=cat),
).format(ma=map_name, ca=cat),
parent=self,
)
cats.remove(cat)
Expand Down
Loading
Loading