diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a0a2f2..eee8676 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.readthedocs.yml b/.readthedocs.yml index f0c6c81..ea3dd1d 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -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 diff --git a/docs/source/conf.py b/docs/source/conf.py index 529c51e..a68c509 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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 diff --git a/environment-docs.yml b/environment-docs.yml deleted file mode 100644 index a30796f..0000000 --- a/environment-docs.yml +++ /dev/null @@ -1,10 +0,0 @@ -# conda env create -f environment-docs.yml -name: shearwater-docs -channels: -- conda-forge -- defaults -dependencies: -- pywps>=4.4 -- sphinx -- nbsphinx -- ipython diff --git a/environment.yml b/environment.yml index c8189f8..6465ca6 100644 --- a/environment.yml +++ b/environment.yml @@ -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 diff --git a/requirements.txt b/requirements.txt index 6cba2cd..4a3dfd5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ click jinja2 psutil -pywps>=4.5.1,<4.6 +pywps>=4.5.1,<4.7 intake intake-esm pydantic<2