Skip to content

Commit e71e292

Browse files
committed
Merge remote-tracking branch 'upstream/main' into hottel
2 parents ee64799 + 36d6f74 commit e71e292

File tree

206 files changed

+50181
-40642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+50181
-40642
lines changed

.github/workflows/asv_check.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,30 @@ jobs:
1616
shell: bash -el {0}
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0
2222

2323
- name: Install Python
24-
uses: actions/setup-python@v3
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: '3.9'
2727

2828
- name: Install asv
2929
run: pip install asv==0.4.2
3030

31+
# asv 0.4.2 (and more recent versions as well) creates conda envs
32+
# using the --force option, which was removed in conda 24.3.
33+
# Since ubuntu-latest now comes with conda 24.3 pre-installed,
34+
# using the system's conda will result in error.
35+
# To prevent that, we install an older version.
36+
# TODO: remove this when we eventually upgrade our asv version.
37+
# https://github.com/airspeed-velocity/asv/issues/1396
38+
- name: Install Conda
39+
uses: conda-incubator/setup-miniconda@v3
40+
with:
41+
conda-version: 24.1.2
42+
3143
- name: Run asv benchmarks
3244
run: |
3345
cd benchmarks

.github/workflows/flake8.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout source
9-
uses: actions/checkout@v3
9+
uses: actions/checkout@v4
1010
- name: Install Python 3.11
11-
uses: actions/setup-python@v4
11+
uses: actions/setup-python@v5
1212
with:
1313
python-version: '3.11'
1414
- name: Install Flake8 5.0.4 linter
@@ -20,7 +20,7 @@ jobs:
2020
git remote add upstream https://github.com/pvlib/pvlib-python.git
2121
git fetch upstream $GITHUB_BASE_REF
2222
- name: Run Flake8 linter
23-
run: git diff upstream/$GITHUB_BASE_REF HEAD | flake8
23+
run: git diff upstream/$GITHUB_BASE_REF HEAD -- "*.py" | flake8
2424
--exclude pvlib/version.py
2525
--ignore E201,E241,E226,W503,W504
2626
--max-line-length 79

.github/workflows/joss-pdf.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
# fetch all commits and tags so versioneer works
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Set up Python
23-
uses: actions/setup-python@v2
23+
uses: actions/setup-python@v5
2424
with:
25-
python-version: 3.8
25+
python-version: 3.9
2626

2727
- name: Install build tools
2828
run: |

.github/workflows/pytest-remote-data.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,28 @@ jobs:
5656
strategy:
5757
fail-fast: false # don't cancel other matrix jobs when one fails
5858
matrix:
59-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
59+
python-version: [3.9, "3.10", "3.11", "3.12"]
6060
suffix: [''] # the alternative to "-min"
6161
include:
62-
- python-version: 3.7
62+
- python-version: 3.9
6363
suffix: -min
6464

6565
runs-on: ubuntu-latest
6666
if: (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'remote-data')) || (github.event_name == 'push')
6767

6868
steps:
69-
- uses: actions/checkout@v3
69+
- uses: actions/checkout@v4
7070
if: github.event_name == 'pull_request_target'
7171
# pull_request_target runs in the context of the target branch (pvlib/main),
7272
# but what we need is the hypothetical merge commit from the PR:
7373
with:
7474
ref: "refs/pull/${{ github.event.number }}/merge"
7575

76-
- uses: actions/checkout@v2
76+
- uses: actions/checkout@v4
7777
if: github.event_name == 'push'
7878

7979
- name: Set up conda environment
80-
uses: conda-incubator/setup-miniconda@v2
80+
uses: conda-incubator/setup-miniconda@v3
8181
with:
8282
activate-environment: test_env
8383
environment-file: ${{ env.REQUIREMENTS }}
@@ -103,9 +103,11 @@ jobs:
103103
run: pytest pvlib/tests/iotools --cov=./ --cov-report=xml --remote-data
104104

105105
- name: Upload coverage to Codecov
106-
if: matrix.python-version == 3.7 && matrix.suffix == ''
107-
uses: codecov/codecov-action@v3
106+
if: matrix.python-version == 3.9 && matrix.suffix == ''
107+
uses: codecov/codecov-action@v4
108108
with:
109109
fail_ci_if_error: true
110110
verbose: true
111111
flags: remote-data # flags are configured in codecov.yml
112+
env:
113+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/pytest.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
fail-fast: false # don't cancel other matrix jobs when one fails
1313
matrix:
1414
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
15+
python-version: [3.9, "3.10", "3.11", "3.12"]
1616
environment-type: [conda, bare]
1717
suffix: [''] # placeholder as an alternative to "-min"
1818
include:
1919
- os: ubuntu-latest
20-
python-version: 3.7
20+
python-version: 3.9
2121
environment-type: conda
2222
suffix: -min
2323
exclude:
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
# We check out only a limited depth and then pull tags to save time
3333
- name: Checkout source
34-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3535
with:
3636
fetch-depth: 100
3737

@@ -60,7 +60,7 @@ jobs:
6060

6161
- name: Install bare Python ${{ matrix.python-version }}${{ matrix.suffix }}
6262
if: matrix.environment-type == 'bare'
63-
uses: actions/setup-python@v4
63+
uses: actions/setup-python@v5
6464
with:
6565
python-version: ${{ matrix.python-version }}
6666

@@ -82,9 +82,11 @@ jobs:
8282
pytest pvlib --cov=./ --cov-report=xml --ignore=pvlib/tests/iotools
8383
8484
- name: Upload coverage to Codecov
85-
if: matrix.python-version == 3.7 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
86-
uses: codecov/codecov-action@v3
85+
if: matrix.python-version == 3.9 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
86+
uses: codecov/codecov-action@v4
8787
with:
8888
fail_ci_if_error: true
8989
verbose: true
9090
flags: core # flags are configured in codecov.yml
91+
env:
92+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ docs/sphinx/source/reference/generated
4343
docs/sphinx/source/reference/*/generated
4444
docs/sphinx/source/savefig
4545
docs/sphinx/source/gallery
46+
docs/sphinx/source/sg_execution_times.rst
4647

4748
# Installer logs
4849
pip-log.txt

README.md

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<a href="https://pypi.org/project/pvlib/">
88
<img src="https://img.shields.io/pypi/v/pvlib.svg" alt="latest release" />
99
</a>
10-
<a href="https://anaconda.org/conda-forge/pvlib-python">
11-
<img src="https://anaconda.org/conda-forge/pvlib-python/badges/version.svg" />
10+
<a href="https://anaconda.org/conda-forge/pvlib">
11+
<img src="https://anaconda.org/conda-forge/pvlib/badges/version.svg" />
1212
</a>
13-
<a href="https://anaconda.org/conda-forge/pvlib-python">
14-
<img src="https://anaconda.org/conda-forge/pvlib-python/badges/latest_release_date.svg" />
13+
<a href="https://anaconda.org/conda-forge/pvlib">
14+
<img src="https://anaconda.org/conda-forge/pvlib/badges/latest_release_date.svg" />
1515
</a>
1616
</tr>
1717
<tr>
@@ -50,33 +50,18 @@
5050
<a href="https://doi.org/10.5281/zenodo.593284">
5151
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.593284.svg" alt="zenodo reference">
5252
</a>
53-
<a href="http://joss.theoj.org/papers/41187535cad22dd4b076c89b72f874b1">
54-
<img src="http://joss.theoj.org/papers/41187535cad22dd4b076c89b72f874b1/status.svg" alt="JOSS reference" />
55-
</a>
56-
</td>
57-
</tr>
58-
<tr>
59-
<td>Downloads</td>
60-
<td>
61-
<a href="https://pypi.org/project/pvlib/">
62-
<img src="https://img.shields.io/pypi/dm/pvlib" alt="PyPI downloads" />
63-
</a>
64-
<a href="https://anaconda.org/conda-forge/pvlib-python">
65-
<img src="https://anaconda.org/conda-forge/pvlib-python/badges/downloads.svg" alt="conda-forge downloads" />
53+
<a style="border-width:0" href="https://doi.org/10.21105/joss.05994">
54+
<img src="https://joss.theoj.org/papers/10.21105/joss.05994/status.svg" alt="DOI badge" >
6655
</a>
6756
</td>
6857
</tr>
6958
</table>
7059

7160

72-
pvlib python is a community supported tool that provides a set of
61+
pvlib python is a community developed toolbox that provides a set of
7362
functions and classes for simulating the performance of photovoltaic
74-
energy systems. pvlib python was originally ported from the PVLIB MATLAB
75-
toolbox developed at Sandia National Laboratories and it implements many
76-
of the models and methods developed at the Labs. More information on
77-
Sandia Labs PV performance modeling programs can be found at
78-
https://pvpmc.sandia.gov/. We collaborate with the PVLIB MATLAB project,
79-
but operate independently of it.
63+
energy systems and accomplishing related tasks. The core mission of pvlib python is to provide open,
64+
reliable, interoperable, and benchmark implementations of PV system models.
8065

8166

8267
Documentation
@@ -96,24 +81,39 @@ Contributing
9681
============
9782

9883
We need your help to make pvlib-python a great tool!
99-
Please see the [Contributing page](http://pvlib-python.readthedocs.io/en/stable/contributing.html) for more on how you can contribute.
84+
Please see the [Contributing page](https://pvlib-python.readthedocs.io/en/stable/contributing/index.html) for more on how you can contribute.
10085
The long-term success of pvlib-python requires substantial community support.
10186

10287

10388
Citing
10489
======
10590

106-
If you use pvlib-python in a published work, please cite:
91+
Many of the contributors to pvlib python work in institutions where
92+
citation metrics are used in performance or career evaluations. If you
93+
use pvlib python in a published work, please cite:
94+
95+
**Recommended citation for the pvlib python project**
96+
97+
Anderson, K., Hansen, C., Holmgren, W., Jensen, A., Mikofski, M., and Driesse, A.
98+
"pvlib python: 2023 project update."
99+
Journal of Open Source Software, 8(92), 5994, (2023).
100+
https://doi.org/10.21105/joss.05994
107101

108-
William F. Holmgren, Clifford W. Hansen, and Mark A. Mikofski.
102+
103+
**Recommended citation for pvlib iotools**
104+
105+
Jensen, A., Anderson, K., Holmgren, W., Mikofski, M., Hansen, C., Boeman, L., Loonen, R.
106+
"pvlib iotools —- Open-source Python functions for seamless access to solar irradiance data."
107+
Solar Energy, 266, 112092, (2023).
108+
https://doi.org/10.1016/j.solener.2023.112092
109+
110+
**Historical citation for pvlib python**
111+
112+
Holmgren, W., Hansen, C., and Mikofski, M.
109113
"pvlib python: a python package for modeling solar energy systems."
110114
Journal of Open Source Software, 3(29), 884, (2018).
111115
https://doi.org/10.21105/joss.00884
112116

113-
Please also cite the DOI corresponding to the specific version of
114-
pvlib-python that you used. pvlib-python DOIs are listed at
115-
[Zenodo.org](https://zenodo.org/search?page=1&size=20&q=conceptrecid:593284&all_versions&sort=-version)
116-
117117
If you use pvlib-python in a commercial or publicly-available application, please
118118
consider displaying one of the "powered by pvlib" logos:
119119

@@ -142,6 +142,19 @@ License
142142
BSD 3-clause.
143143

144144

145+
History and acknowledgement
146+
===========================
147+
148+
pvlib python began in 2013 as a Python translation of the [PVLIB for Matlab](https://github.com/sandialabs/MATLAB_PV_LIB)
149+
toolbox developed by Sandia National Laboratories. pvlib python has grown substantially since then.
150+
Today it contains code contributions from over a hundred individuals worldwide
151+
and is maintained by a core group of PV modelers from a variety of institutions.
152+
153+
pvlib has been supported directly and indirectly by DOE, NumFOCUS, and
154+
Google Summer of Code funding, university research projects,
155+
companies that allow their employees to contribute, and from personal time.
156+
157+
145158
NumFOCUS
146159
========
147160

benchmarks/asv.conf.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@
113113
"include": [
114114
// minimum supported versions
115115
{
116-
"python": "3.7",
116+
"python": "3.9",
117117
"build": "",
118-
"numpy": "1.16.5",
119-
"pandas": "0.25.0",
120-
"scipy": "1.4.0",
118+
"numpy": "1.19.5",
119+
"pandas": "1.3.0",
120+
"scipy": "1.6.0",
121121
// Note: these don't have a minimum in setup.py
122122
"h5py": "3.1.0",
123-
"ephem": "3.7.6.0",
124-
"numba": "0.40.0"
123+
"ephem": "4.0.0.1", // first version to support py 3.9
124+
"numba": "0.53.0", // first version to support py 3.9
125125
},
126126
// latest versions available
127127
{
128-
"python": "3.8",
128+
"python": "3.9",
129129
"build": "",
130130
"numpy": "",
131131
"pandas": "",

benchmarks/benchmarks/location.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pandas as pd
66
import pvlib
7-
from pkg_resources import parse_version
7+
from packaging.version import Version
88

99

1010
def set_solar_position(obj):
@@ -37,7 +37,7 @@ def time_location_get_clearsky(self):
3737
class Location_0_6_1:
3838

3939
def setup(self):
40-
if parse_version(pvlib.__version__) < parse_version('0.6.1'):
40+
if Version(pvlib.__version__) < Version('0.6.1'):
4141
raise NotImplementedError
4242

4343
set_solar_position(self)

0 commit comments

Comments
 (0)