Skip to content

Commit 30cda13

Browse files
committed
update to main
2 parents 3dbbefd + 4089dd9 commit 30cda13

252 files changed

Lines changed: 88366 additions & 39200 deletions

File tree

Some content is hidden

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Thank you for your contribution! The following items must be addressed before the code can be merged. Please don't hesitate to ask for help if you're unsure of how to accomplish any of the items. Feel free to remove checklist items that are not relevant to your change. -->
22

33
- [ ] Closes #xxxx
4-
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing.html)
4+
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing/index.html)
55
- [ ] Tests added
66
- [ ] Updates entries in [`docs/sphinx/source/reference`](https://github.com/pvlib/pvlib-python/blob/main/docs/sphinx/source/reference) for API changes.
77
- [ ] Adds description and name entries in the appropriate "what's new" file in [`docs/sphinx/source/whatsnew`](https://github.com/pvlib/pvlib-python/tree/main/docs/sphinx/source/whatsnew) for all changes. Includes link to the GitHub Issue with `` :issue:`num` `` or this Pull Request with `` :pull:`num` ``. Includes contributor name and/or GitHub username (link with `` :ghuser:`user` ``).

.github/workflows/asv_check.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,10 @@ jobs:
2323
- name: Install Python
2424
uses: actions/setup-python@v5
2525
with:
26-
python-version: '3.9'
26+
python-version: '3.12'
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/flake8.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
steps:
88
- name: Checkout source
99
uses: actions/checkout@v4
10-
- name: Install Python 3.11
10+
- name: Install Python 3.12
1111
uses: actions/setup-python@v5
1212
with:
13-
python-version: '3.11'
13+
python-version: '3.12'
1414
- name: Install Flake8 5.0.4 linter
1515
run: pip install flake8==5.0.4 # use this version for --diff option
1616
- name: Setup Flake8 output matcher for PR annotations

.github/workflows/publish.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish distributions to PyPI
1+
name: Package build
22

33
on:
44
pull_request:
@@ -9,8 +9,8 @@ on:
99
- "v*"
1010

1111
jobs:
12-
build-n-publish:
13-
name: Build and publish distributions to PyPI
12+
build:
13+
name: Build wheel and sdist
1414
if: github.repository == 'pvlib/pvlib-python'
1515
runs-on: ubuntu-latest
1616
steps:
@@ -22,7 +22,8 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v5
2424
with:
25-
python-version: 3.9
25+
# Python version should be the minimum supported version
26+
python-version: "3.10"
2627

2728
- name: Install build tools
2829
run: |
@@ -33,13 +34,43 @@ jobs:
3334
- name: Build packages
3435
run: python -m build
3536

37+
- name: List distribution file sizes
38+
run: du -h dist/*
39+
3640
- name: Check metadata verification
3741
run: python -m twine check --strict dist/*
3842

43+
- name: Ensure that the wheel installs successfully
44+
run: |
45+
mkdir ./tmp
46+
pip install $(find dist -type f -name "*.whl") --target=./tmp
47+
48+
- name: List installed file sizes
49+
run: du -h pvlib
50+
working-directory: ./tmp
51+
52+
- name: Store the distribution packages
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: python-package-distributions
56+
path: dist/
57+
58+
publish:
59+
name: Release dist files to PyPI
3960
# only publish distribution to PyPI for tagged commits
61+
if: startsWith(github.ref, 'refs/tags/v')
62+
needs:
63+
- build
64+
runs-on: ubuntu-latest
65+
permissions:
66+
id-token: write # for PyPI trusted publishing
67+
68+
steps:
69+
- name: Download all dist files
70+
uses: actions/download-artifact@v4
71+
with:
72+
name: python-package-distributions
73+
path: dist/
74+
4075
- name: Publish distribution to PyPI
41-
if: startsWith(github.ref, 'refs/tags/v')
4276
uses: pypa/gh-action-pypi-publish@release/v1
43-
with:
44-
user: __token__
45-
password: ${{ secrets.pypi_password }}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ 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.10", "3.11", "3.12", "3.13"]
6060
suffix: [''] # the alternative to "-min"
6161
include:
62-
- python-version: 3.9
62+
- python-version: "3.10"
6363
suffix: -min
6464

6565
runs-on: ubuntu-latest
@@ -100,10 +100,10 @@ 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
106-
if: matrix.python-version == 3.9 && matrix.suffix == ''
106+
if: matrix.python-version == '3.10' && matrix.suffix == ''
107107
uses: codecov/codecov-action@v4
108108
with:
109109
fail_ci_if_error: true

.github/workflows/pytest.yml

Lines changed: 7 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.9, "3.10", "3.11", "3.12"]
15+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1616
environment-type: [conda, bare]
1717
suffix: [''] # placeholder as an alternative to "-min"
1818
include:
1919
- os: ubuntu-latest
20-
python-version: 3.9
20+
python-version: "3.10"
2121
environment-type: conda
2222
suffix: -min
2323
exclude:
@@ -40,10 +40,11 @@ jobs:
4040

4141
- name: Install Conda environment with Micromamba
4242
if: matrix.environment-type == 'conda'
43-
uses: mamba-org/setup-micromamba@v1
43+
uses: mamba-org/setup-micromamba@v2
4444
with:
4545
environment-file: ${{ env.REQUIREMENTS }}
46-
cache-downloads: true
46+
cache-downloads: false
47+
cache-environment: false
4748
create-args: >-
4849
python=${{ matrix.python-version }}
4950
condarc: |
@@ -79,10 +80,10 @@ jobs:
7980
shell: bash -l {0} # necessary for conda env to be active
8081
run: |
8182
# ignore iotools; those tests are run in a separate workflow
82-
pytest pvlib --cov=./ --cov-report=xml --ignore=pvlib/tests/iotools
83+
pytest tests --cov=./ --cov-report=xml --ignore=tests/iotools
8384
8485
- name: Upload coverage to Codecov
85-
if: matrix.python-version == 3.9 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
86+
if: matrix.python-version == '3.10' && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
8687
uses: codecov/codecov-action@v4
8788
with:
8889
fail_ci_if_error: true
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update Top Ranked Issues
2+
3+
on:
4+
schedule:
5+
# Runs every day at 00:00 AM UTC
6+
- cron: '0 0 * * *'
7+
8+
jobs:
9+
run-script:
10+
runs-on: ubuntu-latest
11+
12+
# Run only if the repository is pvlib/pvlib-python
13+
if: ${{ github.repository == 'pvlib/pvlib-python' }}
14+
15+
env:
16+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
18+
steps:
19+
- name: Check out the repository
20+
uses: actions/checkout@v4 # This ensures the repository code is available
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install PyGithub
31+
32+
- name: Run update_top_ranking_issues.py
33+
run: |
34+
python ./scripts/update_top_ranking_issues.py

.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

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,24 @@ Documentation
6868
=============
6969

7070
Full documentation can be found at [readthedocs](http://pvlib-python.readthedocs.io/en/stable/),
71-
including an [FAQ](http://pvlib-python.readthedocs.io/en/stable/user_guide/faq.html) page.
71+
including an [FAQ](https://pvlib-python.readthedocs.io/en/stable/user_guide/extras/faq.html) page.
7272

7373
Installation
7474
============
7575

7676
pvlib-python releases may be installed using the ``pip`` and ``conda`` tools.
77-
Please see the [Installation page](https://pvlib-python.readthedocs.io/en/stable/user_guide/installation.html) of the documentation for complete instructions.
77+
```bash
78+
pip install pvlib
79+
conda install -c conda-forge pvlib
80+
```
81+
Please see the [Installation page](https://pvlib-python.readthedocs.io/en/stable/user_guide/getting_started/installation.html) of the documentation for complete instructions.
7882

7983

8084
Contributing
8185
============
8286

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

8791

benchmarks/asv.conf.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@
113113
"include": [
114114
// minimum supported versions
115115
{
116-
"python": "3.9",
116+
"python": "3.10",
117117
"build": "",
118-
"numpy": "1.19.5",
119-
"pandas": "1.3.0",
120-
"scipy": "1.6.0",
118+
"numpy": "1.21.5",
119+
"pandas": "1.4.1", // first anaconda version to support py 3.10
120+
"scipy": "1.7.2",
121121
// Note: these don't have a minimum in setup.py
122-
"h5py": "3.1.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
122+
"h5py": "3.6.0", // first version to support py 3.10
123+
"ephem": "4.1.1", // first version to support py 3.10
124+
"numba": "0.55.0", // first version to support py 3.10
125125
},
126126
// latest versions available
127127
{
128-
"python": "3.9",
128+
"python": "3.10",
129129
"build": "",
130130
"numpy": "",
131131
"pandas": "",

0 commit comments

Comments
 (0)