From 43d1dbb3d8db451f75ee21e1a04cbaeaf0b28083 Mon Sep 17 00:00:00 2001 From: Leonardo Merza Date: Thu, 15 Aug 2019 09:55:29 -0400 Subject: [PATCH] add dev files --- .devcontainer/Dockerfile | 17 ++++++ .devcontainer/README.md | 53 +++++++++++++++++++ .devcontainer/configuration.yaml | 15 ++++++ .devcontainer/custom_component_helper | 29 ++++++++++ .devcontainer/devcontainer.json | 24 +++++++++ .devcontainer/images/reopen.png | Bin 0 -> 8177 bytes .github/ISSUE_TEMPLATE/feature_request.md | 17 ++++++ .github/ISSUE_TEMPLATE/issue.md | 42 +++++++++++++++ .github/settings.yml | 23 ++++++++ .gitignore | 3 +- .vscode/tasks.json | 61 ++++++++++++++++++++++ CONTRIBUTING.md | 50 ++++++++++++++++++ requirements.txt | 0 13 files changed, 333 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/README.md create mode 100644 .devcontainer/configuration.yaml create mode 100644 .devcontainer/custom_component_helper create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/images/reopen.png create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/issue.md create mode 100644 .github/settings.yml create mode 100644 .vscode/tasks.json create mode 100644 CONTRIBUTING.md create mode 100644 requirements.txt diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..bb0edd0 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.7 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + git \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN python -m pip install --upgrade colorlog black pylint openrouteservice +RUN python -m pip install --upgrade git+https://github.com/home-assistant/home-assistant@dev +RUN cd && mkdir -p /config/custom_components + + +WORKDIR /workspace + +# Set the default shell to bash instead of sh +ENV SHELL /bin/bash \ No newline at end of file diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000..5f19948 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,53 @@ +# Devcontainer + +_The easiest way to contribute to and/or test this repository._ + +## Requirements + +- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) +- [docker](https://docs.docker.com/install/) +- [VS Code](https://code.visualstudio.com/) +- [Remote - Containers (VSC Extention)](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) + +[More info about requirements and devcontainer in general](https://code.visualstudio.com/docs/remote/containers#_getting-started) + +## How to use Devcontainer for development/test + +1. Make sure your computer meets the requirements. +1. Fork this repository. +1. Clone the repository to your computer. +1. Open the repository using VS Code. + +When you open this repository with VSCode and your computer meets the requirements you are asked to "Reopen in Container", do that. + +![reopen](images/reopen.png) + +If you don't see this notification, open the command pallet (ctrl+shift+p) and select `Remote-Containers: Reopen Folder in Container`. + +_It will now build the devcontainer._ + +The container have some "tasks" to help you testing your changes. + +## Custom Tasks in this repository + +_Start "tasks" by opening the the command pallet (ctrl+shift+p) and select `Tasks: Run Task`_ + +Running tasks like `Start Home Assistant on port 8124` can be restarted by opening the the command pallet (ctrl+shift+p) and select `Tasks: Restart Running Task`, then select the task you want to restart. + +### Start Home Assistant on port 8124 + +This will copy the configuration and the integration files to the expected location in the container. + +And start up Home Assistant on [port 8124.](http://localhost:8124) + +### Upgrade Home Assistant to latest dev + +This will upgrade Home Assistant to the latest dev version. + +### Set Home Assistant Version + +This allows you to specify a version of Home Assistant to install inside the devcontainer. + +### Home Assistant Config Check + +This runs a config check to make sure your config is valid. diff --git a/.devcontainer/configuration.yaml b/.devcontainer/configuration.yaml new file mode 100644 index 0000000..8fe4acf --- /dev/null +++ b/.devcontainer/configuration.yaml @@ -0,0 +1,15 @@ +default_config: +logger: + default: error + logs: + custom_components.open_route_service: debug + + + +sensor: + - platform: open_route_service + api_key: !secret api_key + origin_latitude: "49.41461" + origin_longitude: "8.681495" + destination_latitude: "49.420318" + destination_longitude: "8.687872" \ No newline at end of file diff --git a/.devcontainer/custom_component_helper b/.devcontainer/custom_component_helper new file mode 100644 index 0000000..2128534 --- /dev/null +++ b/.devcontainer/custom_component_helper @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +function StartHomeAssistant { + echo "Copy configuration.yaml" + cp -f .devcontainer/configuration.yaml /config || echo ".devcontainer/configuration.yaml are missing!" exit 1 + + echo "Copy secrets.yaml" + cp -f .devcontainer/secrets.yaml /config || echo ".devcontainer/secrets.yaml are missing!" + + echo "Copy the custom component" + rm -R /config/custom_components/ || echo "" + cp -r custom_components /config/custom_components/ || echo "Could not copy the custom_component" exit 1 + + echo "Start Home Assistant" + hass -c /config +} + +function UpdgradeHomeAssistantDev { + python -m pip install --upgrade git+https://github.com/home-assistant/home-assistant@dev +} + +function SetHomeAssistantVersion { + read -p 'Version: ' version + python -m pip install --upgrade homeassistant==$version +} + +function HomeAssistantConfigCheck { + hass -c /config --script check_config +} \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..906fb42 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,24 @@ +// See https://aka.ms/vscode-remote/devcontainer.json for format details. +{ + "context": "..", + "dockerFile": "Dockerfile", + "appPort": "8124:8123", + "runArgs": [ + "-e", + "GIT_EDTIOR='code --wait'" + ], + "extensions": [ + "ms-python.python", + "tabnine.tabnine-vscode" + ], + "settings": { + "python.pythonPath": "/usr/local/bin/python", + "python.linting.pylintEnabled": true, + "python.linting.enabled": true, + "python.formatting.provider": "black", + "editor.formatOnPaste": false, + "editor.formatOnSave": true, + "editor.formatOnType": true, + "files.trimTrailingWhitespace": true + } +} \ No newline at end of file diff --git a/.devcontainer/images/reopen.png b/.devcontainer/images/reopen.png new file mode 100644 index 0000000000000000000000000000000000000000..cbcec3c7b87925be0a0e3c6c7db5c32d03380b1b GIT binary patch literal 8177 zcmc(EXH-*Lv@Rk=Y$zzGbSa@Dpi~1y`hgG-1wo3^LP>~$xNp2S#{03?-fOS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sFnCsjLAh(*6A!8AkBat;YW7Uv?2j z#Nzuthw)99keW98k3E^72=Uc~+@hlg?V}m|mg7!NyD_z(fSLYBDXFiex+E&9 z_=bmuC8CGIZgj7HNLN`1qnWTe4X$+-2J`L3I}_;NyFf? zJ)+E+^qlh*+#U~lD{S3tv4w76y!`alHHw#dNI{!tYiMo28w#ybeU3%3N3GgW12@x$ z>p^`j@|`G&XqN#7)mV>*tZ*y{O(gW1?)8g4@G=$gmA$JDvGHZL&U+DmLtV@^Hhu>a*d`|9Y``O4B6asy0+e4BOohAAME zfBiT0=C4Vap2>(W%0eI~E{V&}LO=f;s%e4=XS3Udsf<0VUnR-b-yKsRR!7CMk>x4= z(FVR%>+#$~=J7EFFMiqIT22K6Z&S65V0DAEt?wEWz9Z@fVU;(V_Ys94MUROl?t1js z)YAA$=gJ05Df;SBhmGa91!g=-bx2!=XYgsv>vp`q6>=v@C7ZbdvZ_$Te-M+ZSc&^i z5)eKyMmG1EHuww|Sra%Q^@`+4=jlhQm0tI{q;S#X!n=y6omZHa2SPe~{HFbDCxS~3 zc(*1z7G_u>sgMbZ@7TfB21uF|2DqRac<1(bki)b{HM>ki_ljv~|ArKF(${rI zlPH{SymCieII}i*t8n*;AB%-p^F%3y7T7uDW2g`pt9c4^8zF{h@9j|%3Ode^nQyAM zIe8RZ5ZhSXEKVScX65<<27Vs}-X4T~if2e%22ReWQbvNr3B?n^vmqSVWd13u+J z61N+o&3LkMdl{g|!v`sPn*l8W+Z&xdDbtRAAIyXR6G6EF+u_V89O(SC( literal 0 HcmV?d00001 diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..507f06e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +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. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/issue.md b/.github/ISSUE_TEMPLATE/issue.md new file mode 100644 index 0000000..70f3d5b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue.md @@ -0,0 +1,42 @@ +--- +name: Issue +about: Create a report to help us improve + +--- + + + +## Version of the custom_component + + +## Configuration + +```yaml + +Add your logs here. + +``` + +## Describe the bug +A clear and concise description of what the bug is. + + +## Debug log + + + +```text + +Add your logs here. + +``` \ No newline at end of file diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..717c121 --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,23 @@ +repository: + private: false + has_issues: true + has_projects: false + has_wiki: false + has_downloads: false + default_branch: master + allow_squash_merge: true + allow_merge_commit: false + allow_rebase_merge: false +labels: + - name: "Feature Request" + color: "fbca04" + - name: "Bug" + color: "b60205" + - name: "Wont Fix" + color: "ffffff" + - name: "Enhancement" + color: a2eeef + - name: "Documentation" + color: "008672" + - name: "Stale" + color: "930191" \ No newline at end of file diff --git a/.gitignore b/.gitignore index abd32e8..dbc0568 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*__pycache__* \ No newline at end of file +*__pycache__* +.devcontainer/secrets.yaml \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..31504d9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,61 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Start Home Assistant on port 8124", + "type": "shell", + "command": "source .devcontainer/custom_component_helper && StartHomeAssistant", + "group": { + "kind": "test", + "isDefault": true, + }, + "presentation": { + "reveal": "always", + "panel": "new" + }, + "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", + "type": "shell", + "command": "source .devcontainer/custom_component_helper && SetHomeAssistantVersion", + "group": { + "kind": "test", + "isDefault": true, + }, + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": [] + }, + { + "label": "Home Assistant Config Check", + "type": "shell", + "command": "source .devcontainer/custom_component_helper && HomeAssistantConfigCheck", + "group": { + "kind": "test", + "isDefault": true, + }, + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f291aca --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,50 @@ +# Contribution guidelines + +Contributing to this project should be as easy and transparent as possible, whether it's: + +- Reporting a bug +- Discussing the current state of the code +- Submitting a fix +- Proposing new features + +## Github is used for everything + +Github is used to host code, to track issues and feature requests, as well as accept pull requests. + +Pull requests are the best way to propose changes to the codebase. + +1. Fork the repo and create your branch from `master`. +2. If you've changed something, update the documentation. +3. Make sure your code lints (using black). +4. Issue that pull request! + +## Any contributions you make will be under the MIT Software License + +In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. + +## Report bugs using Github's [issues](../../issues) + +GitHub issues are used to track public bugs. +Report a bug by [opening a new issue](../../issues/new/choose); it's that easy! + +## Write bug reports with detail, background, and sample code + +**Great Bug Reports** tend to have: + +- A quick summary and/or background +- Steps to reproduce + - Be specific! + - Give sample code if you can. +- What you expected would happen +- What actually happens +- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) + +People *love* thorough bug reports. I'm not even kidding. + +## Use a Consistent Coding Style + +Use [black](https://github.com/ambv/black) to make sure the code follows the style. + +## License + +By contributing, you agree that your contributions will be licensed under its MIT License. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29