Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 12, 2024
1 parent 8ed4dbc commit 9c72c76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 13 additions & 11 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,19 @@ if not config["custom_data"]["gas_network"]:

rule prepare_gas_network:
params:
gas_config= config["sector"]["gas"],
alternative_clustering= config["clustering_options"]["alternative_clustering"],
countries_list = config["countries"],
layer_id = config["build_shape_options"]["gadm_layer_id"],
update = config["build_shape_options"]["update_file"],
out_logging = config["build_shape_options"]["out_logging"],
year = config["build_shape_options"]["year"],
nprocesses = config["build_shape_options"]["nprocesses"],
contended_flag = config["build_shape_options"]["contended_flag"],
geo_crs = config["crs"]["geo_crs"],
custom_gas_network= config["custom_data"]["gas_network"],
gas_config=config["sector"]["gas"],
alternative_clustering=config["clustering_options"][
"alternative_clustering"
],
countries_list=config["countries"],
layer_id=config["build_shape_options"]["gadm_layer_id"],
update=config["build_shape_options"]["update_file"],
out_logging=config["build_shape_options"]["out_logging"],
year=config["build_shape_options"]["year"],
nprocesses=config["build_shape_options"]["nprocesses"],
contended_flag=config["build_shape_options"]["contended_flag"],
geo_crs=config["crs"]["geo_crs"],
custom_gas_network=config["custom_data"]["gas_network"],
input:
regions_onshore=pypsaearth(
"resources/bus_regions/regions_onshore_elec_s{simpl}_{clusters}.geojson"
Expand Down
4 changes: 1 addition & 3 deletions scripts/prepare_gas_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ def prepare_GGIT_data(GGIT_gas_pipeline):
df = df[df["WKTFormat"] != "--"]

# Keep pipelines that are as below
df = df[
df["Status"].isin(snakemake.params.gas_config["network_data_GGIT_status"])
]
df = df[df["Status"].isin(snakemake.params.gas_config["network_data_GGIT_status"])]

# Convert the WKT column to a GeoDataFrame
df = gpd.GeoDataFrame(df, geometry=gpd.GeoSeries.from_wkt(df["WKTFormat"]))
Expand Down

0 comments on commit 9c72c76

Please sign in to comment.