aospy icon indicating copy to clipboard operation
aospy copied to clipboard

Python errors in docs builds

Open spencerahill opened this issue 5 years ago • 1 comments

Even though the HTML files are being built successfully, there are some python errors in the code blocks we have embedded in the docs: https://dev.azure.com/spencerahill/aospy/_build/results?buildId=26&view=logs. For example:

WARNING:root:Skipping aospy calculation `<aospy.Calc instance: precip_total, example_proj, example_model, example_run>` due to error with the following traceback: 
Traceback (most recent call last):
…  File "/usr/share/miniconda/envs/aospy-tests/lib/python3.6/site-packages/xarray/backends/api.py", line 611, in <listcomp>
    datasets = [open_(p, **open_kwargs) for p in paths]
TypeError: open_dataset() got an unexpected keyword argument 'combine'

Been awhile since we touched this code, so I suspect it's a dependencies/deprecation/etc. issue.

spencerahill avatar Oct 02 '19 16:10 spencerahill

Indeed, it looks like the version of xarray the docs are built with is out of date (we probably pinned it at some time).

https://github.com/spencerahill/aospy/blob/master/doc/environment.yml

name: aospy_docs
channels:
  - conda-forge
dependencies:
  - python=3.6
  - sphinx=1.7.6
  - sphinx_rtd_theme
  - numpy=1.14.5
  - numpydoc=0.8.0
  - scipy=1.1.0
  - pandas=0.23.3
  - netCDF4=1.4.0
  - xarray=0.11.0
  - ipython=6.4.0
  - matplotlib=2.2.2
  - cftime=1.0.0
  - dask=1.1.5

spencerkclark avatar Oct 02 '19 16:10 spencerkclark