Skip to content

Increase python requirement to >= 3.8 #2029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 3, 2024
Merged

Conversation

kandersolar
Copy link
Member

@kandersolar kandersolar added testing remote-data triggers --remote-data pytests labels May 1, 2024
@kandersolar kandersolar added this to the v0.10.5 milestone May 1, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change going to affect a patch version or a minor one, v0.11.0, is preferred? I expected next release to be v0.11 but dunno.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree there is reason to generally prefer to drop support for a python version in a minor release, not a patch release. The choice to do it in a patch release in this particular case was motivated by (taken from #1975 (comment)):

Waiting for 0.11.0 would put the desire to drop 3.7 ASAP (#2023) in conflict with wanting to wait at least a year before removing the 0.10.0 (released June 2023) deprecations set to expire in 0.11.0.

So we want to make a release soon, but we still want to wait a little while for 0.11.0. I think including this in 0.10.5 is the best option. Also, this won't be the first time that we have dropped support for a python version in a patch release. For example we dropped 3.6 in v0.9.2.

So I don't love it either, but I don't see a better option. Ideas are welcome :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine. I don't have any strong opinion other than NEP29, but since this project doesn't follow it, I only advocate for moving forward the supported python version ^.^

Thanks for the explanation!

@kandersolar kandersolar mentioned this pull request May 2, 2024
"build": "",
"numpy": "1.17.5",
"pandas": "1.3.0",
"scipy": "1.6.0",
// Note: these don't have a minimum in setup.py
"h5py": "3.1.0",
"ephem": "3.7.6.0",
"numba": "0.40.0"
"ephem": "3.7.7.0", // first version to support py 3.8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"ephem": "3.7.7.0", // first version to support py 3.8
"ephem": "3.7.7.1", // first version to support py 3.8

If I understood the information on pypi correctly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 3.7.7.0 has wheels available for python 3.8: https://pypi.org/project/ephem/3.7.7.0/#files

That's how I identified these versions. Is there a different/better way?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're asking the wrong person! I was just browsing to get a sense for the consequences.

@@ -103,8 +103,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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this break with python 3.8 even though the pandas version didn't change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to this PR, we had ReadTheDocs configured to use python 3.7, but we did not specify a particular pandas version to use for the documentation build. That means RTD had been using the latest version of pandas that was available for python 3.7 (pandas 1.3.5). With this PR updating the configuration to use python 3.8 but leaving the pandas version unspecified, ReadTheDocs then had access to a newer version of pandas, and in particular one that required these changes (pandas 2.0.3).

So updating the python version used in the docs build did change the pandas version that gets used, since we aren't telling RTD to use a particular pandas version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. So the equivalent would now be inclusive='left'? (That may not matter for the example.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think so. And I agree it does not matter for this example, so I opted to simplify and just remove the parameter rather than update to the new name.

@kandersolar
Copy link
Member Author

I see some thumbs up in #1975, so I'll assume this is uncontroversial. I want to get this release out the door before the PVPMC workshop next week, so I'm going to merge this and then open the release finalization PR.

@kandersolar kandersolar merged commit a673b85 into pvlib:main May 3, 2024
30 checks passed
@kandersolar kandersolar deleted the py37 branch May 3, 2024 20:44
echedey-ls pushed a commit to echedey-ls/pvlib-python that referenced this pull request May 22, 2024
* require python >=3.8

* update CI configurations

* whatsnew

* remove pre-3.8 cruft

* fix h5py/numpy versioning issue for py3.8-min

* update gallery examples for newer pandas

* update asv config for python 3.8

* fix asv config syntax error

* one more asv config edit
echedey-ls pushed a commit to echedey-ls/pvlib-python that referenced this pull request May 23, 2024
* require python >=3.8

* update CI configurations

* whatsnew

* remove pre-3.8 cruft

* fix h5py/numpy versioning issue for py3.8-min

* update gallery examples for newer pandas

* update asv config for python 3.8

* fix asv config syntax error

* one more asv config edit
kandersolar added a commit that referenced this pull request Jun 21, 2024
* Update shading.py

* Minimal test

* Implementation

From NREL paper

* Fix, fix, fix, fix & format

* Format issues

* Extend tests (compare with singleaxis) & format with ruff

* Format fixes

* Upgrade tests

* Array -> Axis

* type

* Whatsnew

* xd

* bruh

* Minor Python optimization a la tracking.singleaxis

* Comment and minor optimizations

* Surface -> Axis

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Elevation -> Zenith

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Elev -> Zenith

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Update shading.py

* Update docstring

Co-Authored-By: Anton Driesse <9001027+adriesse@users.noreply.github.com>

* Add comments from `tracking.singleaxis`

Co-Authored-By: Will Holmgren <william.holmgren@gmail.com>
Co-Authored-By: Mark Mikofski <bwana.marko@yahoo.com>

* Singleaxis implementation port & test addition, based on old pvlib.tracking.singleaxis

* Update v0.10.4.rst

* Linter

* Code review

Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>

* Add Fig 5 [1] (still gotta check the built output)

* Add caption, change size and describe in alternate text

* rST fixes ?

* Figures have captions, images do not

https://pandemic-overview.readthedocs.io/en/latest/myGuides/reStructuredText-Images-and-Figures-Examples.html#id18

* Flip arguments order

* I forgot 💀

* Linter are you happy now?

* Remove port test and add edge cases test

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Update test_shading.py

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Indentation xd

* Update test_shading.py

* I forgot how to code

* Align data

* Docstring suggestion from Kevin

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Update link to example?

* add linear shade loss for thin films

* add tests, update docs, what's new

* fix what's new gh issue and pr links

* fix trailing whitespace

* responding to comments

- move linear shade loss to shading module
- don't use ternary, doesn't work on vectors, instead use np.where()
- set cross axis default to zero
- test vectors
- update docs

* update docstring for linear shade loss

- applicable to other monolithic thin film like CIGS, not just CdTe
- only when shade is perpendicular to scribe lines

* update example in linear_shade_loss

* add figure and formulas to shaded fraction

* shaded fraction consistently

* Add alternative text to image

* Update implementation based on PSZ PR. See description.

Commit highlights ✨ :
* I think I made all the code a bit more legible; sorry for the big changes @mikofski
* Tests a bit more complete (not much, still consider the same test data)
* Rename shaded fraction acronym from `fs` to `sf`
* Asserts changed to `assert_allclose` for a more legible output in case of failure

Co-Authored-By: Mark Mikofski <bwana.marko@yahoo.com>

* Whatsnew entries

Co-Authored-By: Mark Mikofski <bwana.marko@yahoo.com>

* Linter

* Clear things, convert Mark's reference to a reference

* Linter

* Update according to changes at PSZA PR

* Another commit, another try

* Ahhh, I rebased too fast

* whatsnews

* Update v0.10.4.rst

* Update v0.10.3.rst

* Rename to `shaded_fraction1d`, change params to `surface_*` instead of `tracker_*`

* Left this tracker refs behind

* Change rename in rst entries

* Add another testcase

* Improve docs references, clarify nomenclature

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Update test_shading.py

* Remove linear_shade_loss

* First implementation of the new shaded fraction model (missing figure)

* Create Anderson_Jensen_2024_Fig3.png

* Update shading.py

* Update shading.py

* Update shading.py

* lintaaargggg

* Fill reference

* Next release 0.10.5?

* Fix tests

* Update test_shading.py

* Little improvement to table definitions

* Change `l` to `\ell`

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* `pvlib.tracking.projected_solar_zenith_angle` to `pvlib.shading.projected_solar_zenith_angle`

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* pitch references to `pitch`

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* `trackers_axis_azimuth` to `axis_azimuth`

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* whatsnews

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Update v0.10.5.rst

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Change `tilt`s to `rotation`s and add `axis_tilt`

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Forgot to update tests 💀

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Add examples section

* roles assumption messin w/ me docs 😲

* roles assumption messin w/ me docs 😲

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Update shading.py

* Update shading.py

* Add gallery example

* This was fixed in recent sphinx-gallery releases IIRC

* Extra empty line or admonition type unsupported

* Fix example link (hopefully 🙏  )

* Update shading.py

* Fix subsubsections?

* Nah, bulleted list didn't work

* tilted -> tracker, only affects text

* Typos and unreasonable physical values

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* See the Examples section below, not the unlinkable link

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* tracker -> row, param names, code and docs

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Fix broken example 🔧

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* "the row axis/axes" instead of ``axis_azimuth``

* Unnecessary math mode

Co-Authored-By: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* Example suggestions and text trimming

Co-Authored-By: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* whatsmes

* Add test to fix coverage issue

* Initial work

* Can't test with the paper data, wtf

* Little things

* Update plot_martinez_shade_loss.py

* More improvements

* Be4 rebase

* Fix fixture

* Initial work

* Fix tests

* docstring

* whatsnew 📝

* Minor thingies

* Add figure, improve docs 💯

* Fix silently ignoring file path in `pvsystem.retrieve_sam` when `name` is provided (#2020)

* My approach to the issue

* Deprecate previous parameters

* No reason to over-engineer, right?

* Update v0.10.5.rst

* Update pvsystem.py

* Improve error handling

* Add ppl involved

* kevin's suggestions

* Fix Ixx equation in pvsystem.sapm (#2019)

* fix Ixx equation, use Aimp

* Update docs/sphinx/source/whatsnew/v0.10.5.rst

* lint

* lint

* get the spacing right

* more spacing

---------

Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>

* Increase python requirement to >= 3.8 (#2029)

* require python >=3.8

* update CI configurations

* whatsnew

* remove pre-3.8 cruft

* fix h5py/numpy versioning issue for py3.8-min

* update gallery examples for newer pandas

* update asv config for python 3.8

* fix asv config syntax error

* one more asv config edit

* Finalize 0.10.5 (#2035)

* whatsnew cleanup

* add v0.11.0 file

* forgot to include myself in the contributors

* update release date

* Comments from review

* update whatsnews

* Update test_shading.py

* Example

* Fix whatsmes

* Update v0.11.0.rst

* other img

* lintarrrrrr 😭

* docs

* docs refurbishment

* Update plot_martinez_shade_loss.py

* Fix parameter names

* More explicit 2D shaded fraction

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Explicitier explicit

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Update shading.py

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Only if life was VCS to revert my errors so easily

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Nix image in docstring

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Clear-up irrdiance loss, not pwr loss - yet again

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* rewording

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Remove figure of junction boxes in example

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Duplicated singleaxis call

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* When did I change this?

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Rename function

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Make times just one statement

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Fix uncomplete example in docstring

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* flake is a snowflake ❄️

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Delete Centralized_and_split_PV_junction_boxes_cesardd.jpg

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Remove example description

Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>

* Change example title

Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>

* Ints for number of blocks

Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>

* Rephrasing of shaded fraction 2D

Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>

* typo

* Code review from Ioannis

Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* no more noqa e501

* Will this work to hide code?

* Update plot_martinez_shade_loss.py

Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* play time with the matplotlib statements

Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* This fixes it (I believe 🙏 )

CC @IoannisSifnaios

Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* Update plot_martinez_shade_loss.py

Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* Nah, let's see how this does

Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* Revert attempt to colapse code

It doesn't work because sphinx-gallery closes the figure at the end of the cell
sphinx-gallery/sphinx-gallery#240

CC @IoannisSifnaios

Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* Power losses model

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>
Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* equations rendering

* Change `poa_direct_and_circumsolar` to `poa_direct`

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Example link

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* `power_loss` -> `loss_fraction`

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Typo when applying Ioannis suggestion

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>

* Re-arrange POA to its own section in example

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Mis-redaction in normal/half-cut modules comparison

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Add edge cases

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Link yet again

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Fix link for sure

Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>

* Remove critical error from docs build

* Apply suggestions from code review (Cliff)

Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>

* Linter

* Apply suggestions from Adam

Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* Rewording from code review

Co-Authored-By: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* More unitless

Co-Authored-By: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* Apply suggestions from Cliff

Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>

---------

Co-authored-by: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-authored-by: Anton Driesse <9001027+adriesse@users.noreply.github.com>
Co-authored-by: Will Holmgren <william.holmgren@gmail.com>
Co-authored-by: Mark Mikofski <bwana.marko@yahoo.com>
Co-authored-by: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
Co-authored-by: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
remote-data triggers --remote-data pytests testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.7 not available for macOS v14 in GitHub Actions retire support for python 3.7
3 participants