Skip to content

Commit

Permalink
Merge pull request #4 from AdamRJensen/test_cron_script
Browse files Browse the repository at this point in the history
Test cron script
  • Loading branch information
AdamRJensen authored Oct 19, 2024
2 parents 3c7b5da + 7d15199 commit b533057
Show file tree
Hide file tree
Showing 168 changed files with 44,645 additions and 40,044 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/asv_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,30 @@ jobs:
shell: bash -el {0}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install asv
run: pip install asv==0.4.2

# asv 0.4.2 (and more recent versions as well) creates conda envs
# using the --force option, which was removed in conda 24.3.
# Since ubuntu-latest now comes with conda 24.3 pre-installed,
# using the system's conda will result in error.
# To prevent that, we install an older version.
# TODO: remove this when we eventually upgrade our asv version.
# https://github.com/airspeed-velocity/asv/issues/1396
- name: Install Conda
uses: conda-incubator/setup-miniconda@v3
with:
conda-version: 24.1.2

- name: Run asv benchmarks
run: |
cd benchmarks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Flake8 5.0.4 linter
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
runs-on: ubuntu-latest
steps:
# fetch all commits and tags so versioneer works
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install build tools
run: |
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/pytest-remote-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,28 @@ jobs:
strategy:
fail-fast: false # don't cancel other matrix jobs when one fails
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [3.9, "3.10", "3.11", "3.12"]
suffix: [''] # the alternative to "-min"
include:
- python-version: 3.7
- python-version: 3.9
suffix: -min

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

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

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

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

- name: Upload coverage to Codecov
if: matrix.python-version == 3.7 && matrix.suffix == ''
uses: codecov/codecov-action@v3
if: matrix.python-version == 3.9 && matrix.suffix == ''
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
flags: remote-data # flags are configured in codecov.yml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14 changes: 8 additions & 6 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
fail-fast: false # don't cancel other matrix jobs when one fails
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [3.9, "3.10", "3.11", "3.12"]
environment-type: [conda, bare]
suffix: [''] # placeholder as an alternative to "-min"
include:
- os: ubuntu-latest
python-version: 3.7
python-version: 3.9
environment-type: conda
suffix: -min
exclude:
Expand All @@ -31,7 +31,7 @@ jobs:
steps:
# We check out only a limited depth and then pull tags to save time
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 100

Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Install bare Python ${{ matrix.python-version }}${{ matrix.suffix }}
if: matrix.environment-type == 'bare'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -82,9 +82,11 @@ jobs:
pytest pvlib --cov=./ --cov-report=xml --ignore=pvlib/tests/iotools
- name: Upload coverage to Codecov
if: matrix.python-version == 3.7 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
uses: codecov/codecov-action@v3
if: matrix.python-version == 3.9 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
flags: core # flags are configured in codecov.yml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/top_ranked_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: top_ranked_issues

on:
pull_request: # for testings purposes, should be removed
schedule:
# Runs every day at 3:00 AM UTC
- cron: '0 3 * * *'

jobs:
run-script:
runs-on: ubuntu-latest

# Define GitHub access token
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}


steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install github
# Run a sample script
- name: Run Script
run: |
python ./scripts/update_top_ranking_issues.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ docs/sphinx/source/reference/generated
docs/sphinx/source/reference/*/generated
docs/sphinx/source/savefig
docs/sphinx/source/gallery
docs/sphinx/source/sg_execution_times.rst

# Installer logs
pip-log.txt
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Contributing
============

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


Expand Down Expand Up @@ -145,9 +145,8 @@ BSD 3-clause.
History and acknowledgement
===========================

pvlib python started out as a Python translation of the PVLIB MATLAB
toolbox (developed by the [PVPMC](https://pvpmc.sandia.gov/) at
Sandia National Laboratories) in 2013 and has grown substantially since then.
pvlib python began in 2013 as a Python translation of the [PVLIB for Matlab](https://github.com/sandialabs/MATLAB_PV_LIB)
toolbox developed by Sandia National Laboratories. pvlib python has grown substantially since then.
Today it contains code contributions from over a hundred individuals worldwide
and is maintained by a core group of PV modelers from a variety of institutions.

Expand Down
14 changes: 7 additions & 7 deletions benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@
"include": [
// minimum supported versions
{
"python": "3.7",
"python": "3.9",
"build": "",
"numpy": "1.16.5",
"pandas": "0.25.0",
"scipy": "1.5.0",
"numpy": "1.19.5",
"pandas": "1.3.0",
"scipy": "1.6.0",
// Note: these don't have a minimum in setup.py
"h5py": "3.1.0",
"ephem": "3.7.6.0",
"numba": "0.40.0"
"ephem": "4.0.0.1", // first version to support py 3.9
"numba": "0.53.0", // first version to support py 3.9
},
// latest versions available
{
"python": "3.8",
"python": "3.9",
"build": "",
"numpy": "",
"pandas": "",
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements-py3.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
- python=3.10
- pytz
- requests
- scipy >= 1.5.0
- scipy >= 1.6.0
- statsmodels
- pip:
- nrel-pysam>=2.0
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements-py3.11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
- python=3.11
- pytz
- requests
- scipy >= 1.5.0
- scipy >= 1.6.0
- statsmodels
- pip:
- nrel-pysam>=2.0
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements-py3.12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
- python=3.12
- pytz
- requests
- scipy >= 1.5.0
- scipy >= 1.6.0
- statsmodels
- pip:
- nrel-pysam>=2.0
Expand Down
28 changes: 0 additions & 28 deletions ci/requirements-py3.7.yml

This file was deleted.

28 changes: 0 additions & 28 deletions ci/requirements-py3.8.yml

This file was deleted.

11 changes: 5 additions & 6 deletions ci/requirements-py3.7-min.yml → ci/requirements-py3.9-min.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ dependencies:
- pytest-cov
- pytest-mock
- pytest-timeout
- python=3.7
- python=3.9
- pytz
- requests
- pip:
- dataclasses
- h5py==3.1.0
- numpy==1.17.3
- pandas==1.3.0
- scipy==1.5.0
- h5py==3.0.0
- numpy==1.19.3
- pandas==1.3.0 # min version of pvlib
- scipy==1.6.0
- pytest-rerunfailures # conda version is >3.6
- pytest-remotedata # conda package is 0.3.0, needs > 0.3.1
- requests-mock
2 changes: 1 addition & 1 deletion ci/requirements-py3.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
- python=3.9
- pytz
- requests
- scipy >= 1.5.0
- scipy >= 1.6.0
- statsmodels
- pip:
- nrel-pysam>=2.0
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/agrivoltaics/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Agrivoltaic Systems Modelling
-----------------------------
Loading

0 comments on commit b533057

Please sign in to comment.