Skip to content

Commit

Permalink
Merge pull request #226 from ChristianTremblay/release_20.11.04
Browse files Browse the repository at this point in the history
Release 20.11.04
  • Loading branch information
ChristianTremblay committed Nov 4, 2020
2 parents f823265 + 5fa612b commit e7c4805
Show file tree
Hide file tree
Showing 89 changed files with 5,483 additions and 932 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install flake8 pytest
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/BAC0/scripts/__pycache__
/BAC0/__pycache__
/BAC0Script.egg-info
/doc
/.coverage
/doc/build
/__pycache__
Expand All @@ -36,3 +35,9 @@ obj30.bin
obj30.db
obj300.bin
/.vscode
*.bin
*.db
*.log
wily-report.html
make_doc.bat
tests/manual_test_bokeh.py
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: python
python:
- '3.5'
- '3.6'
- '3.7'
- '3.8'
Expand All @@ -15,6 +14,7 @@ install:
- pip install bokeh
- pip install flask
- pip install flask_bootstrap
- pip install colorama

script:
- coverage run --source BAC0 -m pytest -v
Expand Down
16 changes: 10 additions & 6 deletions BAC0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .core.devices.Trends import TrendLog as TrendLog
from .tasks.Poll import SimplePoll as poll
from .tasks.Match import Match as match
from .tasks.Devices import AddDevice as add_device
from .core.utils.notes import update_log_level as log_level
from .infos import __version__ as version

Expand All @@ -35,14 +36,17 @@
except ImportError:
_COMPLETE = False

from .scripts.Lite import Lite as lite

if _COMPLETE:
from .scripts.Complete import Complete as connect
from .scripts.Lite import Lite as lite
else:
from .scripts.Lite import Lite as connect
from .scripts.Complete import Complete as gui

lite = connect
# print('All features not available as some modules are missing (flask, flask-bootstrap, bokeh, pandas). See docs for details')
connect = gui
else:
connect = lite
web = lambda: print(
"All features not available to run BAC0.web(). Some modules are missing (flask, flask-bootstrap, bokeh, pandas). See docs for details. To start BAC0, use BAC0.lite()"
)

# Import proprietary classes
from .core.proprietary_objects import jci
Expand Down
Loading

0 comments on commit e7c4805

Please sign in to comment.