From 85af878a5f43b2d585de399ef3cb434371d68fe7 Mon Sep 17 00:00:00 2001 From: asolavi Date: Mon, 8 May 2023 13:44:57 +0100 Subject: [PATCH 01/11] Remove environment.docs.yaml --- envs/environment.docs.yaml | 74 -------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 envs/environment.docs.yaml diff --git a/envs/environment.docs.yaml b/envs/environment.docs.yaml deleted file mode 100644 index 8a3c3b8c4..000000000 --- a/envs/environment.docs.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# SPDX-FileCopyrightText: PyPSA-Earth and PyPSA-Eur Authors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -name: pypsa-earth-docs -channels: -- conda-forge/label/shapely_dev -- conda-forge -- bioconda -- http://conda.anaconda.org/gurobi -dependencies: -- python>=3.8 -- pip -- mamba # esp for windows build - -- pypsa>=0.17.1 -- atlite>=0.2.4 -- dask<=2021.3.1 # until https://github.com/dask/dask/issues/7583 is solved -- earth-osm==0.0.8 # until 0.1.0 - - # Dependencies of the workflow itself -- xlrd -- openpyxl -- pycountry -- seaborn -- snakemake-minimal -- memory_profiler -- ruamel.yaml -- yaml -- pytables -- lxml -- powerplantmatching>=0.4.8 -- numpy -- pandas -- geopandas -- xarray -- netcdf4 -- networkx -- scipy -- pydoe2 -- shapely>=1.8a1 -- progressbar2 -- pyomo -- matplotlib - - # Keep in conda environment when calling ipython -- ipython - - # GIS dependencies: -- cartopy -- descartes -- rasterio -- geoviews -- hvplot -- rioxarray - - # PyPSA-Eur-Sec Dependencies -- geopy -- tqdm -- pytz -- reverse-geocode -- country_converter - -- pip: - - git+https://github.com/pydata/xarray@main # till the main is not in conda - - git+https://github.com/pypsa/pypsa.git#egg=pypsa - - vresutils==0.3.1 - - tsam>=1.1.0 - - chaospy # lastest version only available on pip - - sphinx - - sphinx_rtd_theme - - nbsphinx - - nbsphinx_link - - gitpython From 16270cabf50dd400847452ffd9bb21dd94728c47 Mon Sep 17 00:00:00 2001 From: asolavi Date: Mon, 8 May 2023 14:45:36 +0100 Subject: [PATCH 02/11] Update instructions to install documentation environment. --- doc/how_to_docs.rst | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/how_to_docs.rst b/doc/how_to_docs.rst index 1fe1833ee..9a527e8ea 100644 --- a/doc/how_to_docs.rst +++ b/doc/how_to_docs.rst @@ -39,16 +39,23 @@ Please, if you have problems with the documentation create an issue and let us k Compile the documentation locally ---------------------------------- -To create the documentation locally, you need sphinx. It may be installed using specification -form `doc/environment.docs.yaml` like is was done when creating `pypsa-earth` environment: +To create the documentation locally, you need `Sphinx `_ . It can be installed using specifications +form `doc/requirements.txt`. First, we recommend creating a fresh python environment and activate it: .. code:: bash - .../pypsa-earth % mamba env create -f envs/environment.docs.yaml + .../pypsa-earth % conda create --name pypsa-earth-docs python - .../pypsa-earth % conda activate pypsa-earth-docs + .../pypsa-earth % conda activate pypsa-earth-docs -Then the following commands allow you to create the documentation locally: +Next, install the packages specified in `doc/requiremnts.txt` using `pip`: + +.. code:: bash + + .../pypsa-earth % pip install -r doc/requirements.txt + + +Once installation is completed, the following commands allow you to create the documentation locally: .. code:: bash @@ -58,3 +65,8 @@ Then the following commands allow you to create the documentation locally: This will create html files in `pypsa-earth/doc/_build/html`. VScode provides a so called Liveserver extension such that the html file can be opened locally on your computer. + +.. note:: + To build the documentation, Windows users might need to replace the last command by: + + .../pypsa-earth/doc (pypsa-earth-docs) % ./make html \ No newline at end of file From 2d6b4e3173b6fd81b9f71cdb61d0292f6f660e43 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 May 2023 13:46:14 +0000 Subject: [PATCH 03/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/how_to_docs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/how_to_docs.rst b/doc/how_to_docs.rst index 9a527e8ea..9f7c102e6 100644 --- a/doc/how_to_docs.rst +++ b/doc/how_to_docs.rst @@ -69,4 +69,4 @@ VScode provides a so called Liveserver extension such that the html file can be .. note:: To build the documentation, Windows users might need to replace the last command by: - .../pypsa-earth/doc (pypsa-earth-docs) % ./make html \ No newline at end of file + .../pypsa-earth/doc (pypsa-earth-docs) % ./make html From 210a3e8d34a84eb8b80fc3c8adbabd5f54a1efac Mon Sep 17 00:00:00 2001 From: asolavi Date: Mon, 8 May 2023 14:51:24 +0100 Subject: [PATCH 04/11] Add release note for the PR. --- doc/release_notes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index eb094ea99..9a74f3bac 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -106,6 +106,8 @@ PyPSA-Earth 0.2.0 * Improve earth coverage and add improve make_statistics coverage `PR #654 `__ +* Update instructions on how to write documentation. `PR #720 `__ + PyPSA-Earth 0.1.0 ================= From 94d0f1f80e187399bd4c49221c1ec8f862efef17 Mon Sep 17 00:00:00 2001 From: asolavi Date: Tue, 9 May 2023 10:14:42 +0100 Subject: [PATCH 05/11] Fix typo in how_to_docs.rst --- doc/how_to_docs.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/how_to_docs.rst b/doc/how_to_docs.rst index 9f7c102e6..80ce00ad2 100644 --- a/doc/how_to_docs.rst +++ b/doc/how_to_docs.rst @@ -67,6 +67,7 @@ This will create html files in `pypsa-earth/doc/_build/html`. VScode provides a so called Liveserver extension such that the html file can be opened locally on your computer. .. note:: + To build the documentation, Windows users might need to replace the last command by: .../pypsa-earth/doc (pypsa-earth-docs) % ./make html From 3e9e723a1333f16bc7a63a57b5eab77528b7266c Mon Sep 17 00:00:00 2001 From: asolavi Date: Tue, 9 May 2023 10:15:42 +0100 Subject: [PATCH 06/11] Update reference to doc environment in PR request template. --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 24eb15064..f4767dc96 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,7 +8,7 @@ - [ ] I consent to the release of this PR's code under the GPLv3 license and non-code contributions under CC0-1.0 and CC-BY-4.0. - [ ] I tested my contribution locally and it seems to work fine. - [ ] Code and workflow changes are sufficiently documented. -- [ ] Newly introduced dependencies are added to `envs/environment.yaml` and `envs/environment.docs.yaml`. +- [ ] Newly introduced dependencies are added to `envs/environment.yaml` and `doc/requirements.txt`. - [ ] Changes in configuration options are added in all of `config.default.yaml` and `config.tutorial.yaml`. - [ ] Add a test config or line additions to `test/` (note tests are changing the config.tutorial.yaml) - [ ] Changes in configuration options are also documented in `doc/configtables/*.csv` and line references are adjusted in `doc/configuration.rst` and `doc/tutorial.rst`. From 8d000355a63f4fc1d1e408a725b9b6e80a29300e Mon Sep 17 00:00:00 2001 From: asolavi Date: Tue, 9 May 2023 10:25:33 +0100 Subject: [PATCH 07/11] Resolve merge conflicts in release_notes.rst --- doc/release_notes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 9a74f3bac..a1d5d9229 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -106,6 +106,8 @@ PyPSA-Earth 0.2.0 * Improve earth coverage and add improve make_statistics coverage `PR #654 `__ +* Fix bug for missing renewable profiles and generators `PR #714 https://github.com/pypsa-meets-earth/pypsa-earth/pull/714`__ + * Update instructions on how to write documentation. `PR #720 `__ PyPSA-Earth 0.1.0 From 6ec6f5a0cce25aa002182f3a847b76623acda46a Mon Sep 17 00:00:00 2001 From: asolavi Date: Tue, 9 May 2023 10:34:02 +0100 Subject: [PATCH 08/11] Resolve merge conflicts v2 --- doc/release_notes.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index a1d5d9229..8ee361ba1 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -108,8 +108,6 @@ PyPSA-Earth 0.2.0 * Fix bug for missing renewable profiles and generators `PR #714 https://github.com/pypsa-meets-earth/pypsa-earth/pull/714`__ -* Update instructions on how to write documentation. `PR #720 `__ - PyPSA-Earth 0.1.0 ================= From c81d4cfbe47a547c9badc999b4e8dfdbee7058ff Mon Sep 17 00:00:00 2001 From: asolavi Date: Tue, 9 May 2023 10:35:27 +0100 Subject: [PATCH 09/11] Update release_notes after merging conflicts have been resolved. --- doc/release_notes.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 8ee361ba1..a1c430d3f 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -106,7 +106,9 @@ PyPSA-Earth 0.2.0 * Improve earth coverage and add improve make_statistics coverage `PR #654 `__ -* Fix bug for missing renewable profiles and generators `PR #714 https://github.com/pypsa-meets-earth/pypsa-earth/pull/714`__ +* Fix bug for missing renewable profiles and generators `PR #714 `__ + +* Update instructions on how to write documentation. `PR #720 `__ PyPSA-Earth 0.1.0 ================= From 2c32859f27848a9e62d887ab79cd4a93cc297f43 Mon Sep 17 00:00:00 2001 From: asolavi Date: Fri, 12 May 2023 15:54:19 +0100 Subject: [PATCH 10/11] Improve note on windows users. --- doc/how_to_docs.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/how_to_docs.rst b/doc/how_to_docs.rst index 80ce00ad2..0bd01e9e1 100644 --- a/doc/how_to_docs.rst +++ b/doc/how_to_docs.rst @@ -68,6 +68,6 @@ VScode provides a so called Liveserver extension such that the html file can be .. note:: - To build the documentation, Windows users might need to replace the last command by: - - .../pypsa-earth/doc (pypsa-earth-docs) % ./make html + Windows users might face some challenges when building the documentation locally using `make`. A workaround can be found, but might be time consuming. For instance: + + 1. If using Windows PowerShell, one might need to replace the command `make html` above by `./make html`. For more details on what is going on, see `this post `_ on Stack Overflow. \ No newline at end of file From 8b9382302996bba108023548abedf4ab921499e3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 12 May 2023 14:54:35 +0000 Subject: [PATCH 11/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/how_to_docs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/how_to_docs.rst b/doc/how_to_docs.rst index 0bd01e9e1..462b04511 100644 --- a/doc/how_to_docs.rst +++ b/doc/how_to_docs.rst @@ -70,4 +70,4 @@ VScode provides a so called Liveserver extension such that the html file can be Windows users might face some challenges when building the documentation locally using `make`. A workaround can be found, but might be time consuming. For instance: - 1. If using Windows PowerShell, one might need to replace the command `make html` above by `./make html`. For more details on what is going on, see `this post `_ on Stack Overflow. \ No newline at end of file + 1. If using Windows PowerShell, one might need to replace the command `make html` above by `./make html`. For more details on what is going on, see `this post `_ on Stack Overflow.