Skip to content

Commit

Permalink
Set up for initial release (#5)
Browse files Browse the repository at this point in the history
* updates

* fix unrelated broken test

* whatsnew

* tweak docs
  • Loading branch information
kandersolar authored Jul 1, 2023
1 parent 938cac6 commit c8411bf
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
password: ${{ secrets.PYPI_TOKEN }}
22 changes: 22 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
pvlib/solarfactors: a fork of SunPower/pvfactors
================================================

This repository is a fork of `SunPower/solarfactors <https://github.com/sunpower/pvfactors>`_,
a 2-D view factor model for simulating front- and rear-side irradiance for
bifacial PV systems.

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>`_.

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
==========================================

Expand Down
24 changes: 17 additions & 7 deletions docs/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@
'sphinx.ext.coverage',
'nbsphinx',
'sphinx.ext.napoleon',
'sphinx.ext.extlinks',
'sphinxcontrib_github_alt'
]

# For sphinxcontrib_github_alt
# For sphinxcontrib_github_alt. keep this as the original repo for old links
# (since new links use extlinks instead of this)
github_project_url = "https://github.com/SunPower/pvfactors"

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -69,9 +71,9 @@
master_doc = 'index'

# General information about the project.
project = u'pvfactors'
copyright = u'2016, SunPower Corporation'
author = u'SunPower Corporation'
project = u'solarfactors'
copyright = u'2016, SunPower Corporation and pvlib python Developers'
author = u'SunPower Corporation and pvlib python Developers'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -135,8 +137,8 @@

html_context = {
'display_github': True,
'github_user': 'SunPower',
'github_repo': 'pvfactors'
'github_user': 'pvlib',
'github_repo': 'solarfactors'
}

# Theme options are theme-specific and customize the look and feel of a theme
Expand All @@ -146,7 +148,7 @@

# Make sure the "Edit on Github" link is not broken
rst_prolog = """
:github_url: https://github.com/SunPower/pvfactors/
:github_url: https://github.com/pvlib/solarfactors/
"""

Expand Down Expand Up @@ -336,3 +338,11 @@

def setup(app):
app.add_css_file('css/custom.css')


extlinks = {
'issue': ('https://github.com/pvlib/solarfactors/issues/%s', 'GH'),
'pull': ('https://github.com/pvlib/solarfactors/pull/%s', 'GH'),
'doi': ('http://dx.doi.org/%s', 'DOI: '),
'ghuser': ('https://github.com/%s', '@')
}
1 change: 1 addition & 0 deletions docs/sphinx/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ What's New

These are new features and improvements of note in each release.

.. include:: whatsnew/v1.5.3.rst
.. include:: whatsnew/v1.5.2.rst
.. include:: whatsnew/v1.5.1.rst
.. include:: whatsnew/v1.5.0.rst
Expand Down
13 changes: 5 additions & 8 deletions docs/sphinx/whatsnew/v1.5.3.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
.. _whatsnew_153:

v1.5.3 (TBD)
v1.5.3 (June 30, 2023)
======================

This is the first release of the ``solarfactors`` fork.

Installation
------------
* The ``docs`` and ``testing`` extras in ``setup.py`` are now called ``doc`` and ``test`` (:pull:`1`)

Enhancements
------------


Requirements
------------
* Removed the upper version limit on ``pvlib`` (:pull:`5`)


Bug Fixes
----------

Testing
-------
* Migrated CI infrastructure to GitHub Actions (:pull:`1`)
Expand All @@ -28,4 +25,4 @@ Testing

Contributors
------------
* Kevin Anderson (:ghuser:`kanderso-nrel`)
* Kevin Anderson (:ghuser:`kandersolar`)
2 changes: 1 addition & 1 deletion pvfactors/tests/test_geometry/test_pvarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_ordered_pvarray_gnd_shadow_casting(params):
ordered_pvarray = OrderedPVArray.fit_from_dict_of_scalars(params)
assert len(ordered_pvarray.ts_ground.non_point_shaded_surfaces_at(0)) == 3
assert len(ordered_pvarray.ts_ground.non_point_illum_surfaces_at(0)) == 7
assert ordered_pvarray.ts_ground.shaded_length == 6.385066634855473
assert ordered_pvarray.ts_ground.shaded_length.round(3) == 6.385


def _check_ground_surfaces(ts_ground, expected_n_shadow_surfaces,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pvlib>=0.9.0,<0.10.0
pvlib>=0.9.0
shapely>=1.6.4.post2,<2
matplotlib
future
Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
with open('requirements.txt', 'r') as f:
INSTALL_REQUIRES = list(f)

DISTNAME = 'pvfactors'
AUTHOR = 'SunPower'
MAINTAINER_EMAIL = 'marc.abouanoma@sunpowercorp.com'
URL = 'https://github.com/SunPower/pvfactors'
DISTNAME = 'solarfactors'
AUTHOR = 'SunPower and pvlib python Developers'
MAINTAINER_EMAIL = 'pvlib-admin@googlegroups.com'
URL = 'https://github.com/pvlib/solarfactors'
PACKAGES = ['pvfactors', 'pvfactors.geometry', 'pvfactors.irradiance',
'pvfactors.viewfactors']
LICENSE = 'BSD 3-Clause'
Expand All @@ -24,7 +24,6 @@
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand Down

0 comments on commit c8411bf

Please sign in to comment.