diff --git a/docs/source/ForDevelopers.rst b/docs/source/ForDevelopers.rst index 630d8ef4..b9d5f2a6 100644 --- a/docs/source/ForDevelopers.rst +++ b/docs/source/ForDevelopers.rst @@ -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 -> -> 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 diff --git a/docs/source/ModellingWorkflow.rst b/docs/source/ModellingWorkflow.rst index 494efde9..23747b82 100644 --- a/docs/source/ModellingWorkflow.rst +++ b/docs/source/ModellingWorkflow.rst @@ -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` and the @@ -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` if you want to change something from the defaults. Make sure that the diff --git a/docs/source/workflow/CreateModelTemplates.rst b/docs/source/workflow/CreateModelTemplates.rst index 2230c940..5b002926 100644 --- a/docs/source/workflow/CreateModelTemplates.rst +++ b/docs/source/workflow/CreateModelTemplates.rst @@ -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) diff --git a/docs/source/workflow/DefineModelConfiguration.rst b/docs/source/workflow/DefineModelConfiguration.rst index 3e648e13..2ffc2113 100644 --- a/docs/source/workflow/DefineModelConfiguration.rst +++ b/docs/source/workflow/DefineModelConfiguration.rst @@ -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`here you can +and solver configurations. In the table :ref:`table` 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. diff --git a/docs/source/workflow/LoadData.rst b/docs/source/workflow/LoadData.rst index 7312d491..40137c3c 100644 --- a/docs/source/workflow/LoadData.rst +++ b/docs/source/workflow/LoadData.rst @@ -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: