From be58676cfb8872a79fc91daee671632aab6d57c4 Mon Sep 17 00:00:00 2001 From: Piranias Date: Wed, 26 May 2021 09:52:30 +0200 Subject: [PATCH] fix tests and docstrings --- pvcompare/pv_feedin.py | 17 +++++++++++------ tests/test_main.py | 4 +++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pvcompare/pv_feedin.py b/pvcompare/pv_feedin.py index e021b884..e105bc8c 100644 --- a/pvcompare/pv_feedin.py +++ b/pvcompare/pv_feedin.py @@ -316,9 +316,9 @@ def set_up_system(technology, surface_azimuth, surface_tilt, add_sam_si_module=N surface azimuth of the module surface_tilt: float surface tilt of the module - add_sam_si_module: dict - with library (’CECMod’ or "SandiaMod") as key and module name as value. - E.g. {"cecmod":'Canadian_Solar_Inc__CS5P_220M'} + Dictionary with library (’CECMod’ or "SandiaMod") as key and module name as value. + E.g. {"cecmod":'Canadian_Solar_Inc__CS5P_220M'}. + Note that the SI module is only considered if there is the technology "SI" in Returns ------- @@ -413,8 +413,9 @@ def create_si_time_series( If True: Time series is normalized. Otherwise absolute time series is returned. add_sam_si_module: dict - with library (’CECMod’ or "SandiaMod") as key and module name as value. - E.g. {"cecmod":'Canadian_Solar_Inc__CS5P_220M'} + Dictionary with library (’CECMod’ or "SandiaMod") as key and module name as value. + E.g. {"cecmod":'Canadian_Solar_Inc__CS5P_220M'}. + Note that the SI module is only considered if there is the technology "SI" in Returns ------- @@ -613,7 +614,7 @@ def create_psi_time_series( def nominal_values_pv( - technology, area, surface_azimuth, surface_tilt, psi_type, add_sam_si_module + technology, area, surface_azimuth, surface_tilt, psi_type, add_sam_si_module=None ): """ calculates the maximum installed capacity for each pv module. @@ -633,6 +634,10 @@ def nominal_values_pv( surface azimuth of the modules surface_tilt: float surface tilt of the modules + add_sam_si_module: dict or None + Dictionary with library (’CECMod’ or "SandiaMod") as key and module name as value. + E.g. {"cecmod":'Canadian_Solar_Inc__CS5P_220M'}. + Note that the SI module is only considered if there is the technology "SI" in Returns ------- diff --git a/tests/test_main.py b/tests/test_main.py index 6eb9cb69..6d215da8 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -39,7 +39,9 @@ def setup_class(self): os.path.dirname(__file__), "data_test_main/user_inputs/pvcompare_inputs/" ) self.static_inputs_directory = constants.DEFAULT_STATIC_INPUTS_DIRECTORY - self.test_static_inputs_directory = "data/static_inputs/" + self.test_static_inputs_directory = os.path.join( + os.path.dirname(__file__), "data/static_inputs/" + ) self.user_inputs_mvs_directory = os.path.join( os.path.dirname(__file__), "data_test_main/user_inputs/mvs_inputs/" )