Skip to content

Commit b079fbd

Browse files
committed
Merge remote-tracking branch 'upstream/main' into irradiance_updates
2 parents 3c651e7 + 47b8df2 commit b079fbd

File tree

194 files changed

+92446
-37560
lines changed

Some content is hidden

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

194 files changed

+92446
-37560
lines changed

.github/workflows/asv_check.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,7 @@ jobs:
2626
python-version: '3.9'
2727

2828
- name: Install asv
29-
run: pip install asv==0.4.2
30-
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
29+
run: pip install asv==0.6.4
4230

4331
- name: Run asv benchmarks
4432
run: |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
strategy:
5757
fail-fast: false # don't cancel other matrix jobs when one fails
5858
matrix:
59-
python-version: [3.9, "3.10", "3.11", "3.12"]
59+
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
6060
suffix: [''] # the alternative to "-min"
6161
include:
6262
- python-version: 3.9
@@ -100,7 +100,7 @@ jobs:
100100
SOLARANYWHERE_API_KEY: ${{ secrets.SOLARANYWHERE_API_KEY }}
101101
BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }}
102102
BSRN_FTP_PASSWORD: ${{ secrets.BSRN_FTP_PASSWORD }}
103-
run: pytest pvlib/tests/iotools --cov=./ --cov-report=xml --remote-data
103+
run: pytest tests/iotools --cov=./ --cov-report=xml --remote-data
104104

105105
- name: Upload coverage to Codecov
106106
if: matrix.python-version == 3.9 && matrix.suffix == ''

.github/workflows/pytest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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.9, "3.10", "3.11", "3.12"]
15+
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
1616
environment-type: [conda, bare]
1717
suffix: [''] # placeholder as an alternative to "-min"
1818
include:
@@ -79,7 +79,7 @@ jobs:
7979
shell: bash -l {0} # necessary for conda env to be active
8080
run: |
8181
# ignore iotools; those tests are run in a separate workflow
82-
pytest pvlib --cov=./ --cov-report=xml --ignore=pvlib/tests/iotools
82+
pytest tests --cov=./ --cov-report=xml --ignore=tests/iotools
8383
8484
- name: Upload coverage to Codecov
8585
if: matrix.python-version == 3.9 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ coverage.xml
8181

8282

8383
# Datafiles
84-
*.csv
85-
# Ignore some csv
86-
!pvlib/data/*.csv
84+
# Do not exclude data directories
85+
!pvlib/data/**
86+
!tests/data/**
8787

8888
# vi
8989
*.swp

ci/requirements-py3.12.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ dependencies:
2525
- statsmodels
2626
- pip:
2727
- nrel-pysam>=2.0
28-
# - solarfactors # required shapely<2 isn't available for 3.12
28+
- solarfactors

ci/requirements-py3.13.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: test_env
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- coveralls
7+
- cython
8+
- ephem
9+
- h5py
10+
- numba
11+
- numpy >= 1.17.3
12+
- pandas >= 1.3.0
13+
- pip
14+
- pytest
15+
- pytest-cov
16+
- pytest-mock
17+
- requests-mock
18+
- pytest-timeout
19+
- pytest-rerunfailures
20+
- conda-forge::pytest-remotedata # version in default channel is old
21+
- python=3.13
22+
- pytz
23+
- requests
24+
- scipy >= 1.6.0
25+
- statsmodels
26+
- pip:
27+
- nrel-pysam>=2.0
28+
- solarfactors

codecov.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ flags:
1414
core:
1515
paths:
1616
- pvlib/
17+
- tests/
1718
- '!pvlib/iotools/'
18-
- '!pvlib/tests/iotools/'
19+
- '!tests/iotools/'
1920
carryforward: false
2021

2122
remote-data:
2223
paths:
2324
- pvlib/iotools/
24-
- pvlib/tests/iotools
25+
- tests/iotools
2526
carryforward: true # if not run, use coverage from previous commit
2627

2728

@@ -47,15 +48,15 @@ coverage:
4748
tests-core:
4849
target: 95%
4950
paths:
50-
- 'pvlib/tests/.*'
51-
- '!pvlib/tests/iotools/.*'
51+
- 'tests/.*'
52+
- '!tests/iotools/.*'
5253
flags:
5354
- core
5455

5556
tests-remote-data:
5657
target: 95%
5758
paths:
58-
- 'pvlib/tests/iotools/.*'
59+
- 'tests/iotools/.*'
5960
flags:
6061
- remote-data
6162

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* Overrides for sphinx-hoverxref since it does not support a native dark theme, see */
2+
/* https://github.com/readthedocs/sphinx-hoverxref/issues/231 */
3+
/* Inspired by https://github.com/pybamm-team/PyBaMM/pull/3083 */
4+
5+
/* These will ensure that the tooltip inherits the pydata-sphinx-theme colours */
6+
7+
.tooltipster-sidetip.tooltipster-shadow.tooltipster-shadow-custom .tooltipster-content {
8+
background-color: var(--pst-color-background) !important;
9+
color: var(--pst-color-text-base) !important;
10+
}

docs/sphinx/source/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
intersphinx_mapping = {
6767
'python': ('https://docs.python.org/3/', None),
6868
'numpy': ('https://numpy.org/doc/stable/', None),
69-
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
69+
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
7070
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
7171
'matplotlib': ('https://matplotlib.org/stable', None),
7272
}
@@ -282,6 +282,8 @@ def setup(app):
282282
app.add_css_file("reference_format.css")
283283
# Add a warning banner at the top of the page if viewing the "latest" docs
284284
app.add_js_file("version-alert.js")
285+
# Match the color theme of tooltips to PyData Sphinx Theme light/dark mode
286+
app.add_css_file("tooltipster_color_theming.css")
285287

286288
# -- Options for LaTeX output ---------------------------------------------
287289

docs/sphinx/source/contributing/testing.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Overview
1111
Developers **must** include comprehensive tests for any additions or
1212
modifications to pvlib. New unit test code should be placed in the
1313
corresponding test module in the
14-
`pvlib/tests <https://github.com/pvlib/pvlib-python/tree/main/pvlib/tests>`_
14+
`tests <https://github.com/pvlib/pvlib-python/tree/main/tests>`_
1515
directory.
1616

1717
A pull request will automatically run the tests for you on a variety of
@@ -20,26 +20,26 @@ typically more efficient to run and debug the tests in your own local
2020
environment.
2121

2222
To run the tests locally, install the ``test`` dependencies specified in the
23-
`setup.py <https://github.com/pvlib/pvlib-python/blob/main/setup.py>`_
23+
`pyproject.toml <https://github.com/pvlib/pvlib-python/blob/main/pyproject.toml>`_
2424
file. See :ref:`installation` instructions for more information.
2525

2626
pvlib's unit tests can easily be run by executing ``pytest`` on the
27-
pvlib directory::
27+
tests directory::
2828

29-
pytest pvlib
29+
pytest tests
3030

3131
or, for a single module::
3232

33-
pytest pvlib/tests/test_clearsky.py
33+
pytest tests/test_clearsky.py
3434

3535
or, for a single test::
3636

37-
pytest pvlib/tests/test_clearsky.py::test_ineichen_nans
37+
pytest tests/test_clearsky.py::test_ineichen_nans
3838

3939
We suggest using pytest's ``--pdb`` flag to debug test failures rather
4040
than using ``print`` or ``logging`` calls. For example::
4141

42-
pytest pvlib --pdb
42+
pytest tests --pdb
4343

4444
will drop you into the
4545
`pdb debugger <https://docs.python.org/3/library/pdb.html>`_ at the
@@ -50,7 +50,7 @@ to the test suite (with rare exceptions).
5050
To include all network-dependent tests, include the ``--remote-data`` flag to
5151
your ``pytest`` call::
5252

53-
pytest pvlib --remote-data
53+
pytest tests --remote-data
5454

5555
And consider adding ``@pytest.mark.remote_data`` to any network dependent test
5656
you submit for a PR.

0 commit comments

Comments
 (0)