From e19ded59b2a4bd809a51696af3494f477394fced Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Tue, 14 Dec 2021 10:33:31 -0500 Subject: [PATCH 1/4] require shapely<=1.7.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c3fd389..a87d417 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pvlib>=0.9.0,<0.10.0 -shapely>=1.6.4.post2 +shapely>=1.6.4.post2,<=1.7.1 matplotlib future six From f90e46815ac38bf3f8a3072f548593191262b0c5 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Tue, 14 Dec 2021 10:34:31 -0500 Subject: [PATCH 2/4] whatsnew --- docs/sphinx/whatsnew/v1.5.2.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/whatsnew/v1.5.2.rst b/docs/sphinx/whatsnew/v1.5.2.rst index ce9df6f..e3a5c3f 100644 --- a/docs/sphinx/whatsnew/v1.5.2.rst +++ b/docs/sphinx/whatsnew/v1.5.2.rst @@ -3,10 +3,14 @@ v1.5.2 (DATE XX, 2021) ====================== -Enhancements +Requirements ------------ * Add python 3.9 to test configuration (:ghpull:`122`) +* Set the upper bound on shapely to version 1.7.1 (released Aug 20, 2020) + to suppress deprecation warnings. The shapely dependency may be dropped + altogether in a future pvfactors release. (:ghpull:`130`) + Fixes ----- From 3e74019441fa2640aae28c7343540f0181bcf9ce Mon Sep 17 00:00:00 2001 From: Kevin Anderson <57452607+kanderso-nrel@users.noreply.github.com> Date: Tue, 11 Jan 2022 16:02:25 -0700 Subject: [PATCH 3/4] Apply suggestions from code review --- docs/sphinx/whatsnew/v1.5.2.rst | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sphinx/whatsnew/v1.5.2.rst b/docs/sphinx/whatsnew/v1.5.2.rst index e3a5c3f..fb3fdbb 100644 --- a/docs/sphinx/whatsnew/v1.5.2.rst +++ b/docs/sphinx/whatsnew/v1.5.2.rst @@ -7,8 +7,8 @@ Requirements ------------ * Add python 3.9 to test configuration (:ghpull:`122`) -* Set the upper bound on shapely to version 1.7.1 (released Aug 20, 2020) - to suppress deprecation warnings. The shapely dependency may be dropped +* Set the upper bound on shapely to version 2.0 (not yet released). + The shapely dependency may be dropped altogether in a future pvfactors release. (:ghpull:`130`) diff --git a/requirements.txt b/requirements.txt index a87d417..38a4094 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pvlib>=0.9.0,<0.10.0 -shapely>=1.6.4.post2,<=1.7.1 +shapely>=1.6.4.post2,<2 matplotlib future six From ef3526895b2e9b0cd0722a830793e8d80cee9657 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Tue, 11 Jan 2022 18:38:33 -0500 Subject: [PATCH 4/4] switch assert_almost_equal to assert_allclose, update test tolerance --- pvfactors/tests/test_engine.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pvfactors/tests/test_engine.py b/pvfactors/tests/test_engine.py index 7560471..c5f1991 100644 --- a/pvfactors/tests/test_engine.py +++ b/pvfactors/tests/test_engine.py @@ -652,21 +652,21 @@ def test_engine_w_faoi_fn_in_irradiance_vfcalcs(params, pvmodule_canadian): # Run timestep pvarray = eng.run_full_mode(fn_build_report=lambda pvarray: pvarray) # Checks - np.testing.assert_almost_equal( + np.testing.assert_allclose( pvarray.ts_pvrows[0].front.get_param_weighted('qinc'), 1110.1164773159298) - np.testing.assert_almost_equal( + np.testing.assert_allclose( pvarray.ts_pvrows[1].front.get_param_weighted('qinc'), 1110.595903991) - np.testing.assert_almost_equal( + np.testing.assert_allclose( pvarray.ts_pvrows[2].front.get_param_weighted('qinc'), 1112.37717553) - np.testing.assert_almost_equal( + np.testing.assert_allclose( pvarray.ts_pvrows[1].back.get_param_weighted('qinc'), 116.49050349491208) # Check absorbed irradiance: calculated using faoi functions - np.testing.assert_almost_equal( + np.testing.assert_allclose( pvarray.ts_pvrows[2].front.get_param_weighted('qabs'), - [1109.1180884]) - np.testing.assert_almost_equal( + [1109.1180884], rtol=1e-6) + np.testing.assert_allclose( pvarray.ts_pvrows[1].back.get_param_weighted('qabs'), [114.2143503])