-
Notifications
You must be signed in to change notification settings - Fork 15
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
Save previous commits from refresh-cookiecutter-for-more-robust-doc-build branch #337
Merged
tlvu
merged 10 commits into
master
from
save-previous-refresh-cookiecutter-for-more-robust-doc-build-branch
Jul 29, 2020
Merged
Save previous commits from refresh-cookiecutter-for-more-robust-doc-build branch #337
tlvu
merged 10 commits into
master
from
save-previous-refresh-cookiecutter-for-more-robust-doc-build-branch
Jul 29, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To avoid having to harcode new dev branch name each time to trigger Travis-CI or having to create PR too early to trigger Travis-CI and spam everyone in the process. I just want to test my changes on Travis-CI automatically.
numpy existed in Raven because we install xclim in Raven. $ make docs Generating docs with Sphinx ... make[1]: Entering directory '/zstore/repos/flyingpigeon/docs' Removing everything under 'build'... Running Sphinx v3.1.2 Configuration error: There is a programmable error in your configuration file: Traceback (most recent call last): File "/home/lvu/.conda/envs/flyingpigeon-docs/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file execfile_(filename, namespace) File "/home/lvu/.conda/envs/flyingpigeon-docs/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 88, in execfile_ exec(code, _globals) File "/zstore/repos/flyingpigeon/docs/source/conf.py", line 71, in <module> import numpy ModuleNotFoundError: No module named 'numpy' Makefile:20: recipe for target 'html' failed make[1]: *** [html] Error 2 make[1]: Leaving directory '/zstore/repos/flyingpigeon/docs' Makefile:147: recipe for target 'docs' failed make: *** [docs] Error 2
Using anonymous reference instead (double underscore). Warning, treated as error: ../README.rst:2:Duplicate explicit target name: "wikipedia". Makefile:20: recipe for target 'html' failed make[1]: *** [html] Error 2 make[1]: Leaving directory '/zstore/repos/flyingpigeon/docs' Makefile:147: recipe for target 'docs' failed make: *** [docs] Error 2
Basically file `spatial_analogs.rst` is processed standalone and then part of `processes_des.rst` resulting in duplicate reference of `Roy2017` that appears only in `spatial_analogs.rst`. Renamed to `spatial_analogs.rst.inc` to avoid that file being processed standalone. It should be fine since that file is not referred anywhere in the toctree so it did not have direct reference to it before. Warning, treated as error: /zstore/repos/flyingpigeon/docs/source/spatial_analogs.rst:65:duplicate citation Roy2017, other instance in /zstore/repos/flyingpigeon/docs/source/processes_des.rst Makefile:20: recipe for target 'html' failed make[1]: *** [html] Error 2 make[1]: Leaving directory '/zstore/repos/flyingpigeon/docs' Makefile:147: recipe for target 'docs' failed make: *** [docs] Error 2
Warning, treated as error: /zstore/repos/flyingpigeon/docs/source/tutorial.rst:document isn't included in any toctree Makefile:20: recipe for target 'html' failed make[1]: *** [html] Error 2 make[1]: Leaving directory '/zstore/repos/flyingpigeon/docs' Makefile:147: recipe for target 'docs' failed make: *** [docs] Error 2
…llowing anonymous links Warning, treated as error: /zstore/repos/flyingpigeon/flyingpigeon/processes/wps_subset_continents.py:docstring of flyingpigeon.processes.wps_subset_continents.SubsetcontinentProcess:16:Duplicate explicit target name: "doc". Makefile:20: recipe for target 'html' failed make[1]: *** [html] Error 2 make[1]: Leaving directory '/zstore/repos/flyingpigeon/docs' Makefile:147: recipe for target 'docs' failed make: *** [docs] Error 2 All warnings fixed: /home/docs/checkouts/readthedocs.org/user_builds/flyingpigeon/checkouts/test-rtd-build/flyingpigeon/processes/wps_subset_continents.py:docstring of flyingpigeon.processes.wps_subset_continents.SubsetcontinentProcess:16: WARNING: Duplicate explicit target name: "doc". /home/docs/checkouts/readthedocs.org/user_builds/flyingpigeon/checkouts/test-rtd-build/flyingpigeon/processes/wps_subset_countries.py:docstring of flyingpigeon.processes.wps_subset_countries.SubsetcountryProcess:16: WARNING: Duplicate explicit target name: "doc". /home/docs/checkouts/readthedocs.org/user_builds/flyingpigeon/checkouts/test-rtd-build/flyingpigeon/processes/wps_subset_bbox.py:docstring of flyingpigeon.processes.wps_subset_bbox.SubsetBboxProcess:28: WARNING: Duplicate explicit target name: "doc". /home/docs/checkouts/readthedocs.org/user_builds/flyingpigeon/checkouts/test-rtd-build/flyingpigeon/processes/wps_plot_timeseries.py:docstring of flyingpigeon.processes.wps_plot_timeseries.PlottimeseriesProcess:16: WARNING: Duplicate explicit target name: "doc". /home/docs/checkouts/readthedocs.org/user_builds/flyingpigeon/checkouts/test-rtd-build/flyingpigeon/processes/wps_spatial_analog.py:docstring of flyingpigeon.processes.wps_spatial_analog.SpatialAnalogProcess:30: WARNING: Duplicate explicit target name: "doc". /home/docs/checkouts/readthedocs.org/user_builds/flyingpigeon/checkouts/test-rtd-build/flyingpigeon/processes/wps_plot_spatial_analog.py:docstring of flyingpigeon.processes.wps_plot_spatial_analog.PlotSpatialAnalogProcess:18: WARNING: Duplicate explicit target name: "doc".
ReadTheDocs is 3.7 so that's what matter. Warning, treated as error: autodoc: failed to import process 'processes.wps_pointinspection.PointinspectionProcess' from module 'flyingpigeon'; the following exception was raised: Traceback (most recent call last): File "/home/travis/miniconda/envs/flyingpigeon/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 32, in import_module return importlib.import_module(modname) File "/home/travis/miniconda/envs/flyingpigeon/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/travis/build/bird-house/flyingpigeon/flyingpigeon/__init__.py", line 7, in <module> from .wsgi import application # noqa: F401 File "/home/travis/build/bird-house/flyingpigeon/flyingpigeon/wsgi.py", line 4, in <module> from .processes import processes File "/home/travis/build/bird-house/flyingpigeon/flyingpigeon/processes/__init__.py", line 8, in <module> from .wps_spatial_analog import SpatialAnalogProcess File "/home/travis/build/bird-house/flyingpigeon/flyingpigeon/processes/wps_spatial_analog.py", line 27, in <module> from flyingpigeon.ocgisDissimilarity import Dissimilarity, metrics File "/home/travis/build/bird-house/flyingpigeon/flyingpigeon/ocgisDissimilarity.py", line 13, in <module> class Dissimilarity(AbstractFieldFunction, AbstractParameterizedFunction): TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
tlvu
added a commit
to bird-house/cookiecutter-birdhouse
that referenced
this pull request
Jul 29, 2020
…empty-autodoc-processes-list Fix empty autodoc processes list silent docs build failure. Currently, autodoc failure are treated as warnings only, resulting in empty processes list, see https://pavics-sdi.readthedocs.io/projects/raven/en/latest/processes.html. This fix will turn these warnings into build failure on RtD and on Travis-CI so we can catch those errors earlier. Right now these warnings are falling silently ! Also changed Travis-CI config so it also builds Epub and Latex format as RtD to catch RtD errors before PR is merged. Common fixes for those warnings are backported here. Bonus we also catch nonexisting document reference and missing reference in toctree, see below sample Raven warnings during docs build. Raven succesful build logs with warnings on RtD: https://readthedocs.org/api/v2/build/11487109.txt /home/docs/checkouts/readthedocs.org/user_builds/pavics-raven/checkouts/latest/docs/source/index.rst:14: WARNING: toctree contains reference to nonexisting document 'pyraven' WARNING: autodoc: failed to import process 'processes.RavenProcess' from module 'raven'; the following exception was raised: No module named 'xclim.core' WARNING: autodoc: failed to import process 'processes.RavenGR4JCemaNeigeProcess' from module 'raven'; the following exception was raised: No module named 'xclim.core' WARNING: autodoc: failed to import process 'processes.RavenMOHYSEProcess' from module 'raven'; the following exception was raised: No module named 'xclim.core' WARNING: autodoc: failed to import process 'processes.RavenHMETSProcess' from module 'raven'; the following exception was raised: No module named 'xclim.core' WARNING: autodoc: failed to import process 'processes.RavenHBVECProcess' from module 'raven'; the following exception was raised: No module named 'xclim.core' WARNING: autodoc: failed to import process 'processes.ObjectiveFunctionProcess' from module 'raven'; the following exception was raised: No module named 'xclim.core' looking for now-outdated files... none found pickling environment... done checking consistency... /home/docs/checkouts/readthedocs.org/user_builds/pavics-raven/checkouts/latest/docs/source/notebooks/Region_selection.ipynb: WARNING: document isn't included in any toctree /home/docs/checkouts/readthedocs.org/user_builds/pavics-raven/checkouts/latest/docs/source/notebooks/Running_models_with_multiple_timeseries_files.ipynb: WARNING: document isn't included in any toctree This PR has been tested on Raven PR Ouranosinc/raven#293, Finch PR bird-house/finch#130, FlyingPigeon bird-house/flyingpigeon#337, bird-house/flyingpigeon#336, Emu bird-house/emu#105
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Exact same changes as the other PR #336 that was squash merged.
I just wanted to preserve each commit separately, I had links to specific commit and squash merge would have make the links invalid.
Use regular merge, not squash merge to preserve existing separate commits.