-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from NREL/develop
beta release
- Loading branch information
Showing
146 changed files
with
10,521 additions
and
45,988 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
POSTGRES_DB=buildingmotif | ||
POSTGRES_USER=buildingmotif | ||
POSTGRES_PASSWORD=password | ||
DB_URI="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}" |
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,3 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203, E501 |
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,74 @@ | ||
name: continuous integration | ||
|
||
on: | ||
push | ||
|
||
jobs: | ||
|
||
styling: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup-python | ||
uses: actions/setup-python@v3 | ||
- name: install-poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.4.0 | ||
virtualenvs-in-project: false | ||
virtualenvs-path: ~/.virtualenvs | ||
- name: poetry install | ||
run: poetry install --all-extras | ||
- name: run isort and black | ||
run: | | ||
poetry run isort . --check | ||
poetry run black . --check | ||
testing: | ||
needs: styling | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10'] | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup-python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: install-poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.4.0 | ||
virtualenvs-in-project: false | ||
virtualenvs-path: ~/.virtualenvs | ||
- name: poetry install | ||
run: poetry install --all-extras | ||
- name: lint | ||
run: poetry run flake8 buildingmotif | ||
- name: type check | ||
run: poetry run mypy | ||
- name: unit tests | ||
run: poetry run pytest tests/unit --cov=./ --cov-report=xml | ||
- name: integration tests | ||
run: poetry run pytest tests/integration | ||
- name: bacnet tests | ||
run: | | ||
cd tests/integration/fixtures/bacnet | ||
docker compose build device buildingmotif | ||
docker compose run -d device | ||
docker compose run buildingmotif poetry run pytest -m bacnet | ||
docker compose down | ||
- name: build tests | ||
run: poetry build | ||
|
||
coverage: | ||
needs: testing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml |
This file was deleted.
Oops, something went wrong.
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
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,21 +1,24 @@ | ||
repos: | ||
- repo: https://github.com/gvanderest/pylama-pre-commit | ||
rev: 0.1.2 | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: pylama | ||
- id: isort | ||
entry: poetry run isort | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
entry: black --check | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
entry: poetry run black | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 5.0.0 | ||
hooks: | ||
- id: isort | ||
entry: isort --check | ||
- id: flake8 | ||
entry: poetry run flake8 buildingmotif | ||
# can't poetry run becuase not present in repository https://github.com/pre-commit/mirrors-mypy | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.931 | ||
hooks: | ||
- id: mypy | ||
args: ["--install-types", "--non-interactive", "--ignore-missing-imports"] | ||
additional_dependencies: [sqlalchemy2-stubs <= 0.0.2a20, SQLAlchemy <= 1.4] | ||
exclude: docs/conf.py |
Oops, something went wrong.