Skip to content

Commit

Permalink
Merge branch 'release/v2.18.3' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelduchesne committed Sep 19, 2024
2 parents f5a3cd4 + bbbe55f commit a0e206a
Show file tree
Hide file tree
Showing 115 changed files with 158,916 additions and 9,255 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[run]
omit = tests/*
omit = tests/*
33 changes: 33 additions & 0 deletions .github/actions/setup-poetry-env/action.yml
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
24 changes: 12 additions & 12 deletions .github/dependabot.yml
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"]
46 changes: 23 additions & 23 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: '🚀 New Features'
- title: "🚀 New Features"
labels:
- 'new feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
- "new feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
labels:
- 'refactoring'
- 'dependencies'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
- "refactoring"
- "dependencies"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
- "major"
minor:
labels:
- 'minor'
- 'feature'
- 'new feature'
- 'enhancement'
- "minor"
- "feature"
- "new feature"
- "enhancement"
patch:
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'patch'
- 'refactoring'
- "fix"
- "bugfix"
- "bug"
- "patch"
- "refactoring"
default: patch
template: |
## Changes
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/main.yml
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' }}
31 changes: 31 additions & 0 deletions .github/workflows/on-release-main.yml
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 }}
72 changes: 0 additions & 72 deletions .github/workflows/python-package.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/python-publish.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/validate-codecov-config.yml
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,4 @@ fabric.properties

docs/reference/

.idea/
.idea/
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
exclude: ^(tests/input_data/|docker/trnsidf/)
- id: trailing-whitespace
exclude: ^(tests/input_data/|docker/trnsidf/)

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.6"
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
hooks:
- id: prettier
Loading

0 comments on commit a0e206a

Please sign in to comment.