Readthedocs documentation with pip (#267)

* Use pip with requirements.txt file for setting up doc environment

* Try w/o cartopy

* Try w/o cartopy take 2

* Try w/o cartopy take 3

* try pip

* try pip ii

* python 3.8

* fix links

* remove conda docs and fix line references

* remove conda on .readthedocs.yml

* correct ambiguous line reference

Co-authored-by: Jonas Hoersch <coroa@posteo.de>
This commit is contained in:
Fabian Neumann 2021-08-13 10:11:35 +02:00 committed by GitHub
parent 7a8ef1a2d4
commit b82c55543b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 51 deletions

View File

@ -4,5 +4,8 @@
version: 2
conda:
environment: envs/environment.docs.yaml
python:
version: 3.8
install:
- requirements: doc/requirements.txt
system_packages: true

View File

@ -50,7 +50,8 @@ An exemplary dependency graph (starting from the simplification rules) then look
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 14-18
:start-at: scenario:
:end-before: countries:
.. csv-table::
:header-rows: 1
@ -66,7 +67,8 @@ Specifies the temporal range to build an energy system model for as arguments to
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 22-25
:start-at: snapshots:
:end-before: enable:
.. csv-table::
:header-rows: 1
@ -80,7 +82,8 @@ Specifies the temporal range to build an energy system model for as arguments to
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 36-60
:start-at: electricity:
:end-before: atlite:
.. csv-table::
:header-rows: 1
@ -117,7 +120,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 77-94
:start-at: renewable:
:end-before: offwind-ac:
.. csv-table::
:header-rows: 1
@ -129,7 +133,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 77,95-107
:start-at: offwind-ac:
:end-before: offwind-dc:
.. csv-table::
:header-rows: 1
@ -141,7 +146,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 77,108-121
:start-at: offwind-dc:
:end-before: solar:
.. csv-table::
:header-rows: 1
@ -153,7 +159,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 77,122-141
:start-at: solar:
:end-before: hydro:
.. csv-table::
:header-rows: 1
@ -165,7 +172,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 77,142-147
:start-at: hydro:
:end-before: lines:
.. csv-table::
:header-rows: 1
@ -179,7 +187,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 149-157
:start-at: lines:
:end-before: links:
.. csv-table::
:header-rows: 1
@ -193,7 +202,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 159-163
:start-at: links:
:end-before: transformers:
.. csv-table::
:header-rows: 1
@ -207,7 +217,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 165-168
:start-at: transformers:
:end-before: load:
.. csv-table::
:header-rows: 1
@ -221,7 +232,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 170-176
:start-at: load:
:end-before: costs:
.. csv-table::
:header-rows: 1
@ -235,7 +247,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 178-190
:start-after: scaling_factor:
:end-before: solving:
.. csv-table::
:header-rows: 1
@ -256,7 +269,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 192-202
:start-at: solving:
:end-before: solver:
.. csv-table::
:header-rows: 1
@ -268,7 +282,8 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 192,203-219
:start-at: solver:
:end-before: plotting:
.. csv-table::
:header-rows: 1
@ -282,7 +297,7 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config.default.yaml
:language: yaml
:lines: 221-299
:start-at: plotting:
.. csv-table::
:header-rows: 1

17
doc/requirements.txt Normal file
View File

@ -0,0 +1,17 @@
sphinx
sphinx_rtd_theme
pypsa
vresutils>=0.3.1
powerplantmatching>=0.4.8
atlite>=0.2.2
dask<=2021.3.1
# cartopy
scikit-learn
pycountry
pyyaml
seaborn
memory_profiler
tables
descartes

View File

@ -1,33 +0,0 @@
# SPDX-FileCopyrightText: : 2017-2020 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: pypsa-eur-docs
channels:
- conda-forge
dependencies:
- python<=3.7
- pip
#- pypsa>=0.17.1
- atlite>=0.2.2
- dask<=2021.3.1 # until https://github.com/dask/dask/issues/7583 is solved
- pre-commit
# Dependencies of the workflow itself
- scikit-learn
- pycountry
- seaborn
- memory_profiler
- yaml
- pytables
- powerplantmatching>=0.4.8
# GIS dependencies have to come all from conda-forge
- cartopy
- descartes
- pip:
- git+https://github.com/pypsa/pypsa.git#egg=pypsa
- vresutils==0.3.1
- sphinx
- sphinx_rtd_theme