Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
14 changes: 11 additions & 3 deletions .github/workflows/pytest_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
jobs:
run_pytest_coverage:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout Code
Expand All @@ -20,10 +24,10 @@ jobs:
ref: ${{ github.event_name == 'pull_request' && github.head_ref || 'main' }}
fetch-depth: 0

- name: Set up Python 3.12
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: ${{ matrix.python-version }}

- name: Install requirements and add python path
run: |
Expand All @@ -39,10 +43,12 @@ jobs:
pytest --cov --cov-report=html --cov-report=xml --cov-report=term

- name: Generate coverage badge
if: matrix.python-version == '3.12'
run: |
coverage-badge -o build/reports/coverage.svg -f

- name: Check if badge changed or is new
if: matrix.python-version == '3.12'
id: badge-check
run: |
# Check if the file exists in git (tracked)
Expand All @@ -62,7 +68,7 @@ jobs:
fi

- name: Commit and push coverage badge
if: steps.badge-check.outputs.changed == 'true' && github.event_name == 'pull_request'
if: matrix.python-version == '3.12' && steps.badge-check.outputs.changed == 'true' && github.event_name == 'pull_request'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
Expand All @@ -71,13 +77,15 @@ jobs:
git push origin ${{ github.head_ref }}

- name: Upload coverage badge as artifact
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: coverage-badge
path: build/reports/coverage.svg
retention-days: 30

- name: Upload coverage HTML report
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: coverage-html-report
Comment thread
PatrickHenkel1 marked this conversation as resolved.
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/verify_executables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,24 @@ jobs:
strategy:
fail-fast: false
matrix:
fail-fast: false
Comment thread
PatrickHenkel1 marked this conversation as resolved.
Outdated
script: ${{ fromJSON(needs.setup.outputs.scripts) }}
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Python 3.12
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: ${{ matrix.python-version }}

- name: Install requirements and add python path
run: |
python -m pip install --upgrade pip
pip install .

- name: Run script -> ${{ matrix.script }}
- name: Run script -> ${{ matrix.script }} with Python ${{ matrix.python-version }}
run: |
echo "2" | python ${{ matrix.script }}
8 changes: 6 additions & 2 deletions .github/workflows/verify_installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python 3.12
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: ${{ matrix.python-version }}
- name: Install requirements and add python path
run: |
python -m pip install --upgrade pip
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
]
description = "Framework for development and execution of physics-guided machine learning for application in Model Predictive Control (MPC) of Building Energy Systems (BES)"
readme = "README.md"
requires-python = ">=3.12"
requires-python = ">=3.9"
keywords = [
"physics-guided", "physics-informed", "machine-learning", "mpc", "model-predictive-control", "building-energy-systems",
]
Expand All @@ -18,10 +18,13 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
dependencies = [
"numpy>=2.1.3",
"numpy>=2.0",
"pandas>=2.2.3",
"scikit-learn>=1.6.1",
"keras>=3.9.2",
Expand Down