pypsa-meets-earth / pypsa-earth

PyPSA-Earth: A flexible Python-based open optimisation model to study energy system futures around the world.
https://pypsa-earth.readthedocs.io/en/latest/
225 stars 176 forks source link

Fixes for errors in readthedocs #966

Closed GbotemiB closed 8 months ago

GbotemiB commented 8 months ago

Closes # (if applicable).

Changes proposed in this Pull Request

This PR handles the errors encountered while building documentation.

Checklist

GbotemiB commented 8 months ago

Super :D @GbotemiB The PR seems basically perfect! Does it compile locally?

Yes, It compiles locally. Here is the terminal log with the new merge update

Running Sphinx v7.2.6
/Users/gbotemi/Documents/code/PYPSA/mc/mc-fix/pypsa-earth/scripts
/Users/gbotemi/miniconda3/envs/pypsa-earth-docs/bin
/Users/gbotemi/Documents/code/PYPSA/mc/mc-fix/pypsa-earth/doc
/Users/gbotemi/Library/Python/3.9/bin
/Users/gbotemi/miniconda3/envs/pypsa-earth-docs/lib/python310.zip
/Users/gbotemi/miniconda3/envs/pypsa-earth-docs/lib/python3.10
/Users/gbotemi/miniconda3/envs/pypsa-earth-docs/lib/python3.10/lib-dynload
/Users/gbotemi/miniconda3/envs/pypsa-earth-docs/lib/python3.10/site-packages
None
<git.repo.base.Repo '/Users/gbotemi/Documents/code/PYPSA/mc/mc-fix/documentation/.git'>
None
img/
loading pickled environment... done
myst v2.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
[autosummary] generating autosummary for: api_reference.rst, configuration.rst, costs.rst, create_network_model.rst, create_network_model/add_electricity.rst, create_network_model/add_extra_components.rst, create_network_model/base_network.rst, create_network_model/cluster_network.rst, create_network_model/prepare_network.rst, create_network_model/simplify_network.rst, ..., rules_overview.rst, short_tutorial.rst, software_hints.rst, solving.rst, solving/solve_network.rst, solving/solve_operations_network.rst, structure.rst, talks_and_papers.rst, tutorial.rst, wildcards.rst
This is the repository path:  /Users/gbotemi/Documents/code/PYPSA/mc/mc-fix/pypsa-earth
Had to go 1 folder(s) up.
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
The default value for `navigation_with_keys` will change to `False` in the next release. If you wish to preserve the old behavior for your site, set `navigation_with_keys=True` in the `html_theme_options` dict in your `conf.py` file. Be aware that `navigation_with_keys = True` has negative accessibility implications: https://github.com/pydata/pydata-sphinx-theme/issues/1492
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 19 changed, 0 removed
reading sources... [100%] talks_and_papers
/Users/gbotemi/Documents/code/PYPSA/mc/mc-fix/pypsa-earth/scripts/build_renewable_profiles.py:docstring of build_renewable_profiles:: WARNING: image file not readable: img/onwind-gridcell.png
/Users/gbotemi/Documents/code/PYPSA/mc/mc-fix/pypsa-earth/scripts/build_renewable_profiles.py:docstring of build_renewable_profiles:: WARNING: image file not readable: img/onwind-gridcell.png
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... copying static files... done
copying extra files... done
done
writing output... [100%] talks_and_papers
generating indices... genindex py-modindex done
writing additional pages... search done
copying images... [100%] img/EU_generation_map.png
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 2 warnings.

The HTML pages are in doc/_build/html.

I seemed to have missed an image, but the errors are less now.

GbotemiB commented 8 months ago

Also, I think we can implement readthedocs build into CI for PR into PyPSA-Earth just like PyPSA and PyPSA-Eur.

davide-f commented 8 months ago
U_generation_map

That should already be the case :) Thanks @GbotemiB ! feel free to add the missing image in documentation. Mergind :D Great contribution!!!!! as always :D

davide-f commented 8 months ago

@GbotemiB readthedocs compiled :D many thanks!!!

GbotemiB commented 8 months ago

@GbotemiB readthedocs compiled :D many thanks!!!

You are welcome...