Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: smarthomeNG/plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.4.2b
Choose a base ref
...
head repository: smarthomeNG/plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 6,523 changed files with 477,967 additions and 696,197 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
75 changes: 75 additions & 0 deletions .github/workflows/builddevdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: "Build doc from develop/plugins"
#on: [workflow_dispatch, push]
on:
workflow_dispatch:
push:
branches:
- 'develop'

jobs:
build:
runs-on: ubuntu-20.04 #latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.9' ]
name: Python ${{ matrix.python-version }}
steps:
- name: update OS (Ubuntu)
run: sudo apt-get update
- run: sudo apt-get install libudev-dev
- run: sudo apt-get install librrd-dev libpython3-dev
- run: sudo apt-get install gcc --only-upgrade
- run: sudo locale-gen de_DE.UTF-8
- run: locale -a
- uses: actions/checkout@v2
- name: Checkout SmartHomeNG DEVELOP Branch
uses: actions/checkout@v2
with:
repository: smarthomeNG/smarthome
ref: develop
path: smarthomeng
- name: Checkout SmartHomeNG/plugins DEVELOP Branch
uses: actions/checkout@v2
with:
repository: smarthomeNG/plugins
ref: develop
path: smarthomeng/plugins
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Print Python Version
run: python --version
- run: python3 -m pip install --upgrade pip #==19.3.1
#- run: pip install tox-travis virtualenv>=20.0.8 --upgrade
#- run: pip install sphinx sphinx_rtd_theme recommonmark ruamel.yaml pytest
- name: Install requirements for documentation build
run: pip install -r smarthomeng/doc/requirements.txt

- name: Build Requirements for SmartHomeNG
run: python3 smarthomeng/tools/build_requirements.py
- name: Install SmartHomeNG base requirements
# base requirements are needed for building of documentation
run: pip install -r smarthomeng/requirements/base.txt
- name: List installed packages
run: pip list

- name: Build documentation
working-directory: ./smarthomeng/doc
run: bash ./build_doc_local.sh

#- name: Deploy documentation
# uses: JamesIves/github-pages-deploy-action@v4.3.3
# with:
# branch: develop_doc # The branch the action should deploy to.
# folder: ./smarthomeng/doc/user/build/html # The folder the action should deploy.

- name: Deploy documentation to seperate repo dev_doc
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./smarthomeng/doc/user/build/html # The folder the action should deploy.
repository-name: 'smarthomeNG/dev_doc'
token: ${{ secrets.PAT_TOKEN }}
72 changes: 72 additions & 0 deletions .github/workflows/buildreleasedoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: "Build doc from master"
#on: [workflow_dispatch, push]
on:
workflow_dispatch:
push:
branches:
- 'master'
env:
DEP_PATH: smarthomeng/requirements/all.txt
jobs:
build:
runs-on: ubuntu-20.04 #latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.9' ]
name: Python ${{ matrix.python-version }}
steps:
- name: update OS (Ubuntu)
run: sudo apt-get update
- run: sudo apt-get install libudev-dev
- run: sudo apt-get install librrd-dev libpython3-dev
- run: sudo apt-get install gcc --only-upgrade
- run: sudo locale-gen de_DE.UTF-8
- run: locale -a
- uses: actions/checkout@v2
- name: Checkout SmartHomeNG DEVELOP Branch
uses: actions/checkout@v2
with:
repository: smarthomeNG/smarthome
ref: master
path: smarthomeng
- name: Checkout SmartHomeNG/plugins DEVELOP Branch
uses: actions/checkout@v2
with:
repository: smarthomeNG/plugins
ref: master
path: smarthomeng/plugins
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Print Python Version
run: python --version
- run: python3 -m pip install --upgrade pip #==19.3.1
#- run: pip install tox-travis virtualenv>=20.0.8 --upgrade

- name: Install requirements for documentation build
run: pip install -r smarthomeng/doc/requirements.txt
- run: pip install attrs # install seperatly until requirements in master branch are updated

- name: List installed packages
run: pip list

- name: Build documentation
working-directory: ./smarthomeng/doc
run: bash ./build_doc_local.sh

#- name: Deploy documentation
# uses: JamesIves/github-pages-deploy-action@v4.3.3
# with:
# branch: release_doc # The branch the action should deploy to.
# folder: ./smarthomeng/doc/user/build/html # The folder the action should deploy.

- name: Deploy documentation to seperate repo smarthome
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: release_doc # The branch the action should deploy to.
folder: ./smarthomeng/doc/user/build/html # The folder the action should deploy.
repository-name: 'smarthomeNG/smarthome'
token: ${{ secrets.PAT_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/comment_pr_to_wrong_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Comment if PR goes to wrong branch"

on:
pull_request:
types: [opened]
branches:
- '*'
- '!develop'

jobs:
comment_pr:
runs-on: ubuntu-latest
name: Comment on wrong branch
steps:
- name: Comment PR
uses: thollander/actions-comment-pull-request@v1
with:
message: 'Pull requests should only be placed against the develop branch. This pull request cannot be accepted!'
reactions: '-1'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set exitcode to signal error
run: exit 1

67 changes: 67 additions & 0 deletions .github/workflows/pr_unittests.yml.off
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "Unittests Plugins for PRs (disabled)"
#on: [workflow_dispatch, push]
on:
workflow_dispatch:
pull_request:
branches:
- '!develop'

jobs:
build:
runs-on: ubuntu-20.04 #latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
name: Python ${{ matrix.python-version }}
steps:
- name: Setup OS (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install libudev-dev
sudo apt-get install librrd-dev libpython3-dev
sudo apt-get install gcc --only-upgrade

- name: Get branch name
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo ${GITHUB_REF#refs/heads/}
id: extract_branch

- name: Checkout core from develop branch
uses: actions/checkout@v3
with:
repository: smarthomeNG/smarthome
ref: develop

- name: Checkout plugins from ${{steps.extract_branch.outputs.branch}} branch
uses: actions/checkout@v3
with:
repository: smarthomeNG/plugins
ref: ${{steps.extract_branch.outputs.branch}}
path: plugins

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: python3 -m pip install --upgrade pip

- name: Install requirements for unit testing
run: pip install -r tests/requirements.txt
- name: Build Requirements for SmartHomeNG
run: python3 tools/build_requirements.py
- name: Install SmartHomeNG base requirements
# base requirements are needed for pytest to run
run: pip install -r requirements/base.txt

# --- up to here, the workflow is identical for CORE and PLUGINS ---

- name: Install SmartHomeNG all requirements
# all requirements are needed for pytest to run plugin tests
run: pip install -r requirements/all.txt

- name: '>>> Run Python Unittests for PLUGINS <<<'
working-directory: ./plugins
run: pytest
22 changes: 22 additions & 0 deletions .github/workflows/test_dispatch_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "SmartHomeNG Unittest Workflow"
on:
# push:
# branches:
# - develop
# pull_request:
# types: [opened]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04 #latest
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Dispatch to Unit Tests
run: |
curl -XPOST \
-H "Authorization: Bearer ${{secrets.PAT_TOKEN}}" -H "Accept:application/vnd.github.v3+json" \
-H "Content-Type:application/json" https://api.github.com/repos/smarthomeNG/tests/actions/workflows/unittests.yml/dispatches \
--data '{"ref": "main", "inputs": { "branch":"${{steps.extract_branch.outputs.branch}}" }}'
95 changes: 95 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: "Unittests Plugins"
#on: [workflow_dispatch, push]
on:
workflow_dispatch:
push:
branches:
- '*'
- '!release_doc'
pull_request:
branches:
- 'develop'
jobs:
build:
runs-on: ubuntu-20.04 #latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
name: Python ${{ matrix.python-version }}
steps:
- name: Setup OS (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install libudev-dev
sudo apt-get install librrd-dev libpython3-dev
sudo apt-get install gcc --only-upgrade
- name: Get branch name
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT
id: extract_branch

- name: Workflow Information
run: |
echo github.event_name '${{ github.event_name }}'
echo github.workflow '${{ github.workflow }}'
echo github.action_repository '${{ github.action_repository }}'
echo github.actor '${{ github.actor }}'
echo github.ref_name '${{ github.ref_name }}'
echo github.ref '${{ github.ref }}'
echo github.base_ref '${{ github.base_ref }}'
echo github.head_ref '${{ github.head_ref }}'
echo github.pull_request.base.ref '${{ github.pull_request.base.ref }}'
echo steps.extract_branch.outputs.branch '${{ steps.extract_branch.outputs.branch }}'
- name: Check if branch '${{ steps.extract_branch.outputs.branch }}' exists in smarthomeNG/smarthome
run: echo "code=$(git ls-remote --exit-code --heads https://github.com/smarthomeNG/smarthome ${{ steps.extract_branch.outputs.branch }} > /dev/null; echo $? )" >>$GITHUB_OUTPUT
id: shng_branch_check

- name: Checkout core from branch '${{ steps.extract_branch.outputs.branch }}' (for push on known smarthomeNG/smarthome branch)
if: github.event_name != 'pull_request' && steps.shng_branch_check.outputs.code == '0'
uses: actions/checkout@v3
with:
repository: smarthomeNG/smarthome
ref: ${{ steps.extract_branch.outputs.branch }}

- name: Checkout core from branch 'develop' (for pull request or push on unknown smarthomeNG/smarthome branch)
if: github.event_name == 'pull_request' || steps.shng_branch_check.outputs.code == '2'
uses: actions/checkout@v3
with:
repository: smarthomeNG/smarthome
ref: develop

- name: Checkout plugins from branch '${{steps.extract_branch.outputs.branch}}'
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/plugins
ref: ${{steps.extract_branch.outputs.branch}}
path: plugins

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: python3 -m pip install --upgrade pip

- name: Install setuptools (needed for Python 3.12)
run: pip install setuptools
- name: Install requirements for unit testing
run: pip install -r tests/requirements.txt
- name: Build Requirements for SmartHomeNG
run: python3 tools/build_requirements.py
- name: Install SmartHomeNG base requirements
# base requirements are needed for pytest to run
run: pip install -r requirements/base.txt

# --- up to here, the workflow is identical for CORE and PLUGINS ---

- name: Install SmartHomeNG all requirements
# all requirements are needed for pytest to run plugin tests
run: pip install -r requirements/all.txt

- name: '>>> Run Python Unittests for PLUGINS <<<'
working-directory: ./plugins
run: pytest
10 changes: 10 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -24,5 +24,15 @@ nosetests.xml
ehthumbs.db
Thumbs.db

# don't upload private plugins
/priv_*/

# don't upload plugins loaded from develop to a release installation
/*_dev/

# Pycharm settings
/.idea
/.vs

# VSCode settings
.vscode/settings.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "roombapysh/roombapy"]
path = roombapysh/roombapy
url = https://github.com/Pacifica15/roombapy.git
Loading