From d7df298b05b3b57c9434636007a43f8598377dea Mon Sep 17 00:00:00 2001 From: wolfbunke Date: Thu, 22 Mar 2018 15:45:28 +0100 Subject: [PATCH 1/6] fix test RTD --- ego/tools/io.py | 4 ++++ ego/tools/results.py | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ego/tools/io.py b/ego/tools/io.py index e8f81976..87e00e4f 100644 --- a/ego/tools/io.py +++ b/ego/tools/io.py @@ -357,3 +357,7 @@ def series_results(name, column, session, meta_args, result_id, ormclass): print('Done') logger.info('Imported eTraGo results of id = %s ', result_id) return network + + +if __name__ == '__main__': + pass diff --git a/ego/tools/results.py b/ego/tools/results.py index 7e21fbe0..052a90cc 100644 --- a/ego/tools/results.py +++ b/ego/tools/results.py @@ -14,15 +14,14 @@ __license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)" __author__ = "wolfbunke" - import io -import pandas as pd -import numpy as np import os import logging logger = logging.getLogger('ego') if not 'READTHEDOCS' in os.environ: + import pandas as pd + import numpy as np from etrago.tools.plot import (plot_line_loading, plot_stacked_gen, curtailment, gen_dist, storage_distribution, @@ -466,3 +465,7 @@ def create_etrago_results(network,scn_name): etrago = etrago.assign(investment_costs=result_invest['carrier_costs']) return etrago + + +if __name__ == '__main__': + pass From 3c0bddf293e1a5b71f81dccc2a7184ee5882a9cb Mon Sep 17 00:00:00 2001 From: wolfbunke Date: Thu, 22 Mar 2018 15:47:21 +0100 Subject: [PATCH 2/6] fix test RTD --- ego/tools/plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ego/tools/plots.py b/ego/tools/plots.py index e5d7f81a..11aad06c 100644 --- a/ego/tools/plots.py +++ b/ego/tools/plots.py @@ -12,7 +12,6 @@ import numpy as np import pandas as pd -import matplotlib.pyplot as plt import os if not 'READTHEDOCS' in os.environ: from etrago.tools.plot import (plot_line_loading, plot_stacked_gen, @@ -30,6 +29,7 @@ from egoio.db_tables.model_draft import EgoGridMvGriddistrict from egoio.db_tables.grid import EgoDpMvGriddistrict from tools.results import eGo + import matplotlib.pyplot as plt import logging logger = logging.getLogger('ego') From 319bf730d522347fcab62dce55e9b96af827e434 Mon Sep 17 00:00:00 2001 From: wolfbunke Date: Thu, 22 Mar 2018 15:52:19 +0100 Subject: [PATCH 3/6] fix test RTD --- ego/tools/plots.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ego/tools/plots.py b/ego/tools/plots.py index 11aad06c..2f9d5d57 100644 --- a/ego/tools/plots.py +++ b/ego/tools/plots.py @@ -314,10 +314,10 @@ def total_power_costs_plot(eTraGo): """ - import matplotlib.pyplot as plt + #import matplotlib.pyplot as plt plt.rcdefaults() - import numpy as np - import matplotlib.pyplot as plt + #import numpy as np + #import matplotlib.pyplot as plt fig, ax = plt.subplots() From feec64c9233cca3cba4482f33c7d2d8ab991820d Mon Sep 17 00:00:00 2001 From: wolfbunke Date: Thu, 22 Mar 2018 15:56:15 +0100 Subject: [PATCH 4/6] fix test RTD --- ego/tools/plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ego/tools/plots.py b/ego/tools/plots.py index 2f9d5d57..c60b2d5d 100644 --- a/ego/tools/plots.py +++ b/ego/tools/plots.py @@ -29,7 +29,7 @@ from egoio.db_tables.model_draft import EgoGridMvGriddistrict from egoio.db_tables.grid import EgoDpMvGriddistrict from tools.results import eGo - import matplotlib.pyplot as plt + import matplotlib.pyplot as plt import logging logger = logging.getLogger('ego') From f224d4aa0dc24025a5e4ab9a0d93942b8cbf30bd Mon Sep 17 00:00:00 2001 From: wolfbunke Date: Thu, 22 Mar 2018 16:01:58 +0100 Subject: [PATCH 5/6] fix test RTD --- ego/tools/results.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ego/tools/results.py b/ego/tools/results.py index 052a90cc..25a0fbda 100644 --- a/ego/tools/results.py +++ b/ego/tools/results.py @@ -64,9 +64,9 @@ class eTraGoResults(egoBasic): This module contains all results of eTraGo for eGo. - Example: + Example -------- - The module can be used by ``etg = eTraGoResults(eTraGo=network)`` + The module can be used by etg = eTraGoResults(eTraGo=network) See Also -------- From 84968f8f0a093fe8ad12496abb6211e059f64fd8 Mon Sep 17 00:00:00 2001 From: wolfbunke Date: Thu, 22 Mar 2018 16:15:36 +0100 Subject: [PATCH 6/6] fix test RTD --- ego/tools/results.py | 70 +++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/ego/tools/results.py b/ego/tools/results.py index 25a0fbda..01e08ca0 100644 --- a/ego/tools/results.py +++ b/ego/tools/results.py @@ -28,19 +28,19 @@ plot_voltage,plot_residual_load) class egoBasic(): - """ - eGo basics class. +""" +eGo basics class. - Parameters - ---------- +Parameters +---------- - eTraGo : Network - Network container of eTraGo based on PyPSA - eDisGo : Network - Network container of eDisGo based on PyPSA - args : dict - Dict of the scenario_setting.json - """ +eTraGo : Network + Network container of eTraGo based on PyPSA +eDisGo : Network + Network container of eDisGo based on PyPSA +args : dict + Dict of the scenario_setting.json +""" def __init__(self, eTraGo, *args, **kwargs): @@ -59,21 +59,21 @@ def __repr__(self): class eTraGoResults(egoBasic): - """eTraGo Results +"""eTraGo Results - This module contains all results of eTraGo for eGo. +This module contains all results of eTraGo for eGo. - Example - -------- - The module can be used by etg = eTraGoResults(eTraGo=network) +Example +-------- +The module can be used by etg = eTraGoResults(eTraGo=network) - See Also - -------- - `The eTraGo documentation on Extensions - `_ +See Also +-------- +`The eTraGo documentation on Extensions +`_ - """ +""" def __init__(self,eTraGo, *args, **kwargs): super().__init__(eTraGo, *args, **kwargs) @@ -107,15 +107,15 @@ def __init__(self,eTraGo, *args, **kwargs): class eDisGoResults(egoBasic): - """ eDisGo Results +""" eDisGo Results - This module contains all results of eDisGo for eGo. +This module contains all results of eDisGo for eGo. - ToDo: - add eDisGo - add iteration for multiple ding0 grids +ToDo: + add eDisGo + add iteration for multiple ding0 grids - """ +""" def __init__(self,eDisGo): super().__init__(eDisGo) self.edisgo = pd.DataFrame() @@ -124,18 +124,20 @@ def __init__(self,eDisGo): class eGo(eTraGoResults): - """Main eGo module which including all results and main functionalities. +"""Main eGo module which including all results and main functionalities. - Parameters - ---------- - eTraGo : Network - eDisGo : Network +Parameters +---------- +eTraGo : Network + +eDisGo : Network + - ToDo: +ToDo: add eDisGo - """ +""" def __init__(self,eTraGo, scn_name): super().__init__(eTraGo, scn_name) #super().__init__(eDisGo)