Skip to content

Commit

Permalink
Merge branch 'xgboost-update' of https://github.com/kperrynrel/rdtools
Browse files Browse the repository at this point in the history
…into xgboost-update
  • Loading branch information
Perry committed Oct 16, 2024
2 parents 7672ff3 + a21b261 commit 7f1e7da
Show file tree
Hide file tree
Showing 72 changed files with 12,027 additions and 7,939 deletions.
6 changes: 6 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignoring Paths
# --------------
# which folders/files to ignore
ignore:
- setup.py
- versioneer.py
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
# see https://flake8.pycqa.org/en/latest/user/options.html

[flake8]
# E203 is not PEP8 compliant https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#slices
# Is excluded from flake8's own config https://flake8.pycqa.org/en/latest/user/configuration.html
extend-ignore = E203
max-line-length = 99
max-doc-length = 99
per-file-ignores =
# rdtools.x.y imported but unused
__init__.py:F401
# invalid escape sequence '\s'
versioneer.py:W605
exclude =
docs
.eggs
build
33 changes: 0 additions & 33 deletions .github/workflows/deploy.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: [3.12]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all branches, needed so we can diff against the target branch
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install flake8
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nbval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- name: Install notebook environment
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt -r docs/notebook_requirements.txt .[test]
pip install --timeout=300 -r requirements.txt -r docs/notebook_requirements.txt .[test]
- name: Run notebook and check output
run: |
# --sanitize-with: pre-process text to remove irrelevant differences (e.g. warning filepaths)
Expand All @@ -36,7 +36,7 @@ jobs:
mkdir docs/artifacts
jupyter nbconvert --to html --execute --ExecutePreprocessor.timeout=600 --allow-errors --output artifacts/${{ matrix.notebook-file }}.html docs/${{ matrix.notebook-file }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: executed_notebooks
name: executed_notebook_${{ matrix.notebook-file }}
path: docs/artifacts
50 changes: 50 additions & 0 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish Python distribution to PyPI and TestPyPI

on: push

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python distribution to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/rdtools
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
26 changes: 15 additions & 11 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,37 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
env: [
'-r requirements.txt .[test]',
'-r requirements-min.txt .[test]',
'--upgrade --upgrade-strategy=eager .[test]'
]
exclude:
- python-version: 3.8
- python-version: "3.9"
env: "-r requirements.txt .[test]"
- python-version: "3.10"
env: '-r requirements-min.txt .[test]'
- python-version: 3.9
- python-version: "3.11"
env: '-r requirements-min.txt .[test]'
- python-version: "3.10"
- python-version: "3.12"
env: '-r requirements-min.txt .[test]'
# required numpy is not available on python 3.7, so exclude:
- python-version: 3.7
env: '-r requirements.txt .[test]'
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install ${{ matrix.env }}
run: |
python -m pip install --upgrade pip wheel
pip install ${{ matrix.env }}
pip install --timeout=300 ${{ matrix.env }}
- name: Test with pytest ${{ matrix.env }}
run: |
pytest
python -m pytest --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- name: Install notebook environment
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt -r docs/notebook_requirements.txt
pip install --timeout=300 -r requirements.txt -r docs/notebook_requirements.txt
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ rdtools.egg-info*
.\#*

*.pickle

# ignore vscode settings
.vscode/
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
version: 2

build:
os: "ubuntu-24.04"
tools:
python: "3.12"

python:
version: "3.7"
install:
- method: pip
path: .
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<img src="./docs/sphinx/source/_images/logo_horizontal_highres.png" width="500" alt="RdTools logo"/>

Master branch:
[![Build Status](https://github.com/NREL/rdtools/workflows/pytest/badge.svg?branch=master)](https://github.com/NREL/rdtools/actions?query=branch%3Amaster)
Master branch:
[![Build Status](https://github.com/NREL/rdtools/workflows/pytest/badge.svg?branch=master)](https://github.com/NREL/rdtools/actions?query=branch%3Amaster)

Development branch:
Development branch:
[![Build Status](https://github.com/NREL/rdtools/workflows/pytest/badge.svg?branch=development)](https://github.com/NREL/rdtools/actions?query=branch%3Adevelopment)

Code coverage:
[![codecov](https://codecov.io/gh/NREL/rdtools/graph/badge.svg?token=K2HDjFkBws)](https://codecov.io/gh/NREL/rdtools)

RdTools is an open-source library to support reproducible technical analysis of
time series data from photovoltaic energy systems. The library aims to provide
best practice analysis routines along with the building blocks for users to
Expand Down Expand Up @@ -33,8 +36,8 @@ and the specific DOI coresponding to that version from [Zenodo](https://doi.org/

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

The underlying workflow of RdTools has been published in several places.
Expand All @@ -57,11 +60,11 @@ appropriate:
Detection Techniques in AC Power Time Series," 2021 IEEE 48th Photovoltaic
Specialists Conference (PVSC), pp. 1638-1643 2021, DOI: [10.1109/PVSC43889.2021.9518733](https://doi.org/10.1109/PVSC43889.2021.9518733).


## References
The clear sky temperature calculation, `clearsky_temperature.get_clearsky_tamb()`, uses data
from images created by Jesse Allen, NASA’s Earth Observatory using data courtesy of the MODIS Land Group.
https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD_LSTD_CLIM_M
from images created by Jesse Allen, NASA’s Earth Observatory using data courtesy of the MODIS Land Group.
https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD_LSTD_CLIM_M
https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD_LSTN_CLIM_M

Other useful references which may also be consulted for degradation rate methodology include:
Expand Down
Loading

0 comments on commit 7f1e7da

Please sign in to comment.