pypsa-meets-earth / documentation

Contains hackathon material, jupyter notebook visualizations and images
GNU General Public License v3.0
14 stars 68 forks source link

Add a FAQ section to the documentation #17

Open ekatef opened 1 year ago

ekatef commented 1 year ago

There is a number of practical questions which do not really fit into the proper documentation structure but arise receptively. It looks like this kind of information can be kept as "Frequently Asked Questions". Currently this list may look like this:

Note: sometimes it's necessary to uninstall and reinstall package in the environment to get it work. That is in particular the case when a package source has changed recently

It can be very useful if your fork needs some clean-up. Please use the instructions bellow with caution as they drop changes in your main branch setting its' state according to the upstream/main.

git remote add upstream https://github.com/pypsa-meets-earth/pypsa-earth
git fetch upstream
git checkout main
git pull upstream main
# this will delete all your local changes to master
git reset --hard upstream/main
# take care, this will delete all your changes on your forked master
git push origin main --force

Adapted from reference

    snakemake -j 1 solve_all_networks --rerun-triggers mtime
ekatef commented 1 year ago

It seems that it could make sense to add a troubleshooting guide for installation PyPSA-Earth on Windows. The known problems are:

  1. Issues with installation of a virtual environment. This Youtube tutorial can help.
  2. Administrator privileges are needed. An example of a typical error ~/pypsa-earth\lib\site-packages\snakemake\jobs.py", line 909, in prepare os.symlink(os.path.abspath(source), link) OSError: [WinError 1314] A required privilege is not held by the client

Generally, Windows Subsystem for Linux can be recommended as an effective universal solution

ekatef commented 11 months ago

As a quick fix, adding here an instruction on how to use pre-commit (@davide-f, thanks a lot for writing it!):

If you are using vscode, you may use the pre-commit locally with:

in view-command pallette-> Python: Select intepreter-> PyPSA-Earth open a new terminal view->command pallette->new terminal in the terminal digit "conda activate pypsa-earth" (if not already in the env) digit "pre-commit install" After this, the pre-commit should be installed for the local repository. This should be repeated for every local repositories you may be using this.

ekatef commented 8 months ago

A short trouble-shooting guide would be helpful to support set-up of the model. The simplest steps which are often helpful: 1) remove all the output of the workflow (the whole network folder and content of resouces folder, except natura.tiff); 2) update the local pypsa-earth repository with git pull; 3) update pypsa-earth environment with mamba env update --file envs/environment.yaml --prune