diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index 76aa7fa1..f092c563 100755 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -550,7 +550,7 @@ def add_nice_carrier_names(n, config): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('add_electricity') + snakemake = mock_snakemake('add_electricity', weather_year='') configure_logging(snakemake) n = pypsa.Network(snakemake.input.base_network) diff --git a/scripts/add_extra_components.py b/scripts/add_extra_components.py index 9ab413d3..44f94ff7 100644 --- a/scripts/add_extra_components.py +++ b/scripts/add_extra_components.py @@ -189,7 +189,7 @@ def attach_hydrogen_pipelines(n, costs, elec_opts): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('add_extra_components', network='elec', + snakemake = mock_snakemake('add_extra_components', weather_year='', simpl='', clusters=5) configure_logging(snakemake) diff --git a/scripts/build_hydro_profile.py b/scripts/build_hydro_profile.py index fdd028e9..a6676228 100644 --- a/scripts/build_hydro_profile.py +++ b/scripts/build_hydro_profile.py @@ -71,7 +71,7 @@ logger = logging.getLogger(__name__) if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('build_hydro_profile') + snakemake = mock_snakemake('build_hydro_profile', weather_year='') configure_logging(snakemake) config_hydro = snakemake.config['renewable']['hydro'] diff --git a/scripts/build_load_data.py b/scripts/build_load_data.py index 0cad8ddf..e1a20b14 100755 --- a/scripts/build_load_data.py +++ b/scripts/build_load_data.py @@ -192,11 +192,11 @@ if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('build_load_data') + snakemake = mock_snakemake('build_load_data', weather_year='') configure_logging(snakemake) - weather_year = snakemake.wildcard.weather_year + weather_year = snakemake.wildcards.weather_year if weather_year: snapshots = dict( start=weather_year, diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index 70cadab4..87db7d0e 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -198,7 +198,7 @@ logger = logging.getLogger(__name__) if __name__ == '__main__': if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('build_renewable_profiles', technology='solar') + snakemake = mock_snakemake('build_renewable_profiles', technology='solar', weather_year='') configure_logging(snakemake) pgb.streams.wrap_stderr() diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index ea24c356..d4da9833 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -329,7 +329,7 @@ def plot_busmap_for_n_clusters(n, n_clusters, fn=None): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('cluster_network', network='elec', simpl='', clusters='5') + snakemake = mock_snakemake('cluster_network', simpl='', clusters='5', weather_year='') configure_logging(snakemake) n = pypsa.Network(snakemake.input.network) diff --git a/scripts/make_summary.py b/scripts/make_summary.py index c070d33f..8e0debb1 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -426,8 +426,8 @@ def to_csv(dfs, dir): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('make_summary', network='elec', simpl='', - clusters='5', ll='copt', opts='Co2L-24H', country='all') + snakemake = mock_snakemake('make_summary', simpl='', + clusters='5', ll='copt', opts='Co2L-24H', country='all', weather_year='') network_dir = os.path.join('..', 'results', 'networks') else: network_dir = os.path.join('results', 'networks') diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 71a6e627..25a81a22 100755 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -251,9 +251,9 @@ def plot_total_cost_bar(n, opts, ax=None): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('plot_network', network='elec', simpl='', + snakemake = mock_snakemake('plot_network', simpl='', clusters='5', ll='copt', opts='Co2L-24H', - attr='p_nom', ext="pdf") + attr='p_nom', ext="pdf", weather_year='') configure_logging(snakemake) set_plot_style() diff --git a/scripts/plot_p_nom_max.py b/scripts/plot_p_nom_max.py index e79ad274..2a8b1bbd 100644 --- a/scripts/plot_p_nom_max.py +++ b/scripts/plot_p_nom_max.py @@ -48,9 +48,9 @@ def cum_p_nom_max(net, tech, country=None): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('plot_p_nom_max', network='elec', simpl='', + snakemake = mock_snakemake('plot_p_nom_max', simpl='', techs='solar,onwind,offwind-dc', ext='png', - clusts= '5,full', country= 'all') + clusts= '5,full', country= 'all', weather_year='') configure_logging(snakemake) plot_kwds = dict(drawstyle="steps-post") diff --git a/scripts/plot_summary.py b/scripts/plot_summary.py index bc2bd30c..6c7f3926 100644 --- a/scripts/plot_summary.py +++ b/scripts/plot_summary.py @@ -165,9 +165,9 @@ def plot_energy(infn, config, fn=None): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('plot_summary', summary='energy', network='elec', + snakemake = mock_snakemake('plot_summary', summary='energy', simpl='', clusters=5, ll='copt', opts='Co2L-24H', - attr='', ext='png', country='all') + attr='', ext='png', country='all', weather_year='') configure_logging(snakemake) config = snakemake.config diff --git a/scripts/prepare_links_p_nom.py b/scripts/prepare_links_p_nom.py index b83089d6..417e04d7 100644 --- a/scripts/prepare_links_p_nom.py +++ b/scripts/prepare_links_p_nom.py @@ -60,7 +60,7 @@ def extract_coordinates(s): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake #rule must be enabled in config - snakemake = mock_snakemake('prepare_links_p_nom', simpl='', network='elec') + snakemake = mock_snakemake('prepare_links_p_nom', simpl='', weather_year='') configure_logging(snakemake) links_p_nom = pd.read_html('https://en.wikipedia.org/wiki/List_of_HVDC_projects', header=0, match="SwePol")[0] diff --git a/scripts/prepare_network.py b/scripts/prepare_network.py index ffe48fd0..6f982986 100755 --- a/scripts/prepare_network.py +++ b/scripts/prepare_network.py @@ -202,7 +202,7 @@ def set_line_nom_max(n, s_nom_max_set=np.inf, p_nom_max_set=np.inf): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('prepare_network', network='elec', simpl='', + snakemake = mock_snakemake('prepare_network', weather_year='', simpl='', clusters='40', ll='v0.3', opts='Co2L-24H') configure_logging(snakemake) diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 8c3bdad3..b5c1a1d8 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -384,7 +384,7 @@ def cluster(n, n_clusters, config): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('simplify_network', simpl='', network='elec') + snakemake = mock_snakemake('simplify_network', weather_year='', simpl='') configure_logging(snakemake) n = pypsa.Network(snakemake.input.network) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 39f2119e..ad7da9c5 100755 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -274,7 +274,7 @@ def solve_network(n, config, opts='', **kwargs): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('solve_network', network='elec', simpl='', + snakemake = mock_snakemake('solve_network', weather_year='', simpl='', clusters='5', ll='copt', opts='Co2L-BAU-CCL-24H') configure_logging(snakemake) diff --git a/scripts/solve_operations_network.py b/scripts/solve_operations_network.py index 717cba46..bac866c2 100644 --- a/scripts/solve_operations_network.py +++ b/scripts/solve_operations_network.py @@ -96,7 +96,7 @@ def set_parameters_from_optimized(n, n_optim): if __name__ == "__main__": if 'snakemake' not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake('solve_operations_network', network='elec', + snakemake = mock_snakemake('solve_operations_network', weather_year='', simpl='', clusters='5', ll='copt', opts='Co2L-BAU-24H') configure_logging(snakemake)