jbusecke / cookiecutter-science-project

Cookiecutter template for science analysis projects
MIT License
84 stars 13 forks source link

Fixed readthedocs error #36

Closed lukegre closed 3 years ago

lukegre commented 3 years ago

Readthedocs couldn't import the package, so versioning and API docs couldn't be built.

Changed .readthedocs.yaml so that setuptools installs from . instead of package

lukegre commented 3 years ago

This is a really great template BTW!

jbusecke commented 3 years ago

Hey @lukegre thanks for checking this out.

Before merging I would like to understand more why this was failing. Is there a change to rtd that makes this necessary?

lukegre commented 3 years ago

My understanding (which is quite limited for this topic 😅) is that setuptools is able to install the package from setup.py in the package root directory (.). The path package doesn't contain a setup.py file. Without the package installed, the package version couldn't be fetched and autodoc couldn't build the API docs.

But I'm not sure why I would have been the only one to get this problem 🤔

lukegre commented 3 years ago

I was going to say I'm all for pip but after looking at the cmip_preprocessing RTD troubles I'm having second thoughts. There might be issues if more complex/non-Python packages are required (e.g., cartopy)? This might lead to RTD build failures.

jbusecke commented 3 years ago

It took me like a month to figure out this crap over at https://github.com/jbusecke/cmip6_preprocessing/pull/115, but you were absolutely right. Thanks again @lukegre