Skip to content

Commit

Permalink
Merge branch 'OSGeo:grass8' into grass8
Browse files Browse the repository at this point in the history
  • Loading branch information
ecodiv authored Oct 21, 2024
2 parents e240657 + b24bf40 commit b40800f
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout repository contents
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 31

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
# renovate: datasource=python-version depName=python
PYTHON_VERSION: "3.12"
# renovate: datasource=pypi depName=black
BLACK_VERSION: "24.8.0"
BLACK_VERSION: "24.10.0"
permissions: {}
jobs:
run-black:
Expand All @@ -30,7 +30,7 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
persist-credentials: false
- name: Set up Python
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ jobs:

steps:
- name: Checkout core
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
repository: OSGeo/grass
ref: ${{ matrix.grass-version }}
path: grass

- name: Checkout addons
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
path: grass-addons

Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
../.github/workflows/test.sh
- name: Make HTML test report available
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: testreport-grass-${{ matrix.grass-version }}-python-${{ matrix.python-version }}
path: grass-addons/src/testreport
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@c71d0bf4e21876ebec3e5647491186f8797fde31 # v0.18.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# To report GitHub Actions status checks
statuses: write
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: |
Expand Down Expand Up @@ -29,7 +29,7 @@ repos:
- id: markdownlint-fix
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black-jupyter
- repo: https://github.com/pycqa/flake8
Expand Down
2 changes: 1 addition & 1 deletion src/imagery/i.eodag/i.eodag.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def get_aoi(vector=None):
if "+proj" not in proj:
gs.fatal(_("Unable to get AOI: unprojected location not supported"))

if vector not in gs.parse_command("g.list", type="vector"):
if not gs.find_file(vector, element="vector")["file"]:
gs.fatal(
_("Unable to get AOI: vector map <{}> could not be found".format(vector))
)
Expand Down
20 changes: 16 additions & 4 deletions src/raster/r.buildvrt.gdal/r.buildvrt.gdal.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@


def get_raster_gdalpath(
map_name, check_linked=True, has_grasadriver=False, gis_env=None
map_name, check_linked=True, has_grassdriver=False, gis_env=None
):
"""Get the GDAL-readable path to a GRASS GIS raster map
Expand All @@ -102,7 +102,7 @@ def get_raster_gdalpath(
return str(gdal_path)

# Get native GRASS GIS format header
if not has_grasadriver:
if not has_grassdriver:
gs.fatal(
_(
"The GDAL-GRASS GIS driver is unavailable. "
Expand All @@ -127,6 +127,8 @@ def main():
global gdal
try:
from osgeo import gdal

gdal.UseExceptions()
except ImportError:
gs.fatal(
_(
Expand All @@ -153,7 +155,10 @@ def main():
if len(inputs) < 1:
gs.fatal(_("At least one input map is required".format(inputs[0])))

inputs = [get_raster_gdalpath(raster_map, gis_env=gisenv) for raster_map in inputs]
inputs = [
get_raster_gdalpath(raster_map, has_grassdriver=has_grassdriver, gis_env=gisenv)
for raster_map in inputs
]

# Get output
output = options["output"]
Expand All @@ -170,7 +175,14 @@ def main():
# Create GDAL VRT
vrt_path = str(vrt_dir / f"{output}.vrt")
gs.verbose(_("Creating GDAL VRT '{}'.").format(vrt_path))
gdal.BuildVRT(vrt_path, inputs)
try:
gdal.BuildVRT(vrt_path, inputs)
except OSError:
gs.fatal(
_("Failed to build VRT {vrt} with inputs <{in_files}>").format(
vrt=vrt_path, in_file=", ".join(inputs)
)
)

# Import (link) GDAL VRT
gs.run_command(
Expand Down
2 changes: 1 addition & 1 deletion src/temporal/t.stac/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pystac==1.10.1
pystac==1.11.0
pystac_client==0.8.3
tqdm==4.66.5
8 changes: 4 additions & 4 deletions src/vector/v.kriging/utils_kriging.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ void crossvalidation(struct int_par *xD, struct points *pnts,
correct_indices(direction, list, r, pnts, var_par);

GM_sub = submatrix(list, GM,
&xD->report); // create submatrix using indices
xD->report); // create submatrix using indices
GM_Inv = G_matrix_inverse(GM_sub); // inverse matrix
G_matrix_free(GM_sub);

Expand Down Expand Up @@ -834,8 +834,8 @@ int compare_NN(struct ilist *list, struct ilist *list_new, int modified)
{
// local variables
int n = list->n_values, n_new = list_new->n_values;
double *list_value = list->value;
double *list_new_value = list_new->value;
int *list_value = list->value;
int *list_new_value = list_new->value;

int i, next = 0; // the samples are different

Expand All @@ -859,7 +859,7 @@ void make_subsamples(struct int_par *xD, struct ilist *list, double *r0,
// Local variables
int i3 = xD->i3;
double *vals = pnts->invals;
struct write *report = &xD->report;
struct write *report = xD->report;

int direction;
mat_struct *GM_sub;
Expand Down
4 changes: 2 additions & 2 deletions src/vector/v.kriging/utils_raster.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* open raster layer */
void open_layer(struct int_par *xD, struct reg_par *reg, struct output *out)
{
struct write *report = &xD->report;
struct write *report = xD->report;

/* 2D Raster layer */
if (xD->i3 == FALSE) {
Expand Down Expand Up @@ -34,7 +34,7 @@ void write2layer(struct int_par *xD, struct reg_par *reg, struct output *out,
// Local variables
int i3 = xD->i3;
int ndeps = reg->ndeps, nrows = reg->nrows, ncols = reg->ncols;
struct write *report = &xD->report;
struct write *report = xD->report;

int col, row, dep;
int pass = 0; /* Number of processed cells */
Expand Down

0 comments on commit b40800f

Please sign in to comment.