Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
558d755
Apply suggested fix to docker/debian/Dockerfile from Copilot Autofix
echoix Jul 2, 2026
a1b3e12
Apply suggested fix to gui/wxpython/lmgr/layertree.py from Copilot Au…
echoix Jul 17, 2026
615addc
Apply suggested fix to python/grass/temporal/metadata.py from Copilot…
echoix Jul 14, 2026
bfe96c1
Apply suggested fix to scripts/d.correlate/tests/d_correlate_test.py …
echoix Jun 22, 2026
86a04a1
Apply suggested fix to scripts/r.in.wms/wms_cap_parsers.py from Copil…
echoix Jul 17, 2026
4007f7d
Apply suggested fix to temporal/t.vect.import/tests/t_vect_import_tes…
echoix Jul 19, 2026
b929463
Potential fix for code scanning alert no. 467: Uncontrolled format st…
echoix Jul 9, 2026
3e009a4
Fix for File is not always closed
echoix Jun 10, 2026
6395a0b
Update scripts/m.proj/m.proj.py
echoix Jun 10, 2026
c03c00e
Fix for File is not always closed
echoix Jun 10, 2026
2207bca
Fix for File is not always closed
echoix Jun 10, 2026
22605cd
Merge branch 'main' into claude/grass-bugfix-consolidation-dbl67u
echoix Sep 5, 2026
91cb4f8
Apply suggested fix to lib/raster3d/tilewrite.c from Copilot Autofix
echoix Jul 15, 2026
11c57bc
lib/raster3d: Add test for Rast3d_write_tile tile index bounds check
wenzeslaus Jul 17, 2026
d71b06a
Apply suggested fix to lib/cairodriver/draw_bitmap.c from Copilot Aut…
echoix Jul 15, 2026
7b55a64
Merge branch 'main' into claude/grass-bugfix-consolidation-dbl67u
echoix Sep 12, 2026
2608568
Merge branch 'main' into claude/grass-bugfix-consolidation-dbl67u
echoix Sep 19, 2026
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: 3 additions & 1 deletion docker/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
ENV LD_LIBRARY_PATH="/usr/local/lib"
ENV LDFLAGS="$MYLDFLAGS"
ENV CFLAGS="$MYCFLAGS"
ENV CXXFLAGS="$MYCXXFLAGS"

Check warning on line 148 in docker/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / build (debian, debian, docker/debian/Dockerfile, GUI=without)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$MYCXXFLAGS' (did you mean $MYCFLAGS?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

# Configure compile and install GRASS
ENV NUMTHREADS=4
Expand Down Expand Up @@ -191,7 +191,9 @@
ENV PROJ_NETWORK=ON

# Create generic GRASS lib name regardless of version number
RUN ln -sf /usr/local/grass86 /usr/local/grass
RUN GRASS_DIR="$(find /usr/local -maxdepth 1 -type d -name 'grass*' ! -name 'grass' | sort | tail -n 1)" && \
test -n "$GRASS_DIR" && \
ln -sfn "$GRASS_DIR" /usr/local/grass

# show GRASS, PROJ, GDAL etc versions
RUN grass --tmp-project EPSG:4326 --exec g.version -rge && \
Expand All @@ -207,7 +209,7 @@

# enable GRASS Python session support
## grass --config python-path
ENV PYTHONPATH="/usr/local/grass/etc/python:${PYTHONPATH}"

Check warning on line 212 in docker/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / build (debian, debian, docker/debian/Dockerfile, GUI=without)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$PYTHONPATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
# enable GRASS ctypes imports
## grass --config path
ENV LD_LIBRARY_PATH="/usr/local/grass/lib:$LD_LIBRARY_PATH"
Expand Down
2 changes: 0 additions & 2 deletions gui/wxpython/lmgr/layertree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,8 +1311,6 @@ def OnPopupGroupOpacityLevel(self, event):
if maplayer and ltype != "command":
break
child = self.GetNextSibling(child)
if child is None:
child, cookie = self.GetNextChild(child, cookie)
current_opacity = maplayer.GetOpacity()
dlg = SetOpacityDialog(
self,
Expand Down
3 changes: 2 additions & 1 deletion lib/cairodriver/draw_bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

#include <grass/glocale.h>
#include <grass/gis.h>

#include "cairodriver.h"

Expand All @@ -37,7 +38,7 @@ void Cairo_Bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
#define MULTIPLE 4
stride = (ncols + (MULTIPLE - 1)) / MULTIPLE * MULTIPLE;
#endif
data = malloc((size_t)stride * nrows);
data = G_malloc((size_t)stride * nrows);
surf = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_A8, ncols,
nrows, stride);

Expand Down
4 changes: 2 additions & 2 deletions python/grass/temporal/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1723,8 +1723,8 @@ def _print_info_body(self, shell: bool = False) -> None:
print(
" | 3D raster register table:... " + str(self.get_raster3d_register())
)
print(" | Top-bottom resolution min:.. " + str(self.get_ewres_min()))
print(" | Top-bottom resolution max:.. " + str(self.get_ewres_max()))
print(" | Top-bottom resolution min:.. " + str(self.get_tbres_min()))
print(" | Top-bottom resolution max:.. " + str(self.get_tbres_max()))
super()._print_info_body(shell)


Expand Down
9 changes: 2 additions & 7 deletions raster/r.what.color/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,8 @@ static int do_value(const char *buf, RASTER_MAP_TYPE type,
switch (outputFormat) {
case PLAIN:
fprintf(stdout, "%d: ", ival);
if (strcmp(fmt, "plain") != 0) {
fprintf(stdout, fmt, red, grn, blu);
}
else {
G_color_to_str(red, grn, blu, colorFormat, color_str);
fprintf(stdout, "%s", color_str);
}
G_color_to_str(red, grn, blu, colorFormat, color_str);
fprintf(stdout, "%s", color_str);
fprintf(stdout, "\n");
break;

Expand Down
8 changes: 8 additions & 0 deletions scripts/d.correlate/tests/d_correlate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ def test_fewer_than_two_maps_is_fatal(xy_raster_dataset_session_mapset, tmp_path
tools.d_correlate(map="map_a")


def test_exactly_two_maps_runs(xy_raster_dataset_session_mapset, tmp_path):
"""d.correlate handles its primary two-map use case without crashing."""
tools = render_tools(xy_raster_dataset_session_mapset, tmp_path)
tools.r_mapcalc(expression="map_a = col()")
tools.r_mapcalc(expression="map_b = row()")
tools.d_correlate(map="map_a,map_b")


def test_more_than_two_maps_runs(xy_raster_dataset_session_mapset, tmp_path):
"""d.correlate handles more than two maps without crashing.

Expand Down
5 changes: 2 additions & 3 deletions scripts/i.oif/i.oif.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ def main():
for v, p in oif:
sys.stdout.write(fmt % (p + (v,)))
else:
outf = open(output, "w")
outf.writelines(fmt % (p + (v,)) for v, p in oif)
outf.close()
with open(output, "w") as outf:
outf.writelines(fmt % (p + (v,)) for v, p in oif)


if __name__ == "__main__":
Expand Down
4 changes: 1 addition & 3 deletions scripts/m.proj/m.proj.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ def main():
if coords:
x, y = coords.split(",")
tmpfile = gcore.tempfile()
fd = open(tmpfile, "w")
fd.write("%s%s%s\n" % (x, ifs, y))
fd.close()
Path(tmpfile).write_text("%s%s%s\n" % (x, ifs, y))
inf = open(tmpfile)
elif input == "-":
infile = None
Expand Down
2 changes: 1 addition & 1 deletion scripts/r.in.wms/wms_cap_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _initLayer(self, layer, parent_layer):
for element in replaced_elements:
elems = layer.findall(self.xml_ns.Ns(element[0]))

if len(elems) != 0 or element[1] == "add":
if len(elems) == 0 or element[1] == "add":
for e in parent_layer.findall(self.xml_ns.Ns(element[0])):
layer.append(e)

Expand Down
5 changes: 2 additions & 3 deletions scripts/r.in.wms/wms_gdal_drv.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,8 @@
xml_file = self._createXML()

# print xml file content for debug level 1
file = open(xml_file)
gs.debug("WMS request XML:\n%s" % file.read(), 1)
file.close()
with open(xml_file) as file:

Check failure on line 158 in scripts/r.in.wms/wms_gdal_drv.py

View workflow job for this annotation

GitHub Actions / Python Code Quality Checks (ubuntu-24.04)

ruff (FURB101)

scripts/r.in.wms/wms_gdal_drv.py:158:14: FURB101 `open` and `read` should be replaced by `Path(xml_file).read_text()` help: Replace with `Path(xml_file).read_text()`
gs.debug("WMS request XML:\n%s" % file.read(), 1)

if self.proxy:
gdal.SetConfigOption("GDAL_HTTP_PROXY", str(self.proxy))
Expand Down
11 changes: 5 additions & 6 deletions scripts/v.import/v.import.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,11 @@ def main():

TMPLOC = gs.append_node_pid("tmp_v_import_location")

f = open(SRCGISRC, "w")
f.write("MAPSET: PERMANENT\n")
f.write("GISDBASE: %s\n" % GISDBASE)
f.write("LOCATION_NAME: %s\n" % TMPLOC)
f.write("GUI: text\n")
f.close()
with open(SRCGISRC, "w") as f:
f.write("MAPSET: PERMANENT\n")
f.write("GISDBASE: %s\n" % GISDBASE)
f.write("LOCATION_NAME: %s\n" % TMPLOC)
f.write("GUI: text\n")

# create temp location from input without import
gs.verbose(_("Creating temporary project for <%s>...") % OGRdatasource)
Expand Down
2 changes: 2 additions & 0 deletions temporal/t.vect.import/tests/t_vect_import_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
)
info = _stvds_tinfo(tools, output)
assert info["temporal_type"] == "absolute"
assert info["start_time"] == "2001-01-01 00:00:00"

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / macOS build

test_import_formats[pack-bzip2] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / macOS build

test_import_formats[pack-gzip] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / macOS build

test_import_formats[pack-no] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / macOS build

test_import_formats[GML-no] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / macOS build

test_import_formats[GML-gzip] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / macOS build

test_import_formats[GML-bzip2] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / pytest (ubuntu-24.04, 3.13)

test_import_formats[pack-bzip2] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / pytest (ubuntu-24.04, 3.13)

test_import_formats[pack-gzip] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / pytest (ubuntu-24.04, 3.13)

test_import_formats[pack-no] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / pytest (ubuntu-24.04, 3.13)

test_import_formats[GML-no] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / pytest (ubuntu-24.04, 3.13)

test_import_formats[GML-gzip] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +

Check failure on line 56 in temporal/t.vect.import/tests/t_vect_import_test.py

View workflow job for this annotation

GitHub Actions / pytest (ubuntu-24.04, 3.13)

test_import_formats[GML-bzip2] assert "'2001-01-01 00:00:00'" == '2001-01-01 00:00:00' - 2001-01-01 00:00:00 + '2001-01-01 00:00:00' ? + +
assert info["end_time"] == "2001-04-01 00:00:00"
assert info["number_of_maps"] == 3


Expand Down
Loading