Skip to content

Commit

Permalink
fixed docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Nov 17, 2023
1 parent f814f6b commit 629a453
Showing 6 changed files with 54 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
@@ -32,8 +32,8 @@ jobs:
run: make test
- name: Lint with flake8 ⚙️
run: make lint
if: matrix.python-version == 3.7
if: matrix.python-version == 3.8
- name: Build docs 🏗️
run: make docs
if: false
if: matrix.python-version == 3.8

4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ build:
python: "mambaforge-22.9"

conda:
environment: environment-docs.yml
environment: environment.yml

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: requirements_docs.txt
- requirements: requirements_dev.txt
60 changes: 45 additions & 15 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -50,22 +50,52 @@
# To avoid having to install these and burst memory limit on ReadTheDocs.
# List of all tested working mock imports from all birds so new birds can
# inherit without having to test which work which do not.
autodoc_mock_imports = ["numpy", "xarray", "fiona", "rasterio", "shapely",
"osgeo", "geopandas", "pandas", "statsmodels",
"affine", "rasterstats", "spotpy", "matplotlib",
"scipy", "unidecode", "gdal", "sentry_sdk", "dask",
"numba", "parse", "siphon", "sklearn", "cftime",
"netCDF4", "bottleneck", "ocgis", "geotiff", "geos",
"hdf4", "hdf5", "zlib", "pyproj", "proj", "cartopy",
"scikit-learn", "cairo"]
autodoc_mock_imports = [
"numpy",
"xarray",
"fiona",
"rasterio",
"shapely",
"osgeo",
"geopandas",
"pandas",
"statsmodels",
"affine",
"rasterstats",
"spotpy",
"matplotlib",
"scipy",
"unidecode",
"gdal",
"sentry_sdk",
"dask",
"numba",
"parse",
"siphon",
"sklearn",
"cftime",
"netCDF4",
"bottleneck",
"ocgis",
"geotiff",
"geos",
"hdf4",
"hdf5",
"zlib",
"pyproj",
"proj",
"cartopy",
"scikit-learn",
"cairo",
]

# Monkeypatch constant because the following are mock imports.
# Only works if numpy is actually installed and at the same time being mocked.
#import numpy
#numpy.pi = 3.1416
# import numpy
# numpy.pi = 3.1416

# We are using mock imports in readthedocs, so probably safer to not run the notebooks
nbsphinx_execute = 'never'
nbsphinx_execute = "never"

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
@@ -89,16 +119,16 @@
# the built documents.
#
# The short X.Y version.
version = shearwater.__version__
version = "0.1.0"
# The full version, including alpha/beta/rc tags.
release = shearwater.__version__
release = "0.1.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@@ -112,7 +142,7 @@
todo_include_todos = False

# Suppress "WARNING: unknown mimetype for ..." when building EPUB.
suppress_warnings = ['epub.unknown_project_files']
suppress_warnings = ["epub.unknown_project_files"]

# Avoid "configuration.rst:4:duplicate label configuration, other instance in configuration.rst"
autosectionlabel_prefix_document = True
10 changes: 0 additions & 10 deletions environment-docs.yml

This file was deleted.

5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ channels:
- defaults
dependencies:
- pip
- python>=3.7,<3.10
- pywps>=4.5.1,<4.6
- python>=3.8,<3.12
- pywps>=4.5.1,<4.7
- jinja2
- click
- psutil
@@ -16,3 +16,4 @@ dependencies:
- aiohttp
# tests
- pytest
- pandoc
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
click
jinja2
psutil
pywps>=4.5.1,<4.6
pywps>=4.5.1,<4.7
intake
intake-esm
pydantic<2

0 comments on commit 629a453

Please sign in to comment.