Skip to content

Commit b5a0d2d

Browse files
authored
Fix documentation warnings (#597)
1 parent 651407e commit b5a0d2d

File tree

7 files changed

+23
-13
lines changed

7 files changed

+23
-13
lines changed

doc/source/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
# To raise a Sphinx build error on notebook failure
5353
nb_execution_raise_on_error = True # To fail documentation build on notebook execution error
5454
nb_execution_show_tb = True # To show full traceback on notebook execution error
55+
nb_output_stderr = "warn" # To warn if an error is raised in a notebook cell (if intended, override to "show" in cell)
5556

5657
intersphinx_mapping = {
5758
"python": ("https://docs.python.org/", None),

doc/source/core_lazy_load.md

+5
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ For instance, using any {class}`~geoutils.Raster` or {class}`~geoutils.Vector` a
5757
always conserve the lazy loading of that match-reference object.
5858

5959
```{code-cell} ipython3
60+
---
61+
mystnb:
62+
output_stderr: show
63+
---
64+
6065
# Use a smaller Raster as reference to crop the initial one
6166
smaller_rast = gu.Raster(gu.examples.get_path("everest_landsat_b4_cropped"))
6267
rast.crop(smaller_rast)

doc/source/geotransformations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ and resolution:
104104
```{code-cell} ipython3
105105
---
106106
mystnb:
107-
output_stderr: warn
107+
output_stderr: show
108108
---
109109
# Reproject vector to CRS of raster by simply passing the raster
110110
rast_reproj2 = rast.reproject(rast2)

doc/source/quick_start.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,15 @@ a buffer of the vector, perform calculations on the modified raster, and finally
5454
:class: margin
5555
5656
**We notice a ``Userwarning``:** No nodata value was defined in the GeoTIFF file, so GeoUtils automatically defined
57-
one compatible with the data type to use during operations.
57+
one compatible with the data type derived during operations.
5858
```
5959

6060
```{code-cell} ipython3
61+
---
62+
mystnb:
63+
output_stderr: show
64+
---
65+
6166
import geoutils as gu
6267
6368
# Examples files: paths to a GeoTIFF file and an ESRI shapefile

doc/source/vector_class.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,21 @@ These behaviours aim to simplify the analysis of vectors, removing the need to o
9898
({class}`geopandas.GeoDataFrame`, {class}`geopandas.GeoSeries`, {class}`shapely.Geometry`, {class}`pandas.Series`).
9999

100100
```{code-cell} ipython3
101-
:tags: [hide-output]
102-
103101
# Example of method with geometric output
104102
vect.boundary
105103
```
106104

107105
```{code-cell} ipython3
108-
:tags: [hide-output]
106+
---
107+
mystnb:
108+
output_stderr: show
109+
---
109110
110111
# Example of method with non-geometry output
111112
vect.area
112113
```
113114

114115
```{code-cell} ipython3
115-
:tags: [hide-output]
116-
117116
# Example of method with other output type
118117
vect.to_json()
119118
```

geoutils/raster/multiraster.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ def load_multiple_rasters(
2626
Optionally, reproject all rasters to the grid of one raster set as reference (after optional crop).
2727
Otherwise, simply load the full rasters.
2828
29-
:param raster_paths: List of paths to the rasters to be loaded
30-
:param crop: if set to True, will only load rasters in the area they intersect
29+
:param raster_paths: List of paths to the rasters to be loaded.
30+
:param crop: If set to True, will only load rasters in the area they intersect.
3131
:param ref_grid: If set to an integer value, the raster with that index will be considered as the reference
32-
and all other rasters will be reprojected on the same grid (after optional crop)
33-
:param kwargs: optional arguments to be passed to Raster.reproject, e.g. the resampling method
32+
and all other rasters will be reprojected on the same grid (after optional crop).
33+
:param kwargs: Optional arguments to be passed to Raster.reproject, e.g. the resampling method.
3434
35-
:returns: a list of loaded Raster instances
35+
:returns: List of loaded Raster instances.
3636
"""
3737
# If ref_grid is provided, need to reproject
3838
if isinstance(ref_grid, int):

geoutils/raster/raster.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3686,7 +3686,7 @@ def interp_points(
36863686
of shift_area_or_point for more details.
36873687
36883688
:param points: Point(s) at which to interpolate raster value (tuple of X/Y array-likes). If points fall
3689-
outside of image, value returned is nan.
3689+
outside of image, value returned is nan.
36903690
:param method: Interpolation method, one of 'nearest', 'linear', 'cubic', or 'quintic'. For more information,
36913691
see scipy.ndimage.map_coordinates and scipy.interpolate.interpn. Default is linear.
36923692
:param band: Band to use (from 1 to self.count).

0 commit comments

Comments
 (0)