Skip to content

Commit

Permalink
Fix warning in docs and enable strict build mode
Browse files Browse the repository at this point in the history
add work around for crs<->geom dependency.
enable warnings are errors mode for doc building.
  • Loading branch information
Kirill888 committed Feb 8, 2022
1 parent 4691496 commit c342091
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Makefile
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS ?= -W
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
Expand Down
Empty file added docs/_static/.gitkeep
Empty file.
10 changes: 10 additions & 0 deletions docs/conf.py
Expand Up @@ -16,6 +16,16 @@
sys.path.insert(0, os.path.abspath(".."))
import odc.geo

# Work-around for type annotation failing due to guarded imports.
# Some methods in crs return geom types, but geom depends on crs
# so geom import into crs is only done during typechecking.
# by patching it here we enable typehinting to find correct types
# for crs methods that return geometries.
import odc.geo.crs
import odc.geo.geom

odc.geo.crs.geom = odc.geo.geom

# -- Project information -----------------------------------------------------

project = "odc-geo"
Expand Down

0 comments on commit c342091

Please sign in to comment.