Skip to content

Commit

Permalink
Merge branch 'grass8' into t.stac-lazy-load
Browse files Browse the repository at this point in the history
  • Loading branch information
cwhite911 committed Sep 22, 2024
2 parents a254b92 + ba12cae commit 22048cf
Show file tree
Hide file tree
Showing 25 changed files with 883 additions and 496 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
exclude: mswindows .*\.bat .*/testsuite/data/.*

- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/apt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ libgdal-dev
libgl1-mesa-dev
libglu1-mesa-dev
libnetcdf-dev
libopenblas-dev
liblapacke-dev
libpng-dev
libproj-dev
libreadline-dev
libudunits2-dev
libudunits2-data
libzstd-dev
proj-bin
pdal
sqlite3
subversion
udunits-bin
zlib1g-dev
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Set up Python ${{ matrix.python-version }} as default Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -102,6 +102,8 @@ jobs:
run: |
GDAL_VERSION="$(gdal-config --version)"
export GDAL_VERSION
UDUNITS2_XML_PATH=/usr/share/xml/udunits/udunits2.xml
export UDUNITS2_XML_PATH
pip install -r grass-addons/.github/workflows/extra_requirements.txt
- name: Set up R
Expand All @@ -119,7 +121,7 @@ jobs:
../.github/workflows/test.sh
- name: Make HTML test report available
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
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 @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@caa179272c6ee7f1d25dfb503ee0c410c26ebd98 # v0.18.1
- uses: DoozyX/clang-format-lint-action@c71d0bf4e21876ebec3e5647491186f8797fde31 # v0.18.2
with:
source: "."
clangFormatVersion: 18.1.8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/extra_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ pandas
scikit-learn
GDAL==${GDAL_VERSION}
pygbif
cf_units
cf_units @ git+https://github.com/SciTools/cf-units@f57a7f1fdba4e9424e4dbbc01b614e521a88086c
thredds_crawler
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h3>List filtered products</h3>
g.region n=42 w=12 s=41 e=13 res=0:01 -p
i.sentinel.download -l settings=credentials.txt producttype=S2MSI2A start=2018-01-01 end=2018-12-31 clouds=1 footprints=s2_scenes_footprints

Writing footprints into <s2_scenes_footprints>...
Writing footprints into &lt;s2_scenes_footprints&lt;...
197 scene(s) found.
[...]
S2B_MSIL2A_20180210T100139_N9999_R122_T32TQM_20221022T182154 2018-02-10T10:01:39 0% S2MSI2A 0.98 GB
Expand All @@ -207,6 +207,7 @@ <h3>List filtered products</h3>
S2A_MSIL2A_20181023T100051_N9999_R122_T33TTG_20221023T032324 2018-10-23T10:00:51 0% S2MSI2A 0.99 GB
S2A_MSIL2A_20181205T101401_N9999_R022_T32TQM_20221022T180259 2018-12-05T10:14:01 0% S2MSI2A 625.52 MB
[...]
</pre></div>
<p>
Find Sentinel-2 L1C products (S2MSI1C) of <b>last 60 days</b> (default) covering current computation region extent:

Expand Down Expand Up @@ -282,7 +283,7 @@ <h3>Download Sentinel products by ID</h3>

<div class="code"><pre>
i.sentinel.download settings=credentials.txt id=S2B_MSIL2A_20180210T100139_N9999_R122_T32TQM_20221022T182154 output=s2_data/
<pre></div>
</pre></div>

<h2>REQUIREMENTS</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
# %option G_OPT_V_OUTPUT
# % key: footprints
# % description: Name for output vector map with footprints
# % label: Only supported for download from ESA_Copernicus Open Access Hub
# % required: no
# % guisection: Output
# %end
Expand All @@ -53,7 +52,6 @@
# % key: area_relation
# % type: string
# % description: Spatial relation of footprint to AOI
# % label: ESA Copernicus Open Access Hub allows all three, USGS Earth Explorer only 'Intersects' option
# % options: Intersects,Contains,IsWithin
# % answer: Intersects
# % required: no
Expand All @@ -70,7 +68,6 @@
# % key: producttype
# % type: string
# % description: Sentinel product type to filter
# % label: USGS Earth Explorer only supports S2MSI1C
# % required: no
# % options: SLC,GRD,OCN,S2MSI1C,S2MSI2A,S3OL1EFR,S3OL1ERR,S3OL1SPC,S3SL1RBT,S3OL2WFR,S3OL2WRR,S3OL2LFR,S3OL2LRR,S3SL2LST,S3SL2FRP,S3SY2SYN,S3SY2VGP,S3SY2VG1,S3SY2V10,S3SY2AOD,S3SR2LAN
# % answer: S2MSI2A
Expand Down Expand Up @@ -98,7 +95,6 @@
# % key: query
# % type: string
# % description: Extra search keywords to use in the query
# % label: USGS Earth Explorer only supports query options "identifier", "filename" (in ESA name format) or "usgs_identifier" (in USGS name format)
# % guisection: Filter
# %end
# %option
Expand All @@ -113,7 +109,6 @@
# % type: integer
# % multiple: yes
# % description: Relative orbit number to download (Sentinel-1: from 1 to 175; Sentinel-2: from 1 to 143; Sentinel-3: from 1 to 385)
# % label:_Only supported by ESA Copernicus Open Access Hub.
# % guisection: Filter
# %end
# %option
Expand Down Expand Up @@ -174,7 +169,7 @@
# %rules
# % requires: -b,map
# % required: output,-l,-p
# % excludes: id,map,area_relation,clouds,producttype,start,end,limit,query,sort,order
# % excludes: id,map,area_relation,clouds,start,end,limit,query,sort,order
# % excludes: -p,-l
# %end

Expand Down Expand Up @@ -429,6 +424,8 @@ def main():
id=options["id"],
output=outdir,
provider=eodag_provider,
producttype=options["producttype"],
footprints=options["footprints"],
)
)
except CalledModuleError:
Expand Down
10 changes: 5 additions & 5 deletions src/raster/r.learn.ml2/r.learn.train/r.learn.train.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,11 @@ def main():
try:
import sklearn

if sklearn.__version__ < "0.20":
gs.fatal("Package python3-scikit-learn 0.20 or newer is not installed")
if sklearn.__version__ < "1.2.2":
gs.fatal("Package python3-scikit-learn 1.2.2 or newer is not installed")

except ImportError:
gs.fatal("Package python3-scikit-learn 0.20 or newer is not installed")
gs.fatal("Package python3-scikit-learn 1.2.2 or newer is not installed")

try:
import pandas as pd
Expand Down Expand Up @@ -683,15 +683,15 @@ def main():

# one-hot encoding
elif norm_data is False and category_maps is not None:
enc = OneHotEncoder(handle_unknown="ignore", sparse=False)
enc = OneHotEncoder(handle_unknown="ignore", sparse_output=False)
trans = ColumnTransformer(
remainder="passthrough", transformers=[("onehot", enc, stack.categorical)]
)

# standardization and one-hot encoding
elif norm_data is True and category_maps is not None:
scaler = StandardScaler()
enc = OneHotEncoder(handle_unknown="ignore", sparse=False)
enc = OneHotEncoder(handle_unknown="ignore", sparse_output=False)
trans = ColumnTransformer(
remainder="passthrough",
transformers=[
Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.sun.daily/r.sun.daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
# % key_desc: float
# % type: double
# % description: A single value of the Linke atmospheric turbidity coefficient [-]
# % options: 0.0-7.0
# % options: 0.0-
# % answer: 3.0
# % required : no
# %end
Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.sun.hourly/r.sun.hourly.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# % key: linke_value
# % type: double
# % description: A single value of the Linke atmospheric turbidity coefficient [-]
# % options: 0.0-7.0
# % options: 0.0-
# % answer: 3.0
# % required: no
# %end
Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.vif/r.vif.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def compute_vif(mapx, mapy):
unused, resid = np.linalg.lstsq(x_i, mapy, rcond=None)[:2]
if resid.size == 0:
resid = 0
r2 = float(1 - resid / (mapy.size * mapy.var()))
r2 = float(1 - resid[0] / (mapy.size * mapy.var()))
if float(r2) > 0.9999999999:
vif = float("inf")
sqrtvif = float("inf")
Expand Down
10 changes: 9 additions & 1 deletion src/temporal/t.rast.import.netcdf/t.rast.import.netcdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ <h2>DESCRIPTION</h2>
can be imported via <em>r.in.gdal</em> or linked with <em>r.external</em>.

<p>
<em>t.rast.import.netcdf</em> can use GDALs Virtual Raster format (VRT) if data's
<em>t.rast.import.netcdf</em> uses GDALs Virtual Raster format (VRT) if data's
Coordinate Reference system differs from the one of the current location where they
are supposed to be imported.

<p>
Reprojection on import is done using GDAL warp if necessary. In that case,
users should be aware of the extent and resolution of the data to import
and the current computational region. Import is limited to and aligned with
the current computational region, if the <b>r-flag</b> is set. Otherwise,
extent and resolution in the target CRS is guessed by GDAL. Import of global
data to coordinate systems that do not support that extent will thus fail.

<p>
Starting with GRASS GIS version 8.0, different variables or subdatasets in a
NetCDF file can be imported as "semantic_label" into one STRDS. To achieve this,
Expand Down
Loading

0 comments on commit 22048cf

Please sign in to comment.