-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RC_v1.5.0 API docs broken #297
Comments
autodoc seems to run into an import error:
|
OK, now I read further:
The problem comes with the fact that we mock all python libs like numpy and this appear to be in conflict with the variable definition using type hints. @freemansw1 : You could try out |
I tried that @fsenf @freemansw1 and the API looks fine when I locally build the page, but it does not seem to do the job (https://tobac--303.org.readthedocs.build/en/303/tobac.html ). The pull requests that have not merged in the period boundary changes seem to work, e.g. We forgot indeed to add |
Hi, I was able to reproduce the bug in a clean setup using the description here: https://github.com/tobac-project/tobac-tutorials/blob/main/docs/Testing-Sphinx-based-Rendering.md up to the end of Section 1 (replacing tobac-tutorials with tobac). Some additional commands: pip install sphinx_rtd_theme
sphinx-build -b html doc doc/_build/html Last command also fails with
|
|
SOLUTION: The API doc come back again if we do not mock numpy: > git diff
diff --git a/doc/conf.py b/doc/conf.py
index 0f5e48e..e897fd7 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -43,7 +43,7 @@ def setup(app):
# This should include all modules used in tobac. These are dummy imports,
# but should include both required and optional dependencies.
autodoc_mock_imports = [
- "numpy",
+# "numpy",
"scipy",
"scikit-image",
"pandas",
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 82f69f7..6ba789a 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,2 +1,3 @@
ipykernel
nbsphinx
+numpy |
@freemansw1 @w-k-jones @JuliaKukulies : Can we afford to install numpy at each readthedocs re-rendering? I think, yes. What do you think? |
Would it be possible to switch to using |
Yes, this works! But
|
Resolved with #305 |
https://tobac.readthedocs.io/en/rc_v1.5.0/tobac.html
The text was updated successfully, but these errors were encountered: