Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
0922056
initial re-structure attempt
martin-springer Nov 21, 2025
508fbd3
update notebook workflow
martin-springer Nov 21, 2025
8c96e3a
update flake8 workflo
martin-springer Nov 21, 2025
b15571b
exclude standoff from workflow
martin-springer Nov 21, 2025
6fb3464
update readme
martin-springer Nov 21, 2025
b5e7a33
re-run notebook
martin-springer Nov 21, 2025
88d9085
exclude tools scripts from flake8
martin-springer Nov 21, 2025
e2a1015
conditionally deploy jb books
martin-springer Nov 21, 2025
85324f4
update notebook
martin-springer Nov 21, 2025
cbce416
remove tool notebooks from notebook checks
martin-springer Nov 21, 2025
08e7dfd
fix in actual notebook
martin-springer Nov 21, 2025
77d8269
exclude scripts from jb workflow
martin-springer Nov 21, 2025
0ddb746
restrict to jupyter book < 2
martin-springer Nov 21, 2025
614ade1
fix logo path and references
martin-springer Nov 21, 2025
eb96c14
remvoe 0.6.2
RDaxini Nov 26, 2025
7e0d727
transfer 0.6..2 to 0.7.0 (based on #252)
RDaxini Nov 26, 2025
43ff01a
Update v0.7.0.rst
RDaxini Nov 26, 2025
4602b65
Merge branch 'development' into whatsnew
RDaxini Nov 26, 2025
ef9fe50
link pr/issues
RDaxini Nov 26, 2025
dbe9252
Merge branch 'whatsnew' of https://github.com/NREL/PVDegradationTools…
RDaxini Nov 26, 2025
f0f874c
Merge branch 'development' into restructure_notebooks
RDaxini Nov 26, 2025
88992f4
update 03 pysam api nb and py
RDaxini Nov 26, 2025
8fca368
remove pysam single loc nb from nbval workflow
RDaxini Nov 26, 2025
8985856
Update index.rst
RDaxini Nov 26, 2025
085a3d3
pysamv1 --> pvsamv1
martin-springer Dec 1, 2025
8b63eed
updates to readme's
martin-springer Dec 2, 2025
410cbad
deploy books to gh-pages-dev
martin-springer Dec 2, 2025
0921a69
use html instead of site
martin-springer Dec 2, 2025
3206cf5
deploy on PR's to development
martin-springer Dec 2, 2025
4ab1b2b
pages subdirectory approach for preview
martin-springer Dec 2, 2025
cd9694b
remove year from copyright
martin-springer Dec 2, 2025
8285080
another try to get development pages to show up
martin-springer Dec 2, 2025
a1f454c
update main readme's
martin-springer Dec 2, 2025
f58064b
include tools notebooks
martin-springer Dec 2, 2025
957404c
toc levels
martin-springer Dec 2, 2025
a5f29ff
max depth
martin-springer Dec 2, 2025
1990f1c
titles only
martin-springer Dec 2, 2025
d4502b7
attempt to fix notebook header levels
martin-springer Dec 2, 2025
019bdac
do not execute hpc notebooks
martin-springer Dec 3, 2025
f97d460
standoff notebook only in tools folder
martin-springer Dec 3, 2025
9141d5a
move tools folder into tutorials
martin-springer Dec 3, 2025
3c695d7
manual toc
martin-springer Dec 3, 2025
d860e2f
remove the hard to maintain version restrictions in the notebooks
martin-springer Dec 3, 2025
931f5f6
combine nrel hpc and geospatial
martin-springer Dec 3, 2025
531a2e4
header levels in tools
martin-springer Dec 3, 2025
489a77a
notebook titles as headers
martin-springer Dec 3, 2025
cd90cb3
split up geospatial and scenario
martin-springer Dec 3, 2025
335227e
update notebook workflows
martin-springer Dec 3, 2025
e3bfd70
update scenario description
martin-springer Dec 3, 2025
e7fb4a2
make notebooks api independent
martin-springer Dec 3, 2025
19df838
make monte carlo standoff independent of API
martin-springer Dec 3, 2025
e96a9c6
update release notes
martin-springer Dec 3, 2025
1c19276
fix publishing to testpypi
martin-springer Dec 3, 2025
b8a37a1
publish pre-releases to testpypi and actual releases to pypi
martin-springer Dec 3, 2025
c423459
update docu index.rst
martin-springer Dec 3, 2025
1cf1240
Merge branch 'restructure_notebooks' into whatsnew
martin-springer Dec 3, 2025
1a1fcd9
Merge pull request #304 from NREL/whatsnew
martin-springer Dec 3, 2025
5484b90
add contributing instructions
martin-springer Dec 3, 2025
9d8488d
instructions to add jupyter kernel
martin-springer Dec 3, 2025
8d5096a
update what's new
martin-springer Dec 3, 2025
42b6ba5
align readme, contributing with docs
martin-springer Dec 3, 2025
4bd0e5c
use NREL repo for developer installation without forking
martin-springer Dec 3, 2025
f2cf2f6
update read the docs
martin-springer Dec 3, 2025
679a500
minor updates to contributing
martin-springer Dec 3, 2025
1aa9635
build docs with each PR
martin-springer Dec 3, 2025
d8b4c03
update changelog index
martin-springer Dec 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ exclude =
.venv
build
tutorials_and_tools/tutorials_and_tools/*.py
tutorials/**/scripts/*.py
tools/**/scripts/*.py
27 changes: 15 additions & 12 deletions .github/workflows/deploy-books.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
push:
branches:
- main
- development
pull_request:
branches:
- development
- main
# If your git repository has the Jupyter Book within some-subfolder next to
# unrelated files, you can make this run only if a file within that specific
# folder has been modified.
Expand All @@ -16,9 +21,8 @@ on:
jobs:
deploy-book:
runs-on: ubuntu-latest
environment:
name: github-pages
permissions:
contents: write
pages: write
id-token: write
steps:
Expand Down Expand Up @@ -47,15 +51,14 @@ jobs:
# Build the book
- name: Build the book
run: |
jupyter-book build tutorials_and_tools
jupyter-book build tutorials

# Upload the book's HTML as an artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "tutorials_and_tools/_build/html"

# Deploy the book's HTML to GitHub Pages
# Deploy to gh-pages using peaceiris action for all branches
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: tutorials/_build/html
publish_branch: gh-pages
destination_dir: ${{ github.ref == 'refs/heads/main' && '.' || 'dev-preview' }}
keep_files: ${{ github.ref != 'refs/heads/main' }}
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
run: echo '::add-matcher::.github/workflows/flake8-linter-matcher.json'
- name: Run flake8 on changed files only
run: |
git diff origin/$GITHUB_BASE_REF HEAD -- "*.py" | flake8 --config=.flake8 --diff
git diff origin/$GITHUB_BASE_REF HEAD --name-only -- "*.py" | grep -v -E "(tutorials/.*/scripts/|tools/.*/scripts/)" | xargs -r git diff origin/$GITHUB_BASE_REF HEAD -- | flake8 --config=.flake8 --diff
36 changes: 17 additions & 19 deletions .github/workflows/nbval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,20 @@ jobs:
env:
# Notebooks with estimated runtime in seconds (format: "notebook:runtime")
ALL_NOTEBOOKS: |
"1 - Basics, Humidity, Design.ipynb:10"
"2 - Degradation.ipynb:5"
"3 - Spectral Degradation.ipynb:5"
"4 - Weather Database Access.ipynb:15"
"ASTM Live Demo.ipynb:10"
"B-O LID - Accelerated Test.ipynb:10"
"Custom-Functions-Nopython.ipynb:30"
"LETID - Accelerated Test.ipynb:120"
"LETID - Outdoor LETID.ipynb:30"
"LETID - Outdoor Scenario Based on Accelerated Test Result.ipynb:45"
"LETID - Passivated Wafer.ipynb:80"
"Monte Carlo - Arrhenius.ipynb:180"
"Monte Carlo - Standoff.ipynb:30"
"Tools - Edge Seal Oxygen Ingress.ipynb:15"
"Van't Hoff Degradation Model.ipynb:5"
"Geospatial - Local Scenario.ipynb:1"
"01_basics/01_basics_humidity_design.ipynb:10"
"01_basics/02_degradation.ipynb:5"
"01_basics/03_spectral_degradation.ipynb:5"
"01_basics/04_weather_database_access.ipynb:15"
"02_degradation/01_bo_lid_accelerated_test.ipynb:10"
"02_degradation/02_letid_accelerated_test.ipynb:120"
"02_degradation/03_letid_outdoor.ipynb:30"
"02_degradation/04_letid_outdoor_scenario.ipynb:45"
"02_degradation/05_letid_passivated_wafer.ipynb:80"
"02_degradation/06_vant_hoff_degradation_model.ipynb:5"
"03_monte_carlo/01_arrhenius.ipynb:180"
"03_monte_carlo/02_standoff.ipynb:30"
"06_advanced/01_custom_functions_nopython.ipynb:30"
"10_workshop_demos/01_astm_live_demo.ipynb:10"
steps:
- name: Calculate batch matrix
id: set-matrix
Expand Down Expand Up @@ -150,7 +148,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.calculate-batches.outputs.matrix) }}
env:
NOTEBOOK_DIR: "tutorials_and_tools/tutorials_and_tools"
NOTEBOOK_DIR: "tutorials"
SANITIZE_CFG: "nbval_sanitization_rules.cfg"
ALL_NOTEBOOKS: ${{ needs.calculate-batches.outputs.notebooks }}
BATCH_ASSIGNMENTS: ${{ needs.calculate-batches.outputs.batch_assignments }}
Expand All @@ -167,14 +165,14 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tutorials_and_tools/requirements.txt', 'pyproject.toml') }}
key: ${{ runner.os }}-pip-${{ hashFiles('tutorials/requirements.txt', 'pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install notebook environment
run: |
python -m pip install --upgrade pip wheel
pip install --timeout=300 -r tutorials_and_tools/requirements.txt
pip install --timeout=300 -r tutorials/requirements.txt
pip install --timeout=300 -e .[test]
pip install nbval global_land_mask dotenv imageio nrel-pysam
pip install nbconvert[webpdf]
Expand Down
34 changes: 32 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on: push
on:
push:
tags:
- '*'

jobs:
build:
Expand All @@ -9,6 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for setuptools_scm
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -27,10 +32,35 @@ jobs:
name: python-package-distributions
path: dist/

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/pvdeg
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 TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
# Only publish to PyPI on final release tags (not rc, alpha, beta, etc.)
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'rc') && !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'a') && !contains(github.ref, 'b')
needs:
- build
runs-on: ubuntu-latest
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/testbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ jobs:
notebook-testbook-check:
runs-on: ubuntu-latest
env:
NOTEBOOK_DIR: "tutorials_and_tools/tutorials_and_tools"
NOTEBOOK_DIR: "tutorials"
TESTBOOK_NOTEBOOK_LIST: |
"API Call Required - PYSam.ipynb"
"API Call Required - load_nsrdb_distributed.ipynb"
"HPC Connection Required - Scenario - Geographical Features.ipynb"
"HPC Connection Required - Scenario - Geospatial.ipynb"
"HPC Connection Required - Scenario - Non-uniform Mountain Prefferential Downselect.ipynb"
"HPC Connection Required - Scenario - Single Location.ipynb"
"HPC Connection Required - Scenario - Temperature.ipynb"
"HPC Connection Required - Tools - Module Standoff for IEC TS 63126.ipynb"
"HPC Connection Required - Geospatial Templates.ipynb"
"06_advanced/03_pysam_api.ipynb"
"06_advanced/04_nsrdb_distributed_api.ipynb"
"04_scenario/01_scenario_temperature.ipynb"
"04_scenario/02_scenario_single_location.ipynb"
"04_scenario/03_scenario_mountain_downselect.ipynb"
"05_geospatial/01_geospatial_templates.ipynb"
"05_geospatial/04_scenario_geographical_features.ipynb"
"05_geospatial/05_scenario_geospatial.ipynb"

steps:
- uses: actions/checkout@v4
Expand All @@ -27,7 +26,7 @@ jobs:
- name: Install notebook environment
run: |
python -m pip install --upgrade pip wheel
pip install --timeout=300 -r tutorials_and_tools/requirements.txt
pip install --timeout=300 -r tutorials/requirements.txt
pip install --timeout=300 -e .[test]
pip install testbook
pip install global_land_mask dotenv imageio nrel-pysam
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ instance/
docs/sphinx/_build/

# tutorial jupyter-book
_build/
pvdeg_tutorials/_build/
tutorials/_build/
tutorials_and_tools/_build/

# PyBuilder
target/
Expand Down
14 changes: 11 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: '^(docs/source/|tutorials_and_tools/_build/)'
exclude: '^(docs/source/|tutorials/_build/)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand All @@ -14,9 +14,17 @@ repos:
rev: 25.9.0
hooks:
- id: black
exclude: '^tutorials_and_tools/'
exclude: '^tutorials/'
- repo: https://github.com/PyCQA/flake8
rev: 7.3.0 # Use the desired flake8 version
hooks:
- id: flake8
exclude: '^tutorials_and_tools/'
exclude: '^tutorials/'
- repo: https://github.com/mwouts/jupytext
rev: v1.18.1
hooks:
- id: jupytext
args: [--sync, --pipe, black]
files: '^tutorials/.*\.ipynb$'
additional_dependencies:
- black==25.9.0
13 changes: 5 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,20 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs

# Note: Branch-to-version mapping is configured in ReadTheDocs dashboard:
# - 'main' branch -> 'stable' version (default)
# - 'development' branch -> 'latest' version
# To configure: Project Settings > Versions > Activate/set as default
Loading