Skip to content
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

add doc fix #412

Merged
merged 2 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ There are multiple ways to get involved and learn more about our work. That's ho
```bash
.../pypsa-africa % conda env create -f envs/environment.yaml
```
For faster installation you might want to try mamba
```bash
(base) conda install -c conda-forge mamba
.../pypsa-africa % mamba env create -f envs/environment.yaml
```

3. For running the optimization one has to install the solver. We can recommend the open source HiGHs solver which installation manual is given [here](https://github.com/PyPSA/PyPSA/blob/633669d3f940ea256fb0a2313c7a499cbe0122a5/pypsa/linopt.py#L608-L632).

Expand Down
11 changes: 11 additions & 0 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ The environment can be installed and activated using
.../pypsa-africa % conda env create -f envs/environment.yaml

.../pypsa-africa % conda activate pypsa-africa

Sometimes the conda pypsa-africa installation can take more than one our
(indicates some conflicts in the packages). In case a quick installation is necessary,
you might also want to try out ``mamba``. It was observed to take around 5-15min to
install all pypsa-africa dependencies with it.

.. code::bash

... conda install -c conda-forge mamba

.../pypsa-africa % mamba env create -f envs/environment.yaml

To use jupyter lab (new jupyter notebooks) **continue** with the `ipython kernel installation <http://echrislynch.com/2019/02/01/adding-an-environment-to-jupyter-notebooks>`_
and test if your jupyter lab works:
Expand Down
3 changes: 2 additions & 1 deletion doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ Upcoming Release

* Enable DC carrier in the network model and include converters into the model `PR #392 <https://github.com/pypsa-meets-africa/pypsa-africa/pull/392>`_

* Implement PyPSA-Eur improvements. Add gas limit constraints, add marginal cost sweeps wildcard, add and harmonize aggregation strategies, improve config usability by carrier clarifications, ease debugging by removing snakemake inputs from functions `PR #402 <https://github.com/pypsa-meets-africa/pypsa-africa/pull/402>`
* Implement PyPSA-Eur improvements. Add gas limit constraints, add marginal cost sweeps wildcard, add and harmonize aggregation strategies, improve config usability by carrier clarifications, ease debugging by removing snakemake inputs from functions `PR #402 <https://github.com/pypsa-meets-africa/pypsa-africa/pull/402>`_

* Fix and add docs. Fix incomplete tutorial, recommend mamba for installation, add YouTube videos `PR #412 <https://github.com/pypsa-meets-africa/pypsa-africa/pull/412>`_

PyPSA-Africa 0.0.2 (6th April 2022)
=====================================
Expand Down
29 changes: 24 additions & 5 deletions doc/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,42 @@ To do so, follow the following procedure:
2. In ``config.yaml`` modify the option ``countries = ["AA", ..., "ZZ"]`` with the list
of countries that you desire; 2-digit country codes are requested or region names.

For example, to investigate Nigeria, the following specification shall be applied in
For example, to investigate Nigeria and South Africa, the following specification shall be applied in
the configuration file.

.. code:: bash

countries = ["NG"]
countries = ["NG", "ZA"]

The code also supports pre-set group of countries, such as africa. For example,
the African region can be simulated using:

.. code:: bash

countries = ["africa"]
3. Then, the software is ready to be used on the selected countries

Manual test of specific scripts
-------------------------------

The scripts in the ``scripts`` folder are build so that they can be easily run and tested
even without the snakemake procedure. Therefore, to test the specific functionality of
The python scripts in the ``scripts`` folder are build so that they can be easily run and tested
even without the snakemake procedure. This assumes you have all inputs of the rule
available (see Snakefile). For instance, let us run the ``build_shapes.py``.
Looking at the Snakefile or the `workflow <https://pypsa-meets-africa.readthedocs.io/en/latest/introduction.html#workflow>`_
we need to run the ``retrieve_databundle_light.py`` manually or by snakemake:

.. code:: bash

snakemake --cores 1 retrieve_databundle_light

Afterwards, you can manually run build_shapes.py or debug it.


YouTube DevTutorials
---------------------

If some of the above sounds quite unfamiliar, you might want to start with YouTube videos.
We recorded the following which help you with VScode, git, reading errors and fixing bugs:
- `How to set-up Visual Studio Code for Windows [PyPSA-Africa][DevTutorial]<https://www.youtube.com/watch?v=9cFOcDxDz7o&list=PLrn8FatUFb2qbNvAEPK9gU_SQ32ZhQBZG&index=1>`_
- `Find a bug, create a fix, contribute a pull request [PyPSA-Africa] [DevTutorial]<https://www.youtube.com/watch?v=HBubZEpIeXk&list=PLrn8FatUFb2qbNvAEPK9gU_SQ32ZhQBZG&index=2>`_
- `Land lock country bug - Understanding the bug [PyPSA-Africa][DevTutorial]<https://www.youtube.com/watch?v=zOQpV5bgPPk&list=PLrn8FatUFb2qbNvAEPK9gU_SQ32ZhQBZG&index=3>`_
- `Land lock country bug - Fixing the bug [PyPSA-Africa][DevTutorial]<https://www.youtube.com/watch?v=6keiD6HvnmY&list=PLrn8FatUFb2qbNvAEPK9gU_SQ32ZhQBZG&index=4>`_