[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
87f5a11bbe
commit
e0b6ebd174
@ -12,7 +12,11 @@ import numpy as np
|
||||
import pandas as pd
|
||||
import pypsa
|
||||
import xarray as xr
|
||||
from _helpers import update_config_with_sector_opts, configure_logging, set_scenario_config
|
||||
from _helpers import (
|
||||
configure_logging,
|
||||
set_scenario_config,
|
||||
update_config_with_sector_opts,
|
||||
)
|
||||
from add_existing_baseyear import add_build_year_to_new_assets
|
||||
from pypsa.clustering.spatial import normed_or_uniform
|
||||
|
||||
|
@ -15,7 +15,11 @@ import numpy as np
|
||||
import pandas as pd
|
||||
import pypsa
|
||||
import xarray as xr
|
||||
from _helpers import update_config_with_sector_opts, set_scenario_config, configure_logging
|
||||
from _helpers import (
|
||||
configure_logging,
|
||||
set_scenario_config,
|
||||
update_config_with_sector_opts,
|
||||
)
|
||||
from add_electricity import sanitize_carriers
|
||||
from prepare_sector_network import cluster_heat_buses, define_spatial, prepare_costs
|
||||
|
||||
|
@ -8,7 +8,6 @@ Build historical annual ammonia production per country in ktonNH3/a.
|
||||
|
||||
import country_converter as coco
|
||||
import pandas as pd
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
cc = coco.CountryConverter()
|
||||
|
@ -11,7 +11,6 @@ import atlite
|
||||
import geopandas as gpd
|
||||
import pandas as pd
|
||||
import xarray as xr
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -14,7 +14,6 @@ https://doi.org/10.1039/C2EE22653G.
|
||||
"""
|
||||
|
||||
import xarray as xr
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
|
||||
|
@ -11,8 +11,8 @@ import geopandas as gpd
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import xarray as xr
|
||||
from dask.distributed import Client, LocalCluster
|
||||
from _helpers import set_scenario_config
|
||||
from dask.distributed import Client, LocalCluster
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "snakemake" not in globals():
|
||||
|
@ -9,8 +9,8 @@ Build district heat shares at each node, depending on investment year.
|
||||
import logging
|
||||
|
||||
import pandas as pd
|
||||
from prepare_sector_network import get
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
from prepare_sector_network import get
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -14,7 +14,7 @@ import country_converter as coco
|
||||
import geopandas as gpd
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from _helpers import mute_print, configure_logging, set_scenario_config
|
||||
from _helpers import configure_logging, mute_print, set_scenario_config
|
||||
from tqdm import tqdm
|
||||
|
||||
cc = coco.CountryConverter()
|
||||
|
@ -11,8 +11,8 @@ import logging
|
||||
|
||||
import geopandas as gpd
|
||||
import pandas as pd
|
||||
from cluster_gas_network import load_bus_regions
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
from cluster_gas_network import load_bus_regions
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -11,9 +11,9 @@ import logging
|
||||
|
||||
import geopandas as gpd
|
||||
import pandas as pd
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
from pypsa.geo import haversine_pts
|
||||
from shapely.geometry import Point
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -13,7 +13,6 @@ from itertools import product
|
||||
import country_converter as coco
|
||||
import geopandas as gpd
|
||||
import pandas as pd
|
||||
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -11,8 +11,8 @@ from functools import partial
|
||||
|
||||
import country_converter as coco
|
||||
import pandas as pd
|
||||
from tqdm import tqdm
|
||||
from _helpers import set_scenario_config
|
||||
from tqdm import tqdm
|
||||
|
||||
cc = coco.CountryConverter()
|
||||
|
||||
|
@ -7,7 +7,6 @@ Build industrial energy demand per model region.
|
||||
"""
|
||||
|
||||
import pandas as pd
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -10,7 +10,6 @@ from itertools import product
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
# map JRC/our sectors to hotmaps sector, where mapping exist
|
||||
|
@ -13,7 +13,7 @@ from functools import partial
|
||||
import country_converter as coco
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from _helpers import mute_print, set_scenario_config, configure_logging
|
||||
from _helpers import configure_logging, mute_print, set_scenario_config
|
||||
from tqdm import tqdm
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -7,9 +7,8 @@ Build future industrial production per country.
|
||||
"""
|
||||
|
||||
import pandas as pd
|
||||
from prepare_sector_network import get
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
from prepare_sector_network import get
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "snakemake" not in globals():
|
||||
|
@ -7,9 +7,9 @@ Build industrial production per model region.
|
||||
"""
|
||||
|
||||
from itertools import product
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
import pandas as pd
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
# map JRC/our sectors to hotmaps sector, where mapping exist
|
||||
sector_mapping = {
|
||||
|
@ -13,7 +13,6 @@ import geopandas as gpd
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import xarray as xr
|
||||
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -7,7 +7,6 @@ Distribute country-level energy demands by population.
|
||||
"""
|
||||
|
||||
import pandas as pd
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -10,7 +10,6 @@ database_en>`_.
|
||||
|
||||
import geopandas as gpd
|
||||
import pandas as pd
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
|
||||
|
@ -11,9 +11,8 @@ import geopandas as gpd
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import xarray as xr
|
||||
from dask.distributed import Client, LocalCluster
|
||||
|
||||
from _helpers import set_scenario_config
|
||||
from dask.distributed import Client, LocalCluster
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "snakemake" not in globals():
|
||||
|
@ -11,8 +11,8 @@ import geopandas as gpd
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import xarray as xr
|
||||
from dask.distributed import Client, LocalCluster
|
||||
from _helpers import set_scenario_config
|
||||
from dask.distributed import Client, LocalCluster
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "snakemake" not in globals():
|
||||
|
@ -10,9 +10,9 @@ import logging
|
||||
|
||||
import geopandas as gpd
|
||||
import pandas as pd
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
from pypsa.geo import haversine_pts
|
||||
from shapely import wkt
|
||||
from _helpers import set_scenario_config, configure_logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -13,8 +13,8 @@ import sys
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pypsa
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
from prepare_sector_network import prepare_costs
|
||||
from _helpers import set_scenario_config, configure_logging
|
||||
|
||||
idx = pd.IndexSlice
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -12,6 +12,7 @@ other metrics.
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pypsa
|
||||
from _helpers import set_scenario_config
|
||||
from make_summary import calculate_cfs # noqa: F401
|
||||
from make_summary import calculate_nodal_cfs # noqa: F401
|
||||
from make_summary import calculate_nodal_costs # noqa: F401
|
||||
@ -19,7 +20,6 @@ from make_summary import assign_carriers, assign_locations
|
||||
from prepare_sector_network import prepare_costs
|
||||
from pypsa.descriptors import get_active_assets
|
||||
from six import iteritems
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
idx = pd.IndexSlice
|
||||
|
||||
|
@ -9,10 +9,10 @@ Plot clustered electricity transmission network.
|
||||
import geopandas as gpd
|
||||
import matplotlib.pyplot as plt
|
||||
import pypsa
|
||||
from _helpers import set_scenario_config
|
||||
from matplotlib.lines import Line2D
|
||||
from plot_power_network import load_projection
|
||||
from pypsa.plot import add_legend_lines
|
||||
from _helpers import set_scenario_config
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "snakemake" not in globals():
|
||||
|
@ -11,8 +11,8 @@ import logging
|
||||
import matplotlib.gridspec as gridspec
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
from prepare_sector_network import co2_emissions_year
|
||||
from _helpers import configure_logging, set_scenario_config
|
||||
from prepare_sector_network import co2_emissions_year
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
plt.style.use("ggplot")
|
||||
|
@ -12,7 +12,11 @@ import re
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pypsa
|
||||
from _helpers import update_config_with_sector_opts, set_scenario_config, configure_logging
|
||||
from _helpers import (
|
||||
configure_logging,
|
||||
set_scenario_config,
|
||||
update_config_with_sector_opts,
|
||||
)
|
||||
from add_existing_baseyear import add_build_year_to_new_assets
|
||||
from pypsa.descriptors import expand_series
|
||||
from pypsa.io import import_components_from_dataframe
|
||||
|
@ -18,7 +18,11 @@ import numpy as np
|
||||
import pandas as pd
|
||||
import pypsa
|
||||
import xarray as xr
|
||||
from _helpers import configure_logging, set_scenario_config, update_config_with_sector_opts
|
||||
from _helpers import (
|
||||
configure_logging,
|
||||
set_scenario_config,
|
||||
update_config_with_sector_opts,
|
||||
)
|
||||
from add_electricity import calculate_annuity, sanitize_carriers, sanitize_locations
|
||||
from build_energy_totals import build_co2_totals, build_eea_co2, build_eurostat_co2
|
||||
from networkx.algorithms import complement
|
||||
|
@ -36,7 +36,12 @@ import logging
|
||||
import tarfile
|
||||
from pathlib import Path
|
||||
|
||||
from _helpers import configure_logging, progress_retrieve, validate_checksum, set_scenario_config
|
||||
from _helpers import (
|
||||
configure_logging,
|
||||
progress_retrieve,
|
||||
set_scenario_config,
|
||||
validate_checksum,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -11,7 +11,12 @@ import logging
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
from _helpers import progress_retrieve, validate_checksum, set_scenario_config, configure_logging
|
||||
from _helpers import (
|
||||
configure_logging,
|
||||
progress_retrieve,
|
||||
set_scenario_config,
|
||||
validate_checksum,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user