-
Notifications
You must be signed in to change notification settings - Fork 7
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
Migrate to Shapely 2.0+ #22
Open
joseph-sch
wants to merge
30
commits into
pvlib:main
Choose a base branch
from
solargik:migrate_to_shapely_2.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
fd1d56c
Add instructions for testing
joseph-sch 676d999
Fix the check on shapely/GEOS
joseph-sch 3a5c7f9
WIP on base.py - compose instead of inheriting
joseph-sch 1a4a666
12 tests of base and 4 of utils pass
joseph-sch f478801
Whitespace
joseph-sch 8ca29b6
Fix in plot
joseph-sch 1ddd543
6 utils test pass, with 1 warning
joseph-sch 92bee9d
More adaptations -> 86 passed, 16 failed
joseph-sch f1386cf
Implemen cache of _geometry for ShadeCollection and PVSegment
joseph-sch c511b4d
Property coords and iterate over difference geometries 90 vs. 12
joseph-sch d90f5a7
Add method intersects to BaseSide
joseph-sch 7525d92
Migrate PVRow
joseph-sch a4746fb
Add centroid property to BaseSurface
joseph-sch 7f9cbe3
Fix plots
joseph-sch 2fabbe4
All tests pass
joseph-sch 7d38df6
Update requirements
joseph-sch 36e39f8
Removed a line
joseph-sch 594b122
Bring README to relevance (links, etc.)
joseph-sch 416af05
Merge branch 'update_readme' into migrate_to_shapely_2.0
joseph-sch 783c451
Use dwithin rather than distance
joseph-sch ff383e3
Fix all but 3 divide-by-zero RuntimeWarning
joseph-sch c774861
Fix an error message and README
joseph-sch 0fb57bb
Fix for failing Read the Docs build
joseph-sch f684812
Fix to fix?
joseph-sch 7317e7c
Restore missing path
joseph-sch d5f8980
Remove ~=4.0 in sphinx requirement
joseph-sch 90b3128
Fix sphinx exception
joseph-sch 9cedd87
Fix README.rst (solarfactors instead of openfactors)
joseph-sch 4a9011a
Fix README.rst (solarfactors instead of openfactors)
joseph-sch 5789f49
Merge remote-tracking branch 'origin/main' into migrate_to_shapely_2.0
joseph-sch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,16 +9,13 @@ This fork exists so that the pvfactors model can continue to be used with | |||||||||||||||||||||
`pvlib python <https://github.com/pvlib/pvlib-python>`_ even though the original | ||||||||||||||||||||||
repository is no longer maintained. The objective is to provide a working | ||||||||||||||||||||||
dependency for the existing pvfactors functionality currently in pvlib python. | ||||||||||||||||||||||
New features may be added, but don't count on it. | ||||||||||||||||||||||
|
||||||||||||||||||||||
Documentation for this fork can be found at `Read The Docs <https://solarfactors.readthedocs.io>`_. | ||||||||||||||||||||||
Documentation for this fork can be found at `Read the Docs <https://solarfactors.readthedocs.io>`_. | ||||||||||||||||||||||
|
||||||||||||||||||||||
The project can be installed from PyPI using ``pip install solarfactors``. Note | ||||||||||||||||||||||
that the package is still used from python under the ``pvfactors`` name, i.e. | ||||||||||||||||||||||
with ``from pvfactors.geometry import OrderedPVArray``. | ||||||||||||||||||||||
|
||||||||||||||||||||||
The original ``pvfactors`` is preserved below: | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
pvfactors: irradiance modeling made simple | ||||||||||||||||||||||
========================================== | ||||||||||||||||||||||
|
@@ -34,6 +31,8 @@ equations to account for reflections between all of the surfaces. | |||||||||||||||||||||
|
||||||||||||||||||||||
pvfactors was originally ported from the SunPower developed 'vf_model' package, which was introduced at the IEEE PV Specialist Conference 44 2017 (see [#pvfactors_paper]_ and link_ to paper). | ||||||||||||||||||||||
|
||||||||||||||||||||||
This fork, `pvlib/solarfactors <https://github.com/pvlib/solarfactors>`_ is maintained by the pvlib project with contributions from the pvlib community. | ||||||||||||||||||||||
|
||||||||||||||||||||||
------------------------------------------ | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. contents:: Table of contents | ||||||||||||||||||||||
|
@@ -44,8 +43,8 @@ pvfactors was originally ported from the SunPower developed 'vf_model' package, | |||||||||||||||||||||
Documentation | ||||||||||||||||||||||
------------- | ||||||||||||||||||||||
|
||||||||||||||||||||||
The documentation can be found `here <https://sunpower.github.io/pvfactors>`_. | ||||||||||||||||||||||
It includes a lot of tutorials_ that describe the different ways of using pvfactors. | ||||||||||||||||||||||
The documentation of this fork can be found `here <https://solarfactors.readthedocs.io>`_. | ||||||||||||||||||||||
It includes a lot of tutorials_ that describe the different ways of using solarfactors. | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Quick Start | ||||||||||||||||||||||
|
@@ -187,11 +186,11 @@ The users can also create a "report" while running the simulations that will rel | |||||||||||||||||||||
Installation | ||||||||||||||||||||||
------------ | ||||||||||||||||||||||
|
||||||||||||||||||||||
pvfactors is currently compatible and tested with 3.6+, and is available in `PyPI <https://pypi.org/project/pvfactors/>`_. The easiest way to install pvfactors is to use pip_ as follows: | ||||||||||||||||||||||
solarfactors is currently compatible and tested with Python 3.11 and Shapely 2.0.6, and is available in `PyPI <https://pypi.org/project/solarfactors/>`_. The easiest way to install solarfactors is to use pip_ as follows: | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. code:: sh | ||||||||||||||||||||||
|
||||||||||||||||||||||
$ pip install pvfactors | ||||||||||||||||||||||
$ pip install solarfactors | ||||||||||||||||||||||
|
||||||||||||||||||||||
The package wheel files are also available in the `release section`_ of the Github repository. | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
@@ -203,13 +202,13 @@ Requirements are included in the ``requirements.txt`` file of the package. Here | |||||||||||||||||||||
|
||||||||||||||||||||||
* `numpy <https://pypi.python.org/pypi/numpy>`_ | ||||||||||||||||||||||
* `pvlib-python <https://pypi.python.org/pypi/pvlib>`_ | ||||||||||||||||||||||
* `shapely <https://pypi.python.org/pypi/Shapely>`_ | ||||||||||||||||||||||
* `shapely <https://pypi.python.org/pypi/Shapely>`_ (version >= 2.0) | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Citing pvfactors | ||||||||||||||||||||||
---------------- | ||||||||||||||||||||||
|
||||||||||||||||||||||
We appreciate your use of pvfactors. If you use pvfactors in a published work, we kindly ask that you cite: | ||||||||||||||||||||||
If you use solarfactors in a published work, cite the following paper: | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
.. parsed-literal:: | ||||||||||||||||||||||
|
@@ -220,8 +219,9 @@ We appreciate your use of pvfactors. If you use pvfactors in a published work, w | |||||||||||||||||||||
Contributing | ||||||||||||||||||||||
------------ | ||||||||||||||||||||||
|
||||||||||||||||||||||
Contributions are needed in order to improve pvfactors. | ||||||||||||||||||||||
If you wish to contribute, you can start by forking and cloning the repository, and then installing pvfactors using pip_ in the root folder of the package: | ||||||||||||||||||||||
Contributions are needed in order to improve solarfactors. | ||||||||||||||||||||||
|
||||||||||||||||||||||
If you wish to contribute, you can start by forking and cloning the repository, and then installing openfactors using pip_ in the root folder of the package: | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. code:: sh | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
@@ -234,6 +234,25 @@ To install the package in editable mode, you can use: | |||||||||||||||||||||
|
||||||||||||||||||||||
$ pip install -e . | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Testing | ||||||||||||||||||||||
+++++++ | ||||||||||||||||||||||
|
||||||||||||||||||||||
Install test dependencies by running: | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. code:: sh | ||||||||||||||||||||||
|
||||||||||||||||||||||
$ pip install pytest mock | ||||||||||||||||||||||
Comment on lines
+241
to
+245
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Then run the tests using: | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. code:: sh | ||||||||||||||||||||||
|
||||||||||||||||||||||
$ python -m pytest | ||||||||||||||||||||||
|
||||||||||||||||||||||
You will need to close manually the plots that are generated during the tests, unless you define the ``CI`` environment variable, which will disable the tests that generate plots. | ||||||||||||||||||||||
kandersolar marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Releasing | ||||||||||||||||||||||
+++++++++ | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
@@ -254,27 +273,27 @@ References | |||||||||||||||||||||
|
||||||||||||||||||||||
.. _link: https://pdfs.semanticscholar.org/ebb2/35e3c3796b158e1a3c45b40954e60d876ea9.pdf | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. _tutorials: https://sunpower.github.io/pvfactors/tutorials/index.html | ||||||||||||||||||||||
.. _tutorials: https://solarfactors.readthedocs.io/en/latest/tutorials/index.html | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. _`full mode`: https://sunpower.github.io/pvfactors/theory/problem_formulation.html#full-simulations | ||||||||||||||||||||||
.. _`full mode`: https://solarfactors.readthedocs.io/en/latest/theory/problem_formulation.html#full-simulations | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. _`fast mode`: https://sunpower.github.io/pvfactors/theory/problem_formulation.html#fast-simulations | ||||||||||||||||||||||
.. _`fast mode`: https://solarfactors.readthedocs.io/en/latest/theory/problem_formulation.html#fast-simulations | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. _pip: https://pip.pypa.io/en/stable/ | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. _`release section`: https://github.com/SunPower/pvfactors/releases | ||||||||||||||||||||||
.. _`release section`: https://github.com/pvlib/solarfactors/releases | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. |Logo| image:: https://raw.githubusercontent.com/SunPower/pvfactors/master/docs/sphinx/_static/logo.png | ||||||||||||||||||||||
:target: http://sunpower.github.io/pvfactors/ | ||||||||||||||||||||||
.. |Logo| image:: https://github.com/pvlib/solarfactors/blob/main/docs/sphinx/_static/logo_small.png?raw=true | ||||||||||||||||||||||
:target: https://solarfactors.readthedocs.io/en/latest/index.html | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. |CircleCI| image:: https://circleci.com/gh/SunPower/pvfactors.svg?style=shield | ||||||||||||||||||||||
:target: https://circleci.com/gh/SunPower/pvfactors | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. |License| image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg | ||||||||||||||||||||||
:target: https://github.com/SunPower/pvfactors/blob/master/LICENSE | ||||||||||||||||||||||
:target: https://github.com/pvlib/solarfactors/blob/main/LICENSE | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. |PyPI-Status| image:: https://img.shields.io/pypi/v/pvfactors.svg | ||||||||||||||||||||||
:target: https://pypi.org/project/pvfactors | ||||||||||||||||||||||
.. |PyPI-Status| image:: https://img.shields.io/pypi/v/solarfactors.svg | ||||||||||||||||||||||
:target: https://pypi.org/project/solarfactors/ | ||||||||||||||||||||||
|
||||||||||||||||||||||
.. |PyPI-Versions| image:: https://img.shields.io/pypi/pyversions/pvfactors.svg?logo=python&logoColor=white | ||||||||||||||||||||||
:target: https://pypi.org/project/pvfactors | ||||||||||||||||||||||
.. |PyPI-Versions| image:: https://img.shields.io/pypi/pyversions/solarfactors.svg?logo=python&logoColor=white | ||||||||||||||||||||||
:target: https://pypi.org/project/solarfactors/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, one more