Skip to content

Make leap_day=True default for PSM3 #1990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[run]
omit = pvlib/version.py
omit = pvlib/_version.py
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pvlib/version.py export-subst

# reduce the number of merge conflicts
docs/sphinx/source/whatsnew/* merge=union
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
- [ ] Closes #xxxx
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing.html)
- [ ] Tests added
- [ ] Updates entries in [`docs/sphinx/source/reference`](https://github.com/pvlib/pvlib-python/blob/main/docs/sphinx/source/reference) for API changes.
- [ ] 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` ``).
- [ ] Updates entries in [`docs/sphinx/source/reference`](https://github.com/pvlib/pvlib-python/blob/master/docs/sphinx/source/reference) for API changes.
- [ ] Adds description and name entries in the appropriate "what's new" file in [`docs/sphinx/source/whatsnew`](https://github.com/pvlib/pvlib-python/tree/master/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` ``).
- [ ] New code is fully documented. Includes [numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) compliant docstrings, examples, and comments where necessary.
- [ ] Pull request is nearly complete and ready for detailed review.
- [ ] Maintainer: Appropriate GitHub Labels (including `remote-data`) and Milestone are assigned to the Pull Request and linked Issue.
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/asv_check.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
name: asv

# CI ASV CHECK is aimed to verify that the benchmarks execute without error.
on:
push:
branches:
- main
pull_request:

on: [pull_request, push]

jobs:
quick-benchmarks:
quick:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -23,7 +18,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
python-version: '3.9.7'

- name: Install asv
run: pip install asv==0.4.2
Expand All @@ -32,4 +27,8 @@ jobs:
run: |
cd benchmarks
asv machine --yes
asv run HEAD^! --quick --dry-run --show-stderr
asv run HEAD^! --quick --dry-run --show-stderr | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
if grep "failed" benchmarks.log > /dev/null ; then
exit 1
fi

17 changes: 0 additions & 17 deletions .github/workflows/flake8-linter-matcher.json

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/flake8.yml

This file was deleted.

16 changes: 5 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ on:
pull_request:
push:
branches:
- main
tags:
- "v*"
- master

jobs:
build-n-publish:
Expand All @@ -27,19 +25,15 @@ jobs:
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m pip install twine
python -m pip install --upgrade setuptools wheel

- name: Build packages
run: python -m build

- name: Check metadata verification
run: python -m twine check --strict dist/*
run: python setup.py sdist bdist_wheel

# only publish distribution to PyPI for tagged commits
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
password: ${{ secrets.pypi_password }}
13 changes: 6 additions & 7 deletions .github/workflows/pytest-remote-data.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# A secondary test job that only runs the iotools tests if explicitly requested
# (for pull requests) or on a push to the main branch.
# (for pull requests) or on a push to the master branch.
# Because the iotools tests require GitHub secrets, we need to be careful about
# malicious PRs accessing the secrets and exposing them externally.
#
Expand Down Expand Up @@ -48,15 +48,15 @@ on:
types: [labeled]
push:
branches:
- main
- master

jobs:
test:

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.7, 3.8, 3.9, "3.10"]
suffix: [''] # the alternative to "-min"
include:
- python-version: 3.7
Expand All @@ -68,7 +68,7 @@ jobs:
steps:
- uses: actions/checkout@v3
if: github.event_name == 'pull_request_target'
# pull_request_target runs in the context of the target branch (pvlib/main),
# pull_request_target runs in the context of the target branch (pvlib/master),
# but what we need is the hypothetical merge commit from the PR:
with:
ref: "refs/pull/${{ github.event.number }}/merge"
Expand Down Expand Up @@ -97,14 +97,13 @@ jobs:
env:
# copy GitHub Secrets into environment variables for the tests to access
NREL_API_KEY: ${{ secrets.NRELAPIKEY }}
SOLARANYWHERE_API_KEY: ${{ secrets.SOLARANYWHERE_API_KEY }}
BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }}
BSRN_FTP_PASSWORD: ${{ secrets.BSRN_FTP_PASSWORD }}
run: pytest pvlib/tests/iotools --cov=./ --cov-report=xml --remote-data
run: pytest pvlib/tests/iotools pvlib/tests/test_forecast.py --cov=./ --cov-report=xml --remote-data

- name: Upload coverage to Codecov
if: matrix.python-version == 3.7 && matrix.suffix == ''
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
pull_request:
push:
branches:
- main
- master

jobs:
test:
strategy:
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.7, 3.8, 3.9, "3.10"]
environment-type: [conda, bare]
suffix: [''] # placeholder as an alternative to "-min"
include:
Expand Down Expand Up @@ -40,14 +40,12 @@ jobs:

- name: Install Conda environment with Micromamba
if: matrix.environment-type == 'conda'
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/provision-with-micromamba@v12
with:
environment-file: ${{ env.REQUIREMENTS }}
cache-downloads: true
create-args: >-
extra-specs: |
python=${{ matrix.python-version }}
condarc: |
channel-priority: flexible
env:
# build requirement filename. First replacement is for the python
# version, second is to add "-min" if needed
Expand All @@ -60,7 +58,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@v1
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -78,12 +76,12 @@ jobs:
- name: Run tests
shell: bash -l {0} # necessary for conda env to be active
run: |
# ignore iotools; those tests are run in a separate workflow
pytest pvlib --cov=./ --cov-report=xml --ignore=pvlib/tests/iotools
# ignore iotools & forecast; those tests are run in a separate workflow
pytest pvlib --cov=./ --cov-report=xml --ignore=pvlib/tests/iotools --ignore=pvlib/tests/test_forecast.py

- 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
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pvlib/spa_c_files/spa_tester.c

# generated documentation
docs/sphinx/source/reference/generated
docs/sphinx/source/reference/*/generated
docs/sphinx/source/savefig
docs/sphinx/source/gallery

Expand Down
6 changes: 6 additions & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
path_classifiers:
generated:
- pvlib/_version.py
library:
- versioneer.py
- pvlib/_deprecation.py
8 changes: 8 additions & 0 deletions .stickler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
linters:
flake8:
python: 3
max-line-length: 79
ignore: E201,E241,E226,W503,W504
files:
ignore:
- 'pvlib/_version.py'
25 changes: 11 additions & 14 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
About the Copyright Holders
===========================

* Copyright (c) 2023 pvlib python Contributors
* Copyright (c) 2014 PVLIB python Development Team
* Copyright (c) 2013 Sandia National Laboratories
* Copyright (c) 2013, Sandia National Laboratories

The pvlib python Contributors comprises all authors of content of the pvlib python project.
A complete list of contributors can be found in the documentation.
Sandia National Laboratories developed pvlib python based on code in
PVLib MATLAB.

The PVLIB python Development Team is the collection of developers of the
pvlib python project. Members of this team are included in the pvlib python Contributors.
* Copyright (c) 2014-2018, pvlib python Development Team

Sandia National Laboratories originally developed pvlib python based on code in
PVLib MATLAB.
The pvlib python Development Team is the collection of developers of the
pvlib python project.

Full credits for pvlib python contributors can be found in the documentation.

Our Copyright Policy
====================
Expand All @@ -23,11 +21,10 @@ over their contributions to pvlib python. However, it is important to note that
these contributions are typically only changes to the repositories. Thus,
the pvlib python source code, in its entirety, is not the copyright of any single
person or institution. Instead, it is the collective copyright of the
Contributors. If individual contributors want to make explicit their copyright
of the contributions they have made,
they should indicate their copyright using in-line comments in the code submitted
to the pvlib python repository, with the understanding that by contributing, they
grant the pvlib-python license.
entire pvlib python Development Team. If individual contributors want to maintain
a record of what changes/contributions they have specific copyright on,
they should indicate their copyright in the commit message of the change
when they commit the change to the pvlib python repository.

License
=======
Expand Down
7 changes: 2 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
BSD 3-Clause License

Copyright (c) 2023 pvlib python Contributors
Copyright (c) 2014 PVLIB python Development Team
Copyright (c) 2013 Sandia National Laboratories

Copyright (c) 2013-2021, Sandia National Laboratories and pvlib python Development Team
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand All @@ -16,7 +13,7 @@ are permitted provided that the following conditions are met:
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

Neither the name of the copyright holder nor the names of its
Neither the name of the {organization} nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

Expand Down
24 changes: 15 additions & 9 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
include MANIFEST.in
include AUTHORS.md
include LICENSE
include README.md
include setup.py

# include most everything under pvlib by default
# better to package too much than not enough
graft pvlib

# we included pvlib files needed to compile NREL SPA code in graft above,
# now we exclude the NREL code itself to comply with their license
global-exclude */spa.c
global-exclude */spa.h
prune pvlib/spa_c_files/build

graft docs
prune docs/sphinx/build
prune docs/sphinx/source/generated
# all doc figures created by doc build
Expand All @@ -18,12 +31,5 @@ global-exclude .git*
global-exclude \#*
global-exclude .ipynb_checkpoints

exclude .coveragerc
exclude codecov.yml
exclude readthedocs.yml
exclude CODE_OF_CONDUCT.md

prune paper
prune .github
prune benchmarks
prune ci
include versioneer.py
include pvlib/_version.py
Loading