Skip to content

Commit b3927da

Browse files
authored
Merge pull request #390 from NREL/aggregated_filters_for_trials
RdTools 3.0-beta
2 parents bb24f06 + 6ca0fce commit b3927da

Some content is hidden

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

62 files changed

+160344
-159938
lines changed

.codecov.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignoring Paths
2+
# --------------
3+
# which folders/files to ignore
4+
ignore:
5+
- setup.py
6+
- versioneer.py

.flake8

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
# see https://flake8.pycqa.org/en/latest/user/options.html
33

44
[flake8]
5+
# E203 is not PEP8 compliant https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#slices
6+
# Is excluded from flake8's own config https://flake8.pycqa.org/en/latest/user/configuration.html
7+
extend-ignore = E203
58
max-line-length = 99
69
max-doc-length = 99
710
per-file-ignores =
811
# rdtools.x.y imported but unused
912
__init__.py:F401
1013
# invalid escape sequence '\s'
1114
versioneer.py:W605
12-
exclude =
15+
exclude =
1316
docs
1417
.eggs
1518
build

.github/workflows/deploy.yaml

-33
This file was deleted.

.github/workflows/flake8.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: [3.8]
15+
python-version: [3.12]
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0 # fetch all branches, needed so we can diff against the target branch
2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v5
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install flake8

.github/workflows/nbval.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ jobs:
1010
fail-fast: false # don't cancel other matrix jobs when one fails
1111
matrix:
1212
notebook-file: [
13-
'TrendAnalysis_example_pvdaq4.ipynb',
14-
'degradation_and_soiling_example_pvdaq_4.ipynb',
13+
'TrendAnalysis_example.ipynb',
14+
'TrendAnalysis_example_NSRDB.ipynb',
15+
'degradation_and_soiling_example.ipynb',
1516
'system_availability_example.ipynb'
16-
# can't run the DKASC notebook here because it requires pre-downloaded data
1717
]
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: Set up Python
22-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v5
2323
with:
24-
python-version: "3.10"
24+
python-version: "3.12"
2525
- name: Install notebook environment
2626
run: |
2727
python -m pip install --upgrade pip wheel
@@ -36,7 +36,7 @@ jobs:
3636
mkdir docs/artifacts
3737
jupyter nbconvert --to html --execute --ExecutePreprocessor.timeout=600 --allow-errors --output artifacts/${{ matrix.notebook-file }}.html docs/${{ matrix.notebook-file }}
3838
- name: Upload artifacts
39-
uses: actions/upload-artifact@v2
39+
uses: actions/upload-artifact@v4
4040
with:
41-
name: executed_notebooks
41+
name: executed_notebook_${{ matrix.notebook-file }}
4242
path: docs/artifacts
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish Python distribution to PyPI and TestPyPI
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
name: Build distribution
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.x"
16+
- name: Install pypa/build
17+
run: >-
18+
python3 -m
19+
pip install
20+
build
21+
--user
22+
- name: Build a binary wheel and a source tarball
23+
run: python3 -m build
24+
- name: Store the distribution packages
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: python-package-distributions
28+
path: dist/
29+
30+
publish-to-pypi:
31+
name: >-
32+
Publish Python distribution to PyPI
33+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
34+
needs:
35+
- build
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: pypi
39+
url: https://pypi.org/p/rdtools
40+
permissions:
41+
id-token: write # IMPORTANT: mandatory for trusted publishing
42+
43+
steps:
44+
- name: Download all the dists
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: python-package-distributions
48+
path: dist/
49+
- name: Publish distribution to PyPI
50+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/pytest.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ["3.7", "3.8", "3.9", "3.10"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1818
env: [
1919
'-r requirements.txt .[test]',
2020
'-r requirements-min.txt .[test]',
2121
'--upgrade --upgrade-strategy=eager .[test]'
2222
]
2323
exclude:
24-
- python-version: 3.8
24+
- python-version: "3.9"
25+
env: "-r requirements.txt .[test]"
26+
- python-version: "3.10"
2527
env: '-r requirements-min.txt .[test]'
26-
- python-version: 3.9
28+
- python-version: "3.11"
2729
env: '-r requirements-min.txt .[test]'
28-
- python-version: "3.10"
30+
- python-version: "3.12"
2931
env: '-r requirements-min.txt .[test]'
30-
# required numpy is not available on python 3.7, so exclude:
31-
- python-version: 3.7
32-
env: '-r requirements.txt .[test]'
32+
fail-fast: false
3333

3434
steps:
35-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v4
3636
- name: Set up Python ${{ matrix.python-version }}
37-
uses: actions/setup-python@v2
37+
uses: actions/setup-python@v5
3838
with:
3939
python-version: ${{ matrix.python-version }}
4040
- name: Install ${{ matrix.env }}

.github/workflows/requirements.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: Set up Python
23-
uses: actions/setup-python@v2
23+
uses: actions/setup-python@v5
2424
with:
25-
python-version: "3.10"
25+
python-version: "3.12"
2626
- name: Install notebook environment
2727
run: |
2828
python -m pip install --upgrade pip wheel

.readthedocs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2
22

33
build:
4-
os: "ubuntu-22.04"
4+
os: "ubuntu-24.04"
55
tools:
6-
python: "3.7"
6+
python: "3.12"
77

88
python:
99
install:

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Code coverage:
1212
RdTools is an open-source library to support reproducible technical analysis of
1313
time series data from photovoltaic energy systems. The library aims to provide
1414
best practice analysis routines along with the building blocks for users to
15-
tailor their own analyses.
16-
Current applications include the evaluation of PV production over several years to obtain
17-
rates of performance degradation and soiling loss. RdTools can handle
18-
both high frequency (hourly or better) or low frequency (daily, weekly,
19-
etc.) datasets. Best results are obtained with higher frequency data.
15+
tailor their own analyses. Current applications include the evaluation of PV
16+
production over several years to obtain rates of performance degradation and
17+
soiling loss. RdTools can handle both high frequency (hourly or better) or low
18+
frequency (daily, weekly, etc.) datasets. Best results are obtained with higher
19+
frequency data.
2020

2121
RdTools can be installed automatically into Python from PyPI using the
2222
command line:
@@ -27,7 +27,7 @@ pip install rdtools
2727

2828
For API documentation and full examples, please see the [documentation](https://rdtools.readthedocs.io).
2929

30-
RdTools currently is tested on Python 3.7+.
30+
RdTools currently is tested on Python 3.9+.
3131

3232
## Citing RdTools
3333

@@ -36,8 +36,8 @@ and the specific DOI coresponding to that version from [Zenodo](https://doi.org/
3636

3737
- Michael G. Deceglie, Ambarish Nag, Adam Shinn, Gregory Kimball,
3838
Daniel Ruth, Dirk Jordan, Jiyang Yan, Kevin Anderson, Kirsten Perry,
39-
Mark Mikofski, Matthew Muller, Will Vining, and Chris Deline
40-
RdTools, version {insert version}, Compuer Software,
39+
Mark Mikofski, Matthew Muller, Will Vining, and Chris Deline,
40+
RdTools, version {insert version}, Computer Software,
4141
https://github.com/NREL/rdtools. DOI:{insert DOI}
4242

4343
The underlying workflow of RdTools has been published in several places.

0 commit comments

Comments
 (0)