Passed
Pull Request — dev (#1226)
by Patrik
01:46
created

shared.download_input_data()   A

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nop 0
1
"""
2
SPDX-FileCopyrightText: Patrik Schönfeldt
3
SPDX-FileCopyrightText: DLR e.V.
4
5
SPDX-License-Identifier: MIT
6
"""
7
8
from urllib.request import urlretrieve
9
10
def download_input_data():
11
    url_temperature = "https://oemof.org/wp-content/uploads/2025/11/temperature.csv"
12
    url_energy = "https://oemof.org/wp-content/uploads/2025/11/energy.csv"
13
14
    urlretrieve(url_temperature, Path(file_path, "temperature.csv"))
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable file_path does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable Path does not seem to be defined.
Loading history...
15
    urlretrieve(url_energy, Path(file_path, "energy.csv"))
16