|
5 | 5 | import pathlib |
6 | 6 | import zipfile |
7 | 7 | from functools import reduce |
8 | | -from shutil import unpack_archive |
9 | 8 | from urllib.request import urlretrieve |
10 | 9 |
|
11 | 10 | import geopandas as gpd |
@@ -135,18 +134,19 @@ def download_natural_earth(tmpdir): |
135 | 134 | pathlib.Path(natural_earth_shape_file_path).unlink(missing_ok=True) |
136 | 135 |
|
137 | 136 |
|
138 | | -@pytest.fixture(scope="function") |
139 | | -def download_eez(tmpdir): |
140 | | - url = "https://data.pypsa.org/workflows/eur/eez/v12_20231025/World_EEZ_v12_20231025_LR.zip" |
141 | | - zipped_filename = "World_EEZ_v12_20231025_LR.zip" |
142 | | - zipped_filename_path = pathlib.Path(tmpdir, zipped_filename) |
143 | | - urlretrieve(url, zipped_filename_path) |
144 | | - unpack_archive(zipped_filename_path, tmpdir) |
145 | | - output_path = pathlib.Path( |
146 | | - tmpdir, "World_EEZ_v12_20231025_LR", "eez_v12_lowres.gpkg" |
147 | | - ) |
148 | | - yield output_path |
149 | | - pathlib.Path(output_path).unlink(missing_ok=True) |
| 137 | +# Disable because of unreliable data download |
| 138 | +# @pytest.fixture(scope="function") |
| 139 | +# def download_eez(tmpdir): |
| 140 | +# url = "https://data.pypsa.org/workflows/eur/eez/v12_20231025/World_EEZ_v12_20231025_LR.zip" |
| 141 | +# zipped_filename = "World_EEZ_v12_20231025_LR.zip" |
| 142 | +# zipped_filename_path = pathlib.Path(tmpdir, zipped_filename) |
| 143 | +# urlretrieve(url, zipped_filename_path) |
| 144 | +# unpack_archive(zipped_filename_path, tmpdir) |
| 145 | +# output_path = pathlib.Path( |
| 146 | +# tmpdir, "World_EEZ_v12_20231025_LR", "eez_v12_lowres.gpkg" |
| 147 | +# ) |
| 148 | +# yield output_path |
| 149 | +# pathlib.Path(output_path).unlink(missing_ok=True) |
150 | 150 |
|
151 | 151 |
|
152 | 152 | @pytest.fixture(scope="function") |
|
0 commit comments