Skip to content

Commit

Permalink
Merge pull request #70 from RWTH-EBC/4-joss_paper-examples-ci
Browse files Browse the repository at this point in the history
4 joss paper examples ci
  • Loading branch information
MartinRaetz authored Dec 3, 2024
2 parents 1234a63 + 5be4e70 commit a069c72
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 143 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ jobs:
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: Joss_Paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: Joss_Paper/paper.pdf
path: Joss_Paper/paper.pdf
10 changes: 5 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ stages:
- test
- doc
- code_quality
# - examples
- examples
- build
- release
- deploy
Expand Down Expand Up @@ -30,11 +30,11 @@ include:
file: 'pages/gh-pages.gitlab-ci.yml'
- project: 'EBC/EBC_all/gitlab_ci/templates'
file: 'python/tests/tests.gitlab-ci.yml'
# - project: 'EBC/EBC_all/gitlab_ci/templates'
# file: 'python/tests/coverage.gitlab-ci.yml'
- project: 'EBC/EBC_all/gitlab_ci/templates'
file: 'python/tests/coverage.gitlab-ci.yml'
- project: 'EBC/EBC_all/gitlab_ci/templates'
file: 'python/pypi-release/release.gitlab-ci.yml'
# - project: 'EBC/EBC_all/gitlab_ci/templates'
# file: 'python/examples/examples.gitlab-ci.yml'
- project: 'EBC/EBC_all/gitlab_ci/templates'
file: 'python/examples/examples.gitlab-ci.yml'
- template: Dependency-Scanning.gitlab-ci.yml
- template: SAST.gitlab-ci.yml
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ignore=CVS
# ignore-list. The regex matches against paths and can be in Posix or Windows
# format. Because '\\' represents the directory delimiter on Windows systems,
# it can't be used as an escape character.
ignore-paths=
ignore-paths=examples

# Files or directories matching the regular expression patterns are skipped.
# The regex matches against base names, not paths. The default value ignores
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
![E.ON EBC RWTH Aachen University](./docs/source/_static/EBC_Logo.png)
![E.ON EBC RWTH Aachen University](https://raw.githubusercontent.com/RWTH-EBC/AixWeather/main/docs/source/_static/EBC_Logo.png)

[![pylint](https://rwth-ebc.github.io/AixWeather//main//pylint/pylint.svg )](https://rwth-ebc.github.io/AixWeather//main//pylint/pylint.html)
[![documentation](https://rwth-ebc.github.io/AixWeather//main//docs/doc.svg)](https://rwth-ebc.github.io/AixWeather//main//docs/index.html)
[![documentation](https://rwth-ebc.github.io/AixWeather//4-joss_paper//docs/doc.svg)](https://rwth-ebc.github.io/AixWeather//4-joss_paper//docs/index.html)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![coverage](https://rwth-ebc.github.io/AixWeather/4-joss_paper/coverage/badge.svg)](https://rwth-ebc.github.io/AixWeather/4-joss_paper/coverage)

<div align="center">
<img src="./docs/aixweather_logo/AixWeather_Logo.png" alt="AixWeather Logo" width="50%">
<img src="https://raw.githubusercontent.com/RWTH-EBC/AixWeather/main/docs/aixweather_logo/AixWeather_Logo.png" alt="AixWeather Logo" width="50%">
</div>

THIS IS A REMINDER TO SET ALL IMAGES, BADGES, ETC. BACK FROM 4-joss_paper TO main BRANCH AFTER
JOSS-PAPER REVIEW IS FINISHED.

# AixWeather
**A weather data generation tool for building energy system simulations. Pull, Transform, Export.**

Expand Down Expand Up @@ -80,7 +84,7 @@ the desired output format.

The below diagram shows the tool's structure and the data flow from the import to the output format.

![Weather Data Tool Diagram](docs/Overview_WeatherTool.png)
![Weather Data Tool Diagram](https://rwth-ebc.github.io/AixWeather/4-joss_paper/docs/Overview_WeatherTool.png)

**Known limitations:**

Expand Down
240 changes: 125 additions & 115 deletions docs/jupyter_notebooks/e1_pull_DWD_historical_to_all_output_formats.ipynb
Original file line number Diff line number Diff line change
@@ -1,116 +1,126 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "\"\"\"Contains examples\"\"\"\n\nimport datetime as dt\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "choose the project class according to the desired weather data origin\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "from aixweather.project_class import ProjectClassDWDHistorical\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "initiate the project class which contains or creates all variables and functions\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "DWD_pull_project = ProjectClassDWDHistorical(\n start=dt.datetime(2022, 1, 1),\n end=dt.datetime(2023, 1, 1),\n station=15000,\n # specify whether nan-values should be filled when exporting\n fillna=True,\n # define results path if desired\n abs_result_folder_path=None,\n)\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "import historical weather from the DWD open access database\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "DWD_pull_project.import_data()\nprint(\n f\"\\nHow the imported data looks like:\\n{DWD_pull_project.imported_data.head()}\\n\"\n)\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "convert this imported data to the core format\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "DWD_pull_project.data_2_core_data()\nprint(f\"\\nHow the core data looks like:\\n{DWD_pull_project.core_data.head()}\\n\")\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "you may also use data quality check utils, like:\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "from aixweather.data_quality_checks import plot_heatmap_missing_values\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "plot data quality\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "plot = plot_heatmap_missing_values(DWD_pull_project.core_data)\nplot.show()\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "convert this core data to an output data format of your choice\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "DWD_pull_project.core_2_csv()\nDWD_pull_project.core_2_json()\nDWD_pull_project.core_2_pickle()\nDWD_pull_project.core_2_mos()\nDWD_pull_project.core_2_epw()\n"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": "# AixWeather Tutorial\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Enable logging, this is just get more feedback through the terminal\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "import logging\nlogging.basicConfig(level=\"DEBUG\")\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Choose the project class according to the desired weather data origin.\nCheck the project classes file or the API documentation to see which classes are available.\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "from aixweather.project_class import ProjectClassDWDHistorical\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Step 0: Initiate the project class which contains or creates all variables and functions.\nFor this, we use the datetime module to specify dates.\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "import datetime as dt\nDWD_pull_project = ProjectClassDWDHistorical(\n start=dt.datetime(2022, 1, 1),\n end=dt.datetime(2023, 1, 1),\n station=15000,\n # specify whether nan-values should be filled when exporting\n fillna=True,\n # define results path if desired\n abs_result_folder_path=None,\n)\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Step 1: Import historical weather from the DWD open access database\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "DWD_pull_project.import_data()\nprint(\n f\"\\nHow the imported data looks like:\\n{DWD_pull_project.imported_data.head()}\\n\"\n)\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Step 2: Convert this imported data to the core format\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "DWD_pull_project.data_2_core_data()\nprint(f\"\\nHow the core data looks like:\\n{DWD_pull_project.core_data.head()}\\n\")\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "you may also use data quality check utils, like:\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "from aixweather.data_quality_checks import plot_heatmap_missing_values\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "plot data quality\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "plot = plot_heatmap_missing_values(DWD_pull_project.core_data)\nplot.show()\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Step 3: Convert this core data to an output data format of your choice\n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "DWD_pull_project.core_2_csv()\nDWD_pull_project.core_2_json()\nDWD_pull_project.core_2_pickle()\nDWD_pull_project.core_2_mos()\nDWD_pull_project.core_2_epw()\n"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
7 changes: 6 additions & 1 deletion docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
.. mdinclude:: ../../examples/README.md
.. mdinclude:: ../../examples/README.md

.. toctree::
:maxdepth: 2

examples/e1_pull_DWD_historical_to_all_output_formats
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@

```python
"""Contains examples"""
# AixWeather Tutorial

import datetime as dt
Enable logging, this is just get more feedback through the terminal

```python
import logging
logging.basicConfig(level="DEBUG")
```

choose the project class according to the desired weather data origin
Choose the project class according to the desired weather data origin.
Check the project classes file or the API documentation to see which classes are available.

```python
from aixweather.project_class import ProjectClassDWDHistorical
```

initiate the project class which contains or creates all variables and functions
Step 0: Initiate the project class which contains or creates all variables and functions.
For this, we use the datetime module to specify dates.

```python
import datetime as dt
DWD_pull_project = ProjectClassDWDHistorical(
start=dt.datetime(2022, 1, 1),
end=dt.datetime(2023, 1, 1),
Expand All @@ -25,7 +31,7 @@ DWD_pull_project = ProjectClassDWDHistorical(
)
```

import historical weather from the DWD open access database
Step 1: Import historical weather from the DWD open access database

```python
DWD_pull_project.import_data()
Expand All @@ -34,7 +40,7 @@ print(
)
```

convert this imported data to the core format
Step 2: Convert this imported data to the core format

```python
DWD_pull_project.data_2_core_data()
Expand All @@ -54,7 +60,7 @@ plot = plot_heatmap_missing_values(DWD_pull_project.core_data)
plot.show()
```

convert this core data to an output data format of your choice
Step 3: Convert this core data to an output data format of your choice

```python
DWD_pull_project.core_2_csv()
Expand Down
Loading

0 comments on commit a069c72

Please sign in to comment.