From 4b6ddb6b33d27750204c0eacc2e7ac158f150608 Mon Sep 17 00:00:00 2001 From: joaoguilhermeS Date: Fri, 26 Aug 2022 20:24:32 -0300 Subject: [PATCH 1/5] removing closed parameter from pandas daframes --- docs/examples/solar-position/plot_sunpath_diagrams.py | 3 +-- docs/examples/solar-tracking/plot_single_axis_tracking.py | 2 +- .../plot_single_axis_tracking_on_sloped_terrain.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/examples/solar-position/plot_sunpath_diagrams.py b/docs/examples/solar-position/plot_sunpath_diagrams.py index 2b36b7e6b4..618d5f9792 100644 --- a/docs/examples/solar-position/plot_sunpath_diagrams.py +++ b/docs/examples/solar-position/plot_sunpath_diagrams.py @@ -24,8 +24,7 @@ tz = 'Asia/Calcutta' lat, lon = 28.6, 77.2 -times = pd.date_range('2019-01-01 00:00:00', '2020-01-01', closed='left', - freq='H', tz=tz) +times = pd.date_range('2019-01-01 00:00:00', '2020-01-01', freq='H', tz=tz) solpos = solarposition.get_solarposition(times, lat, lon) # remove nighttime solpos = solpos.loc[solpos['apparent_elevation'] > 0, :] diff --git a/docs/examples/solar-tracking/plot_single_axis_tracking.py b/docs/examples/solar-tracking/plot_single_axis_tracking.py index cd318b61d6..80ed800be6 100644 --- a/docs/examples/solar-tracking/plot_single_axis_tracking.py +++ b/docs/examples/solar-tracking/plot_single_axis_tracking.py @@ -27,7 +27,7 @@ tz = 'US/Eastern' lat, lon = 40, -80 -times = pd.date_range('2019-01-01', '2019-01-02', closed='left', freq='5min', +times = pd.date_range('2019-01-01', '2019-01-02', freq='5min', tz=tz) solpos = solarposition.get_solarposition(times, lat, lon) diff --git a/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py b/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py index 66a30c60d2..d07eaabe89 100644 --- a/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py +++ b/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py @@ -91,8 +91,7 @@ gcr = 0.4 # calculate the solar position -times = pd.date_range('2019-01-01 06:00', '2019-01-01 18:00', closed='left', - freq='1min', tz=tz) +times = pd.date_range('2019-01-01 06:00', '2019-01-01 18:00', freq='1min',tz=tz) solpos = solarposition.get_solarposition(times, lat, lon) # compare the backtracking angle at various terrain slopes From 34b67bac934a4d4ac736d64bc4c5c36f6c8ef7fd Mon Sep 17 00:00:00 2001 From: joaoguilhermeS Date: Fri, 26 Aug 2022 20:25:27 -0300 Subject: [PATCH 2/5] Update v0.9.3.rst --- docs/sphinx/source/whatsnew/v0.9.3.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.9.3.rst b/docs/sphinx/source/whatsnew/v0.9.3.rst index 8f9d90e231..719e95f481 100644 --- a/docs/sphinx/source/whatsnew/v0.9.3.rst +++ b/docs/sphinx/source/whatsnew/v0.9.3.rst @@ -5,7 +5,7 @@ v0.9.3 (TBD) Deprecations ~~~~~~~~~~~~ - +it was removed the tag *close* in the examples files, since it was unsual and it is deprecated for pandas >= 1.4.0. Enhancements ~~~~~~~~~~~~ @@ -33,4 +33,4 @@ Requirements Contributors ~~~~~~~~~~~~ - +João Guilherme From 55d8fe1c02f8ca334fdc3cc30759c707f775559f Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Sun, 28 Aug 2022 07:33:12 -0600 Subject: [PATCH 3/5] Apply suggestions from code review --- .../plot_single_axis_tracking_on_sloped_terrain.py | 3 ++- docs/sphinx/source/whatsnew/v0.9.3.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py b/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py index d07eaabe89..5c0742e754 100644 --- a/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py +++ b/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py @@ -91,7 +91,8 @@ gcr = 0.4 # calculate the solar position -times = pd.date_range('2019-01-01 06:00', '2019-01-01 18:00', freq='1min',tz=tz) +times = pd.date_range('2019-01-01 06:00', '2019-01-01 18:00', freq='1min', + tz=tz) solpos = solarposition.get_solarposition(times, lat, lon) # compare the backtracking angle at various terrain slopes diff --git a/docs/sphinx/source/whatsnew/v0.9.3.rst b/docs/sphinx/source/whatsnew/v0.9.3.rst index 719e95f481..47566fffd6 100644 --- a/docs/sphinx/source/whatsnew/v0.9.3.rst +++ b/docs/sphinx/source/whatsnew/v0.9.3.rst @@ -5,7 +5,7 @@ v0.9.3 (TBD) Deprecations ~~~~~~~~~~~~ -it was removed the tag *close* in the examples files, since it was unsual and it is deprecated for pandas >= 1.4.0. + * Removed the kwarg `close` from `pd.date_range` in the examples since it is deprecated for pandas >= 1.4.0. (:pull:`1540`) Enhancements ~~~~~~~~~~~~ From 4c4c13c6e5773ce0d0c787119cf988908302f77c Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Sun, 28 Aug 2022 07:38:14 -0600 Subject: [PATCH 4/5] Update docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py --- .../plot_single_axis_tracking_on_sloped_terrain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py b/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py index 5c0742e754..979007efa1 100644 --- a/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py +++ b/docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py @@ -92,7 +92,7 @@ # calculate the solar position times = pd.date_range('2019-01-01 06:00', '2019-01-01 18:00', freq='1min', - tz=tz) + tz=tz) solpos = solarposition.get_solarposition(times, lat, lon) # compare the backtracking angle at various terrain slopes From 635e12fcee355e36914af56c0f84e06961599508 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Mon, 29 Aug 2022 11:23:52 -0400 Subject: [PATCH 5/5] Apply suggestions from code review --- docs/sphinx/source/whatsnew/v0.9.3.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.9.3.rst b/docs/sphinx/source/whatsnew/v0.9.3.rst index 47566fffd6..d916ffb558 100644 --- a/docs/sphinx/source/whatsnew/v0.9.3.rst +++ b/docs/sphinx/source/whatsnew/v0.9.3.rst @@ -5,7 +5,7 @@ v0.9.3 (TBD) Deprecations ~~~~~~~~~~~~ - * Removed the kwarg `close` from `pd.date_range` in the examples since it is deprecated for pandas >= 1.4.0. (:pull:`1540`) + * Removed the kwarg ``closed`` from ``pd.date_range`` in the examples since it is deprecated for pandas >= 1.4.0. (:pull:`1540`) Enhancements ~~~~~~~~~~~~ @@ -33,4 +33,4 @@ Requirements Contributors ~~~~~~~~~~~~ -João Guilherme +João Guilherme (:ghuser:`joaoguilhermeS`)