Skip to content

Commit

Permalink
RTD bug: Replace GitHub links with links to own file server
Browse files Browse the repository at this point in the history
  • Loading branch information
andreArtelt committed Dec 5, 2024
1 parent 3374e26 commit 14b1575
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 28 deletions.
4 changes: 2 additions & 2 deletions epyt_flow/data/benchmarks/leakdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ def gen_dem(download_dir):

return dem_final

week_pattern_url = "https://github.com/KIOS-Research/LeakDB/raw/master/CCWI-WDSA2018/" +\
week_pattern_url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/CCWI-WDSA2018/" +\
"Dataset_Generator_Py3/weekPat_30min.mat"
year_offset_url = "https://github.com/KIOS-Research/LeakDB/raw/master/CCWI-WDSA2018/" +\
year_offset_url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/CCWI-WDSA2018/" +\
"Dataset_Generator_Py3/yearOffset_30min.mat"

download_if_necessary(os.path.join(download_dir, "weekPat_30min.mat"),
Expand Down
40 changes: 14 additions & 26 deletions epyt_flow/data/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ def load_net1(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "Net1.inp")
url = "https://raw.githubusercontent.com/OpenWaterAnalytics/EPyT/main/epyt/networks/" + \
"asce-tf-wdst/Net1.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/Net1.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -201,8 +200,7 @@ def load_net2(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "Net2.inp")
url = "https://raw.githubusercontent.com/OpenWaterAnalytics/EPyT/main/epyt/networks/" + \
"asce-tf-wdst/Net2.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/Net2.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -249,8 +247,7 @@ def load_net3(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "Net3.inp")
url = "https://raw.githubusercontent.com/OpenWaterAnalytics/EPyT/main/epyt/networks/" + \
"asce-tf-wdst/Net3.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/Net3.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -297,7 +294,7 @@ def load_net6(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "Net6.inp")
url = "https://github.com/OpenWaterAnalytics/WNTR/raw/main/examples/networks/Net6.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/Net6.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -344,8 +341,7 @@ def load_richmond(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "Richmond_standard.inp")
url = "https://raw.githubusercontent.com/OpenWaterAnalytics/EPyT/main/epyt/networks/" + \
"exeter-benchmarks/Richmond_standard.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/Richmond_standard.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -392,8 +388,7 @@ def load_micropolis(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "MICROPOLIS_v1.inp")
url = "https://github.com/OpenWaterAnalytics/EPyT/raw/main/epyt/networks/asce-tf-wdst/" + \
"MICROPOLIS_v1.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/MICROPOLIS_v1.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -440,8 +435,7 @@ def load_balerma(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "Balerma.inp")
url = "https://github.com/OpenWaterAnalytics/EPyT/raw/main/epyt/networks/" + \
"asce-tf-wdst/Balerma.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/Balerma.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -488,8 +482,7 @@ def load_rural(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "RuralNetwork.inp")
url = "https://github.com/OpenWaterAnalytics/EPyT/raw/main/epyt/networks/" + \
"asce-tf-wdst/RuralNetwork.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/RuralNetwork.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -536,8 +529,7 @@ def load_bwsn1(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "BWSN_Network_1.inp")
url = "https://github.com/OpenWaterAnalytics/EPyT/raw/main/epyt/networks/" + \
"asce-tf-wdst/BWSN_Network_1.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/BWSN_Network_1.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -584,8 +576,7 @@ def load_bwsn2(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "BWSN_Network_2.inp")
url = "https://github.com/OpenWaterAnalytics/EPyT/raw/main/epyt/networks/" + \
"asce-tf-wdst/BWSN_Network_2.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/BWSN_Network_2.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -632,8 +623,7 @@ def load_anytown(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "Anytown.inp")
url = "https://raw.githubusercontent.com/OpenWaterAnalytics/EPyT/main/epyt/networks/" + \
"asce-tf-wdst/Anytown.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/Anytown.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -727,7 +717,7 @@ def load_ctown(download_dir: str = get_temp_folder(), verbose: bool = True,
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "CTOWN.INP")
url = "https://github.com/scy-phy/www.batadal.net/raw/master/data/CTOWN.INP"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/CTOWN.INP"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -783,8 +773,7 @@ def load_kentucky(wdn_id: int = 1, download_dir: str = get_temp_folder(),
raise ValueError(f"Unknown network 'ky{wdn_id}.inp'")

f_in = os.path.join(download_dir, f"ky{wdn_id}.inp")
url = "https://raw.githubusercontent.com/OpenWaterAnalytics/EPyT/main/epyt/networks/" + \
f"asce-tf-wdst/ky{wdn_id}.inp"
url = f"https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/ky{wdn_id}.inp"

download_if_necessary(f_in, url, verbose)
return load_inp(f_in, flow_units_id=flow_units_id)
Expand Down Expand Up @@ -836,8 +825,7 @@ def load_hanoi(download_dir: str = get_temp_folder(),
:class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`.
"""
f_in = os.path.join(download_dir, "Hanoi.inp")
url = "https://raw.githubusercontent.com/OpenWaterAnalytics/EPyT/main/epyt/networks/" + \
"asce-tf-wdst/Hanoi.inp"
url = "https://filedn.com/lumBFq2P9S74PNoLPWtzxG4/EPyT-Flow/Networks/Hanoi.inp"

download_if_necessary(f_in, url, verbose)
config = load_inp(f_in, flow_units_id=flow_units_id)
Expand Down

0 comments on commit 14b1575

Please sign in to comment.