Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7685a69
hotfix
cfrontin Jul 17, 2025
86858a2
add the actual hotfix
cfrontin Jul 17, 2025
9d34460
update all examples
cfrontin Jul 17, 2025
3b86124
added example testing routine to test
cfrontin Jul 17, 2025
4ba5fdb
adjust cwd command
cfrontin Jul 17, 2025
d9ce4e5
reorganize some examples
cfrontin Jul 17, 2025
674f75b
attempt fix
cfrontin Jul 17, 2025
a72e3a5
black reformat, pip statsmodels again after their hotfix
cfrontin Jul 17, 2025
63fd540
ok think i fixed it
cfrontin Jul 17, 2025
95938e8
cleanup runner
cfrontin Jul 17, 2025
88e6550
try system-agnostic runner
cfrontin Jul 17, 2025
58ff31f
try system-agnostic runner again
cfrontin Jul 17, 2025
3db2ebe
indent fix
cfrontin Jul 17, 2025
1c3a2dc
turn off n2 diagrams
cfrontin Jul 17, 2025
6e549a3
test consolidated CI/CD workflow
cfrontin Jul 17, 2025
eabcf3f
attempt improved consolidated script
cfrontin Jul 17, 2025
7217283
direct parallel example runner test
cfrontin Jul 17, 2025
4001df6
complete runner code
cfrontin Jul 17, 2025
246d346
a new test that should maybe actually work
cfrontin Jul 17, 2025
2b28d20
add missing file and quotation marks
cfrontin Jul 17, 2025
1a3cd01
switch to consolidated with parallel examples
cfrontin Jul 17, 2025
dfa6a3b
rectify author attribution in pyproject.toml
cfrontin Jul 17, 2025
907ab41
remove commented dependency
cfrontin Jul 17, 2025
e36651a
cleaner gui interaction
cfrontin Jul 17, 2025
5bf6c49
modified consolidated tests
cfrontin Jul 21, 2025
ee8e656
faster consolidated ci/cd
cfrontin Jul 21, 2025
95c2999
rollback action
cfrontin Jul 21, 2025
e38c972
take 2 on caching
cfrontin Jul 21, 2025
5c4f7c4
update dependency
cfrontin Jul 21, 2025
eef64fb
slight bugfix mod
cfrontin Jul 21, 2025
84473d8
try cache again
cfrontin Jul 21, 2025
7500e48
iterating on cicd cache
cfrontin Jul 21, 2025
d85bf4f
reorder
cfrontin Jul 21, 2025
0339136
rename
cfrontin Jul 21, 2025
73e0c85
address some of jareds comments and remove commented code
cfrontin Jul 21, 2025
1f6f947
black reformat
cfrontin Jul 21, 2025
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
205 changes: 205 additions & 0 deletions .github/workflows/python-tests-consolidated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
name: CI/CD test suite

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:

setup-install:
name: Setup and install Ard
strategy:
matrix:
python-version: [3.12] # ["3.10", "3.11", "3.12", "3.13"]
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys:
${{ runner.os }}-pip-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install Ard
run: |
pip install .[dev]

test-unit:
name: Run unit tests
needs: setup-install
strategy:
matrix:
python-version: [3.12] # ["3.10", "3.11", "3.12", "3.13"]
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get cache dependencies
id: cache
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys:
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install Ard
run: |
pip install .[dev]
- name: Run unit tests with coverage
run: |
pytest --cov=ard --cov-fail-under=80 test/unit

test-system:
name: Run system tests
needs: test-unit
strategy:
matrix:
python-version: [3.12] # ["3.10", "3.11", "3.12", "3.13"]
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get cache dependencies
id: cache
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys:
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install Ard
run: |
pip install .[dev]
- name: Run system tests with coverage
run: |
pytest --cov=ard --cov-fail-under=50 test/system
# pytest --cov=ard --cov-fail-under=80 test/system

find-examples:
name: Find all examples
needs: [test-unit, test-system]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Find example python scripts
id: find_scripts
run: |
echo "scripts<<EOF" >> $GITHUB_OUTPUT
find examples -mindepth 2 -maxdepth 2 -name "*.py" | jq -R -s -c 'split("\n")[:-1]' >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
outputs:
scripts: ${{ steps.find_scripts.outputs.scripts }}

test-examples:
name: Run all examples
needs: find-examples
strategy:
fail-fast: false
matrix:
python-version: [3.12] # ["3.10", "3.11", "3.12", "3.13"]
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
script: ${{fromJson(needs.find-examples.outputs.scripts)}}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get cache dependencies
id: cache
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys:
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install Ard
run: |
pip install .[dev]
- name: Run examples
shell: python
run: |
import os
import pathlib
import subprocess

env = os.environ.copy()
env["MPLBACKEND"] = "Agg" # Non-interactive backend

path_script = pathlib.Path("${{ matrix.script }}").absolute()
print(f"RUNNING {path_script}")
subprocess.run(
["python", str(path_script.name)],
check=True,
cwd=str(path_script.parent),
env=env,
)
47 changes: 0 additions & 47 deletions .github/workflows/python-tests-system.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/python-tests-unit.yml

This file was deleted.

2 changes: 1 addition & 1 deletion ard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent
BASE_DIR = Path(__file__).absolute().parent
ASSET_DIR = BASE_DIR / "api" / "default_systems"
Empty file.
16 changes: 0 additions & 16 deletions examples/01-iea-wind-740-10-rowp/inputs/ard/ard_system.yaml

This file was deleted.

Empty file.

This file was deleted.

Loading
Loading