Skip to content

Commit

Permalink
#5 better testing, prepated library to split api and ble calls
Browse files Browse the repository at this point in the history
  • Loading branch information
LaggAt committed May 24, 2021
1 parent dfd512d commit 6891f6e
Show file tree
Hide file tree
Showing 13 changed files with 1,533 additions and 1,307 deletions.
7 changes: 3 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
// "containerEnv": {
// "WS_PATH": "/usr/share/hassio/share/dev/hacs-govee",
// },
"image": "laggat/hacs-base-container",
//"image": "ludeeus/container:python-base-debian",
//"vsch.local.folder": "/usr/share/hassio/share/dev/hacs-govee",
//TODO: finish your own container for faster dev setup
//"image": "laggat/hacs-base-container",
"image": "ludeeus/container:python-base-debian",
//"dockerFile": "Dockerfile",
"name": "Govee integration development",
"context": "..",
Expand All @@ -34,7 +34,6 @@
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/bin/python3",
"python.analysis.autoSearchPaths": false,
"python.linting.pylintEnabled": true,
Expand Down
39 changes: 19 additions & 20 deletions .devcontainer/postCreateContainer.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
#!/bin/bash

# /bin/echo ------------ postCreateCommand apt-get ------------
# apt-get update
# apt-get -y install bash bluetooth bluez bluez-tools build-essential ca-certificates cython gcc git iputils-ping libatomic1 libavcodec-dev libc-dev libffi-dev libjpeg-dev libpcap-dev libssl-dev make nano openssh-client procps python3 python3-dev python3-dev python3-pip python3-setuptools rfkill unzip wget wget zlib1g-dev
/bin/echo ------------ postCreateCommand apt-get ------------
apt-get update
apt-get -y install bash bluetooth bluez bluez-tools build-essential ca-certificates cython gcc git iputils-ping libatomic1 libavcodec-dev libc-dev libffi-dev libjpeg-dev libpcap-dev libssl-dev make nano openssh-client procps python3 python3-dev python3-dev python3-pip python3-setuptools rfkill unzip wget wget zlib1g-dev

/bin/echo ------------ postCreateCommand container install ------------
mkdir -p /src/ludeeus
cd /src/ludeeus
git clone https://github.com/ludeeus/container
cp -r ./container/rootfs/common/* /
chmod +x /usr/bin/container
/usr/bin/container install

/bin/echo ------------ postCreateCommand python/pip ------------
# /usr/local/bin/python3 -m pip install --upgrade pip
# /usr/local/bin/pip3 install black colorlog debugpy pexpect pygatt pylint PyNaCl==1.3.0
/usr/local/bin/pip3 install -r /workspaces/hacs-govee/requirements_test.txt


# /bin/echo ------------ postCreateCommand container install ------------
# mkdir -p /src/ludeeus
# cd /src/ludeeus
# git clone https://github.com/ludeeus/container
# cp -r ./container/rootfs/common/* /
# chmod +x /usr/bin/container
# /usr/bin/container install
/bin/echo ------------ postCreateCommand symlink our component ------------
/bin/mkdir -p /config/custom_components
/bin/ln -s /workspaces/hacs-govee/custom_components/govee /config/custom_components/govee

# /bin/echo ------------ postCreateCommand container install ------------
/bin/echo ------------ postCreateCommand container install ------------
pip install -e /workspaces/hacs-govee/.git-subtree/python-govee-api/

/bin/echo ------------ postCreateCommand symlink our component ------------
# /bin/mkdir -p /config/custom_components
/bin/ln -s /workspaces/hacs-govee/custom_components/govee /config/custom_components/govee
/bin/echo ------------ postCreateCommand python/pip ------------
/usr/local/bin/python3 -m pip install --upgrade pip
/usr/local/bin/pip3 install black colorlog debugpy pexpect pygatt pylint PyNaCl==1.3.0
/usr/local/bin/pip3 install -r /workspaces/hacs-govee/requirements_test.txt

/bin/echo ------------ postCreateCommand install hacs ------------
mkdir -p /src/hacs
Expand Down
Loading

0 comments on commit 6891f6e

Please sign in to comment.