Skip to content

Commit

Permalink
chore(examples): Automatic commit of example files in Markdown and Ju…
Browse files Browse the repository at this point in the history
…pyter Notebook format.
  • Loading branch information
[email protected] authored and [email protected] committed Sep 1, 2023
1 parent 53b99fc commit 6b81003
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 74 deletions.
9 changes: 1 addition & 8 deletions docs/jupyter_notebooks/e1_generate_archetype.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "Created July 2015\nTEASER 4 Development Team\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "\"\"\"This module contains an example how to generate archetype buildings using\nTEASER API functions.\n\"\"\"\n"
"source": "Example 1: Generate archetype buildings using TEASER API\nThis module contains an example how to generate archetype buildings using\nTEASER API functions.\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)\n"
},
{
"cell_type": "markdown",
Expand Down
9 changes: 7 additions & 2 deletions docs/jupyter_notebooks/e2_export_aixlib_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "Created January 2017\nTEASER Development Team\n"
"source": "# Example 2: Export Modelica models for AixLib library using TEASER API\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "This module contains an example how to export buildings from a TEASER\nproject to ready-to-run simulation models for Modelica library AixLib. These\nmodels will only simulate using Dymola, the reason for this are state\nmachines that are used in one AixLib specific AHU model.\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "\"\"\"This module contains an example how to export buildings from a TEASER\nproject to ready-to-run simulation models for Modelica library AixLib. These\nmodels will only simulate using Dymola, the reason for this are state\nmachines that are used in one AixLib specific AHU model.\n\"\"\"\n\nimport teaser.examples.e1_generate_archetype as e1\nimport teaser.logic.utilities as utilities\nimport os\n"
"source": "import teaser.examples.e1_generate_archetype as e1\nimport teaser.logic.utilities as utilities\nimport os\n"
},
{
"cell_type": "markdown",
Expand Down
4 changes: 2 additions & 2 deletions docs/jupyter_notebooks/e3_export_ibpsa_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "Created January 2017\nTEASER Development Team\n"
"source": "# Example 3: Export Modelica models for IBPSA library using TEASER API\nThis module contains an example how to export buildings from a TEASER\nproject to ready-to-run simulation models for Modelica library IBPSA. These\nmodels simulate in Dymola, OpenModelica and JModelica.\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "\"\"\"This module contains an example how to export buildings from a TEASER\nproject to ready-to-run simulation models for Modelica library IBPSA. These\nmodels simulate in Dymola, OpenModelica and JModelica.\n\"\"\"\n\nimport teaser.examples.e1_generate_archetype as e1\nimport teaser.logic.utilities as utilities\nimport os\n"
"source": "import teaser.examples.e1_generate_archetype as e1\nimport teaser.logic.utilities as utilities\nimport os\n"
},
{
"cell_type": "markdown",
Expand Down
6 changes: 3 additions & 3 deletions docs/jupyter_notebooks/e4_save.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "Created January 2017\nTEASER Development Team\n"
"source": "# Example 4: Save information\nThis module contains an example how to save buildings from a TEASER\nproject to json and pickle in order to save information.\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "\"\"\"This module contains an example how to save buildings from a TEASER\nproject to json and pickle in order to save information.\n\"\"\"\n\nimport teaser.examples.e1_generate_archetype as e1\nimport teaser.logic.utilities as utilities\nimport os\n"
"source": "import teaser.examples.e1_generate_archetype as e1\nimport teaser.logic.utilities as utilities\nimport os\n"
},
{
"cell_type": "markdown",
Expand All @@ -27,7 +27,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "First option is to use TEASERs own json format to save all relevant\ndata into a more or less human readable format. The corresponding\nfunction is called Project().save_project() you can specify a file name\n and a save path. If both are non (as in this case) it will use the\nprojects name and default path in your home folder.\n"
"source": "First option is to use TEASERs own json format to save all relevant\ndata into a more or less human readable format. The corresponding\nfunction is called Project().save_project() you can specify a file name\nand a save path. If both are non (as in this case) it will use the\nprojects name and default path in your home folder.\n"
},
{
"cell_type": "code",
Expand Down
10 changes: 5 additions & 5 deletions docs/jupyter_notebooks/e5_load.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "Created January 2017\nTEASER Development Team\n"
"source": "# Example 5: Load information\nThis module contains an example how to import TEASER projects from\n`*.teaserjson` and pickle in order to reuse data.\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "\"\"\"This module contains an example how to import TEASER projects from\n`*.teaserjson` and pickle in order to reuse data.\n\"\"\"\n\nimport teaser.logic.utilities as utilities\nimport os\n"
"source": "import teaser.logic.utilities as utilities\nimport os\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "In example e4_save we saved two TEASER projects using *.teaserjson and\nPython package pickle. This example shows how to import these\ninformation into your python environment again.\n"
"source": "In example e4_save we saved two TEASER projects using `*.teaserjson` and\nPython package pickle. This example shows how to import these\ninformation into your python environment again.\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "To load data from *.teaserjson we can use a simple API function. So\nfirst we need to instantiate our API (similar to example\ne1_generate_archetype). The json file is called\n`ArchetypeExample.teaserjson` and saved in the default path. You need to\n run e4 first before you can load this example file.\n"
"source": "To load data from `*.teaserjson` we can use a simple API function. So\nfirst we need to instantiate our API (similar to example\ne1_generate_archetype). The json file is called\n`ArchetypeExample.teaserjson` and saved in the default path. You need to\nrun e4 first before you can load this example file.\n"
},
{
"cell_type": "code",
Expand All @@ -32,7 +32,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "To reload data from a pickle file, we do not need to instantiate an\nAPI, as pickle will automatically instantiate all classes as they have\nbeen saved. The saved file from example e4 is called ´teaser_pickle.´\n"
"source": "To reload data from a pickle file, we do not need to instantiate an\nAPI, as pickle will automatically instantiate all classes as they have\nbeen saved. The saved file from example e4 is called ´teaser_pickle.p´\n"
},
{
"cell_type": "code",
Expand Down
11 changes: 2 additions & 9 deletions docs/jupyter_notebooks/e6_generate_building.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "Created July 2015\nTEASER Development Team\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "\"\"\"This module contains an example that shows to create a building not using\nthe archetype approach but adding all information separately. In this example\nwe import all needed modules and classes where we need it in the code. For you\napplication we suggest to use PEP008 and import them at the beginning of the\nscript.\n\"\"\"\n"
"source": "# Example 7: Generate single building\nThis module contains an example that shows to create a building not using\nthe archetype approach but adding all information separately. In this example\nwe import all needed modules and classes where we need it in the code. For you\napplication we suggest to use PEP008 and import them at the beginning of the\nscript.\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)\n"
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -75,7 +68,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "Define two building elements reflecting a pitched roof (south = 180° and\nnorth = °). Setting the the ThermalZone as a parent will automatically\nassign this element to the thermal zone. We also set names, tilt and\ncoefficients for heat transfer on the inner and outer side of the\nroofs. If the building has a flat roof, please use -1 as\norientation. Please read the docs to get more information on these\nparameters.\n"
"source": "Define two building elements reflecting a pitched roof (south = 180° and\nnorth = 0°). Setting the the ThermalZone as a parent will automatically\nassign this element to the thermal zone. We also set names, tilt and\ncoefficients for heat transfer on the inner and outer side of the\nroofs. If the building has a flat roof, please use -1 as\norientation. Please read the docs to get more information on these\nparameters.\n"
},
{
"cell_type": "code",
Expand Down
4 changes: 2 additions & 2 deletions docs/jupyter_notebooks/e7_retrofit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "Created July 2015\nTEASER Development Team\n"
"source": "# Example 7: Retrofit buildings\nThis module contains an example that shows how to retrofit all buildings\nin a TEASER project with different setups\nYou can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "\"\"\"This module contains an example that shows how to retrofit all buildings\nin a TEASER project with different setups\n\"\"\"\n\nimport teaser.examples.e1_generate_archetype as e1\n"
"source": "import teaser.examples.e1_generate_archetype as e1\n"
},
{
"cell_type": "markdown",
Expand Down
10 changes: 3 additions & 7 deletions docs/source/examples/e1_generate_archetype.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# Example 1: Generate archetype buildings using TEASER API
Created July 2015
TEASER 4 Development Team

```python
"""This module contains an example how to generate archetype buildings using
Example 1: Generate archetype buildings using TEASER API
This module contains an example how to generate archetype buildings using
TEASER API functions.
"""
```
You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)

First step: Import the TEASER API (called Project) into your Python
module
Expand Down
9 changes: 4 additions & 5 deletions docs/source/examples/e2_export_aixlib_models.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@

Created January 2017
TEASER Development Team
# Example 2: Export Modelica models for AixLib library using TEASER API

```python
"""This module contains an example how to export buildings from a TEASER
This module contains an example how to export buildings from a TEASER
project to ready-to-run simulation models for Modelica library AixLib. These
models will only simulate using Dymola, the reason for this are state
machines that are used in one AixLib specific AHU model.
"""
You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)

```python
import teaser.examples.e1_generate_archetype as e1
import teaser.logic.utilities as utilities
import os
Expand Down
10 changes: 4 additions & 6 deletions docs/source/examples/e3_export_ibpsa_models.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

Created January 2017
TEASER Development Team

```python
"""This module contains an example how to export buildings from a TEASER
# Example 3: Export Modelica models for IBPSA library using TEASER API
This module contains an example how to export buildings from a TEASER
project to ready-to-run simulation models for Modelica library IBPSA. These
models simulate in Dymola, OpenModelica and JModelica.
"""
You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)

```python
import teaser.examples.e1_generate_archetype as e1
import teaser.logic.utilities as utilities
import os
Expand Down
10 changes: 4 additions & 6 deletions docs/source/examples/e4_save.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

Created January 2017
TEASER Development Team

```python
"""This module contains an example how to save buildings from a TEASER
# Example 4: Save information
This module contains an example how to save buildings from a TEASER
project to json and pickle in order to save information.
"""
You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)

```python
import teaser.examples.e1_generate_archetype as e1
import teaser.logic.utilities as utilities
import os
Expand Down
10 changes: 4 additions & 6 deletions docs/source/examples/e5_load.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

Created January 2017
TEASER Development Team

```python
"""This module contains an example how to import TEASER projects from
# Example 5: Load information
This module contains an example how to import TEASER projects from
`*.teaserjson` and pickle in order to reuse data.
"""
You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)

```python
import teaser.logic.utilities as utilities
import os
```
Expand Down
10 changes: 3 additions & 7 deletions docs/source/examples/e6_generate_building.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@

Created July 2015
TEASER Development Team

```python
"""This module contains an example that shows to create a building not using
# Example 7: Generate single building
This module contains an example that shows to create a building not using
the archetype approach but adding all information separately. In this example
we import all needed modules and classes where we need it in the code. For you
application we suggest to use PEP008 and import them at the beginning of the
script.
"""
```
You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)

First step: Import the TEASER API (called Project) into your Python module

Expand Down
10 changes: 4 additions & 6 deletions docs/source/examples/e7_retrofit.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

Created July 2015
TEASER Development Team

```python
"""This module contains an example that shows how to retrofit all buildings
# Example 7: Retrofit buildings
This module contains an example that shows how to retrofit all buildings
in a TEASER project with different setups
"""
You can run this example using the [jupyter-notebook](https://mybinder.org/v2/gh/RWTH-EBC/TEASER/master?labpath=docs%2Fjupyter_notebooks)

```python
import teaser.examples.e1_generate_archetype as e1
```

Expand Down

0 comments on commit 6b81003

Please sign in to comment.