-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ruff linting + tox as test system (#507)
* An issue simulating models with the Slab PreProcessor has been fixed (#505) * adds IDF.copy() and IDF.saveas(inplace=True) (#254) * Adjusts svg repr to the min/max values of the schedule (#255) * Graceful warning when Slab or Basement program is not found * Adds KeyBoardInterupt to IDF Thread * catches more variations of unit name * Adds ability to scale a schedule * Fixes fallback limits for Schedule.plot2d() when Type is not defined * Type can be specified in Schedule.from_values constructor * plot2d is prettier by default * more Typing * Return existing object when new_object is there (#257) * Adds ability to replace schedule values without affecting the full load hours * more robust IDF.name property * Keep sim files when error occurs (#276) * updates requests requirement from ~=2.25.1 to >=2.26 (#292) * typo * this * gitsubmodule as https * p * pp * this * error * catch outfile * logging * Revert "logging" This reverts commit bef3e4b. * keep * as model * better logging * comments --------- Co-authored-by: Samuel Letellier-Duchesne <samueld@mit.edu> Co-authored-by: Zach Berzolla <53047789+zberzolla@users.noreply.github.com> * ruff * actions * add submodules * `np.NaN` was removed in the NumPy 2.0 release. Use `np.nan` instead. * don't show plots * rm setup.cfg * add validation options * tox env var * fix regex * fix tests * tox ini * fix regex * data_dir * fix tests * exe * fix files * pytest xdist * typo * no desc --------- Co-authored-by: Samuel Letellier-Duchesne <samueld@mit.edu> Co-authored-by: Zach Berzolla <53047789+zberzolla@users.noreply.github.com>
- Loading branch information
1 parent
88cd43a
commit 86569b1
Showing
116 changed files
with
158,982 additions
and
9,301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[run] | ||
omit = tests/* | ||
omit = tests/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: "setup-poetry-env" | ||
description: "Composite action to setup the Python and poetry environment." | ||
|
||
inputs: | ||
python-version: | ||
required: false | ||
description: "The python version to use" | ||
default: "3.11" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-in-project: true | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "10:00" | ||
open-pull-requests-limit: 10 | ||
# Raise pull requests for version updates | ||
# to pip against the `main` branch | ||
target-branch: "main" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-patch"] | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "10:00" | ||
open-pull-requests-limit: 10 | ||
# Raise pull requests for version updates | ||
# to pip against the `main` branch | ||
target-branch: "main" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-patch"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "true" | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
- name: Set up the environment | ||
uses: ./.github/actions/setup-poetry-env | ||
|
||
- name: Run checks | ||
run: make check | ||
|
||
tox: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
os: [ubuntu-latest] # later, add macos-latest, windows-latest | ||
energyplus-version: [9.2.0] # later, add 9.4.0 | ||
include: | ||
- runs-on: ubuntu-latest | ||
compiler: gcc | ||
- energyplus-version: 9.2.0 | ||
energyplus-sha: 921312fa1d | ||
energyplus-install: 9-2-0 | ||
fail-fast: false | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "true" | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Load cached venv | ||
uses: actions/cache@v3 | ||
with: | ||
path: .tox | ||
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install tox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox tox-gh-actions | ||
- name: Install EnergyPlus | ||
uses: Elementa-Engineering/install-energyplus@v1 | ||
with: | ||
energyplus-version: ${{ matrix.energyplus-version }} | ||
energyplus-sha: ${{ matrix.energyplus-sha }} | ||
energyplus-install: ${{ matrix.energyplus-install }} | ||
|
||
- name: Test with tox | ||
run: tox -- -n 2 --doctest-modules tests --cov --cov-config=pyproject.toml --cov-report=xml | ||
|
||
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.11 | ||
uses: codecov/codecov-action@v3 | ||
if: ${{ matrix.python-version == '3.11' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: release-main | ||
|
||
on: | ||
release: | ||
types: [published] | ||
branches: [main] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "true" | ||
|
||
- name: Set up the environment | ||
uses: ./.github/actions/setup-poetry-env | ||
|
||
- name: Export tag | ||
id: vars | ||
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT | ||
|
||
- name: Build and publish | ||
run: | | ||
source .venv/bin/activate | ||
poetry version $RELEASE_VERSION | ||
make build-and-publish | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
RELEASE_VERSION: ${{ steps.vars.outputs.tag }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: validate-codecov-config | ||
|
||
on: | ||
pull_request: | ||
paths: [codecov.yaml] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
validate-codecov-config: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "true" | ||
- name: Validate codecov configuration | ||
run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -235,4 +235,4 @@ fabric.properties | |
|
||
docs/reference/ | ||
|
||
.idea/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "geomeppy"] | ||
path = geomeppy | ||
url = git@github.com:samuelduchesne/geomeppy.git | ||
url = https://github.com/samuelduchesne/geomeppy.git |
Oops, something went wrong.