Skip to content

Commit

Permalink
Merge pull request #338 from UU-ER/fixing-documentation-issues
Browse files Browse the repository at this point in the history
Fixed small documentation issues
  • Loading branch information
JeanWi authored Nov 23, 2024
2 parents 488b36f + 2072559 commit e51e146
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
25 changes: 13 additions & 12 deletions docs/source/ForDevelopers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,32 @@ This page contains general instructions for the developers that are working on t

Setting Up the Development Environment
-----------------------------------------
To develop actively on the tool, follow the subsequent steps:
To develop actively on the tool, you can follow the subsequent steps (feel free to
chose a different IDE or environment management):

- Make sure you have Python 3.12 installed on your computer
- Make sure you have Python >=3.12 installed on your computer
- Clone the repository to you drive
- Create a virtual environment for this project. You can do this using PyCharm:
- Open the project in PyCharm
- Go to File -> Settings -> <project_name> -> Python Interpreter
- Select Add Local Interpreter from the Add Interpreter
- In the left-hand pane of the Add Python Interpreter dialog, select Virtualenv Environment
- Add a Base Interpreter (select Python 3.12)
- Install all required packages to your virtual environment by using pip. In PyCharm you can do this with:
- Add a Base Interpreter
- Install all required packages to your virtual environment by using poetry. In PyCharm
you can do this with:
- Move to the terminal in PyCharm, it is located on the bottom. If the virtual environment was correctly installed, you should see a (venv) in front of the path
- Execute the command pip install -r requirements.txt to install all requirements in your virtual environment
- Now, you can run main.py with python 3.12. In PyCharm, you can do this:
- Execute the command ``pip install poetry``
- Execute the command ``poetry install`` to install all required packages
- Now, you can run main.py after specifying the right paths. In PyCharm, you can do
this:
- Click on Edit configuration, in the upper right corner of the screen
- Click Add new...
- Name your configuration as you like (e.g. Run main)
- Select a Python 3.12 as an interpreter and click ok
- Select Python as an interpreter and click ok
- You can run the file.
- If you are planning to contribute to the main version, it is handy to also install
pre-commit and black (tools to ensure correct formatting of the code. You can do
this by:
- Installing black: ``pip install black``
- Installing pre-commit: ``pip install pre-commit``
- Run ``pre-commit install`` from the terminal
a pre-commit hook. You can do this by running ``pre-commit install`` from the
terminal.


Codebase Overview
Expand Down
8 changes: 4 additions & 4 deletions docs/source/ModellingWorkflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The modelling steps are as follows:
import json
from pathlib import Path

input_data_path = "path_to_your_input_data_folder"
input_data_path = Path("path_to_your_input_data_folder")
adopt.create_optimization_templates(input_data_path)

- :ref:`Define your system topology<workflow_define-topology>` and the
Expand Down Expand Up @@ -86,9 +86,9 @@ The modelling steps are as follows:
adopt.load_climate_data_from_api(input_data_path)

# Define demand
adopt.fill_carrier_data(input_data_path, value=0.01, columns=['Demand'], carriers=['electricity'], nodes=['node1'])
adopt.fill_carrier_data(input_data_path, value=100, columns=['Import price'], carriers=['electricity'], nodes=['node1'])
adopt.fill_carrier_data(input_data_path, value=1, columns=['Import limit'], carriers=['electricity'], nodes=['node1'])
adopt.fill_carrier_data(input_data_path, value_or_data=0.01, columns=['Demand'], carriers=['electricity'], nodes=['node1'])
adopt.fill_carrier_data(input_data_path, value_or_data=100, columns=['Import price'], carriers=['electricity'], nodes=['node1'])
adopt.fill_carrier_data(input_data_path, value_or_data=1, columns=['Import limit'], carriers=['electricity'], nodes=['node1'])

- :ref:`Define model configuration<workflow_model-configuration>` if you want to
change something from the defaults. Make sure that the
Expand Down
3 changes: 2 additions & 1 deletion docs/source/workflow/CreateModelTemplates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ that will all input data. Specify the path to this folder and pass it to the
.. testcode::

import adopt_net0 as adopt
from pathlib import Path

path = "path_to_your_input_data_folder"
path = Path("path_to_your_input_data_folder")

adopt.create_optimization_templates(path)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/workflow/DefineModelConfiguration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Define Model Configuration

The ``ModelConfig.JSON`` is used to define and change the standard modeling configuration. The model configuration consists
of all global modelling settings (e.g., objective, high-level algorithms, energy balance violation, costs and performances)
and solver configurations. In the table :ref:`here<model_configuration>`here you can
and solver configurations. In the table :ref:`table<model_configuration>` you can
find all
settings that can be
specified, and a description, the options that can be chosen and the default value from the template for each setting.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/workflow/LoadData.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ the time dependent data more convenient:

.. testcode::

adopt.fill_carrier_data(path, 10, columns=["Demand"], carriers=["electricity"], nodes=["onshore"], investment_periods=['period1'])
adopt.fill_carrier_data(path, value_or_data=10, columns=["Demand"], carriers=["electricity"], nodes=["onshore"], investment_periods=['period1'])


.. _load-data_from-api:
Expand Down

0 comments on commit e51e146

Please sign in to comment.