Skip to content

Commit

Permalink
Summer update
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jul 5, 2020
1 parent aa3e219 commit dfdfad7
Show file tree
Hide file tree
Showing 22 changed files with 546 additions and 396 deletions.
36 changes: 19 additions & 17 deletions .devcontainer/configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
default_config:
logger:
default: error
logs:
custom_components.wienerlinien: debug



sensor:
- platform: wienerlinien
apikey: 2190400
stops: '4429'
firstnext: first
- platform: wienerlinien
apikey: 2190400
stops: '4429'
firstnext: next
default_config:
logger:
default: error
logs:
custom_components.wienerlinien: debug


sensor:
- platform: wienerlinien
stops: '4429'
firstnext: first
- platform: wienerlinien
stops: '4429'
firstnext: next
- platform: wienerlinien
firstnext: first
stops:
- '4429'
- '3230'
60 changes: 28 additions & 32 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "wienerlinien dev",
"image": "ludeeus/devcontainer:integration",
"context": "..",
"appPort": [
"9123:8123"
],
"postCreateCommand": "dc install",
"runArgs": [
"-v",
"${env:HOME}${env:USERPROFILE}/.ssh:/tmp/.ssh" // This is added so you can push from inside the container
],
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"tabnine.tabnine-vscode"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/bin/python3",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
{
"name": "wienerlinien development",
"image": "ludeeus/container:integration",
"context": "..",
"postCreateCommand": "make init",
"appPort": [
"9123:8123"
],
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"ryanluker.vscode-coverage-gutters",
"ms-python.vscode-pylance"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/bin/python3",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
21 changes: 21 additions & 0 deletions .devcontainer/integration_start
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# Make the config dir
mkdir -p /tmp/config


# Symplink the custom_components dir
if [ -d "/tmp/config/custom_components" ]; then
rm -rf /tmp/config/custom_components
fi
ln -sf "${PWD}/custom_components" /tmp/config/custom_components

# Symlink configuration.yaml
if [ ! -f ".devcontainer/configuration.yaml" ]; then
cp .devcontainer/sample_configuration.yaml .devcontainer/configuration.yaml
fi
ln -sf "${PWD}/.devcontainer/configuration.yaml" /tmp/config/configuration.yaml


# Start Home Assistant
hass -c /tmp/config
34 changes: 17 additions & 17 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
34 changes: 17 additions & 17 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Issue
about: Create a report to help us improve

---

**Version of the custom_component**
<!-- If you are not using the newest version, download and try that before opening a issue-->

**Describe the bug**
A clear and concise description of what the bug is.

**log**
<!-- issues without debug logging will be closed-->
```
Add your logs here.
```
---
name: Issue
about: Create a report to help us improve

---

**Version of the custom_component**
<!-- If you are not using the newest version, download and try that before opening a issue-->

**Describe the bug**
A clear and concise description of what the bug is.

**log**
<!-- issues without debug logging will be closed-->
```
Add your logs here.
```
41 changes: 41 additions & 0 deletions .github/pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.6.2
hooks:
- id: pyupgrade
stages: [manual]
args:
- "--py37-plus"

- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
stages: [manual]
args:
- --safe
- --quiet
files: ^((custom_components|script|tests)/.+)?[^/]+\.py$

- repo: https://github.com/codespell-project/codespell
rev: v1.17.1
hooks:
- id: codespell
stages: [manual]
args:
- --quiet-level=2
- --ignore-words-list=hass,ba,fo,mabe

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: check-json
stages: [manual]
- id: requirements-txt-fixer
stages: [manual]
- id: check-ast
stages: [manual]
- id: mixed-line-ending
stages: [manual]
args:
- --fix=lf
5 changes: 0 additions & 5 deletions .github/release-drafter.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/settings.yml

This file was deleted.

34 changes: 17 additions & 17 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 14
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
#exemptLabels:
# - pinned
# - security
# Label to use when marking an issue as stale
staleLabel: Stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 14
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
#exemptLabels:
# - pinned
# - security
# Label to use when marking an issue as stale
staleLabel: Stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
53 changes: 53 additions & 0 deletions .github/workflows/homeassistant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Home Assistant

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

jobs:
ha_test:
name: Home Assistant Check
strategy:
matrix:
python-version: [3.7, 3.8]
runs-on: ubuntu-latest
steps:
- name: "Get the repository content"
uses: actions/checkout@v2

- name: Enable version ${{ matrix.python-version }} of Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y python-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev
make init
- name: Install dependencies for custom_components
run: |
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: 'Copy sample configuration for Home Assistant'
run: cp -f .devcontainer/sample_configuration.yaml ./configuration.yaml

- name: Home Assistant configuration check
run: |
echo "Testing with this configuration:"
cat configuration.yaml
echo ""
hass --script check_config --config .
Loading

0 comments on commit dfdfad7

Please sign in to comment.