Skip to content

Commit

Permalink
Merge beta into master for 0.14 release (hacs#550)
Browse files Browse the repository at this point in the history
* Set version

* Trigger build

* Add issues.md

* Add link at the bottom

* Add appdaemon example

* Make links clickable

* Adds isssue note

* Handle persistent_directory

* Add check if self.repository_manifest exist

* Handle content_in_root for all categories

* Remove device_info property (hacs#548)

* New devcontainer

* Add release_limit for version selector

* Fix multiloading of HACS

* Add default note

* Fix LGTM warnings

* Add badges

* Set 0.98 as minimum version

* Version bump
  • Loading branch information
ludeeus authored Sep 21, 2019
1 parent 0a9a71b commit 81d7290
Show file tree
Hide file tree
Showing 41 changed files with 542 additions and 436 deletions.
19 changes: 0 additions & 19 deletions .devcontainer/Dockerfile

This file was deleted.

38 changes: 0 additions & 38 deletions .devcontainer/custom_component_helper

This file was deleted.

16 changes: 10 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "HACS dev",
"name": "HACS Dev",
"image": "ludeeus/devcontainer:0.1.0",
"context": "..",
"dockerFile": "Dockerfile",
"appPort": "8124:8123",
"appPort": [
"9123:8123"
],
"postCreateCommand": "dc install",
"runArgs": [
"-e",
"GIT_EDTIOR='code --wait'"
"-v",
"${env:HOME}${env:USERPROFILE}/.ssh:/tmp/.ssh" // This is added so you can push from inside the container
],
"extensions": [
"ms-python.python",
Expand All @@ -16,7 +19,8 @@
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"python.pythonPath": "/usr/local/bin/python",
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/bin/python3",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
Expand Down
15 changes: 0 additions & 15 deletions .devcontainer/tabnine_config.json

This file was deleted.

42 changes: 21 additions & 21 deletions .github/workflows/lint_data_branch.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Linting

on:
pull_request:
branches:
- data
push:
branches:
- data

jobs:
jq:
name: Lint JSON with JQ
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Lint datafiles
run: |
for datafile in repositories/*; do
jq --raw-output "." "${datafile}"
done
name: Linting

on:
pull_request:
branches:
- data
push:
branches:
- data

jobs:
jq:
name: Lint JSON with JQ
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Lint datafiles
run: |
for datafile in repositories/*; do
jq --raw-output "." "${datafile}"
done
110 changes: 55 additions & 55 deletions .github/workflows/test_with_home_assistant.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
name: Test with Home Assistant

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
test:
name: Testing with (Python, HA)
runs-on: ubuntu-latest
strategy:
max-parallel: 6
matrix:
python-version: [3.6, 3.7]
ha-version: ["stable", "beta", "dev"]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
for file in $(find custom_components/ -name "manifest.json"); do
cat "$file" | for req in $(jq .requirements[]);
do pip install $(echo "$req" | jq -r .);
done;
done
- name: Install Home Assistant ${{ matrix.ha-version }}
run: |
if [ ${{ matrix.ha-version }} == "dev" ]; then
pip install git+git://github.com/home-assistant/home-assistant.git@dev
elif [ ${{ matrix.ha-version }} == "beta" ]; then
pip install --pre homeassistant
else
pip install homeassistant
fi
- name: 'Inject HACS into Home Assistant configuration'
run: |
echo "default_config:" | tee -a configuration.yaml
echo "hacs:" | tee -a configuration.yaml
echo " token: xxx" | tee -a configuration.yaml
- name: Home Assistant configuration check
run: hass --script check_config --config .
name: Test with Home Assistant

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
test:
name: Testing with (Python, HA)
runs-on: ubuntu-latest
strategy:
max-parallel: 6
matrix:
python-version: [3.6, 3.7]
ha-version: ["stable", "beta", "dev"]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
for file in $(find custom_components/ -name "manifest.json"); do
cat "$file" | for req in $(jq .requirements[]);
do pip install $(echo "$req" | jq -r .);
done;
done
- name: Install Home Assistant ${{ matrix.ha-version }}
run: |
if [ ${{ matrix.ha-version }} == "dev" ]; then
pip install git+git://github.com/home-assistant/home-assistant.git@dev
elif [ ${{ matrix.ha-version }} == "beta" ]; then
pip install --pre homeassistant
else
pip install homeassistant
fi
- name: 'Inject HACS into Home Assistant configuration'
run: |
echo "default_config:" | tee -a configuration.yaml
echo "hacs:" | tee -a configuration.yaml
echo " token: xxx" | tee -a configuration.yaml
- name: Home Assistant configuration check
run: hass --script check_config --config .
62 changes: 8 additions & 54 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,27 @@
"version": "2.0.0",
"tasks": [
{
"label": "Start Home Assistant on port 8124",
"label": "Run Home Assistant on port 9123",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && StartHomeAssistant",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"command": "dc start",
"problemMatcher": []
},
{
"label": "Upgrade Home Assistant to latest dev",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && UpdgradeHomeAssistantDev",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Set Home Assistant Version",
"label": "Run Home Assistant configuration against /config",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && SetHomeAssistantVersion",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"command": "dc check",
"problemMatcher": []
},
{
"label": "Home Assistant Config Check",
"label": "Upgrade Home Assistant to latest dev",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && HomeAssistantConfigCheck",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"command": "dc start",
"problemMatcher": []
},
{
"label": "Install TabNine Cloud AutoCompleter",
"label": "Install a spesific version of Home Assistant",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && InstallTabNine",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"command": "dc set-version",
"problemMatcher": []
}
]
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# HACS (Home Assistant Community Store)

[![Total alerts](https://img.shields.io/lgtm/alerts/g/custom-components/hacs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/custom-components/hacs/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/custom-components/hacs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/custom-components/hacs/context:javascript)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/custom-components/hacs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/custom-components/hacs/context:python)

_Manage (Install, track, upgrade) and discover custom elements for Home Assistant directly from the UI._

![gif](https://hacs.netlify.com/images/hacsdemo.gif)
Expand Down
3 changes: 2 additions & 1 deletion custom_components/hacs/.translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"step": {
"user": {
"data": {
"country": "Filter with country code."
"country": "Filter with country code.",
"release_limit": "Number of releases to show."
}
}
}
Expand Down
Loading

0 comments on commit 81d7290

Please sign in to comment.