-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace tests at the right place. Add missing config files. Run tests
- Loading branch information
Jean-Marc Collin
committed
Oct 21, 2023
1 parent
eb54f28
commit cd0ab3c
Showing
29 changed files
with
266 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
|
||
echo "Sourcing .bashrc" | ||
alias ll='ls -l' | ||
export HA='/home/vscode/core' | ||
cd $HA | ||
source venv/bin/activate | ||
# source venv/bin/activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,54 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
// "image": "ghcr.io/ludeeus/devcontainer/integration:latest", | ||
{ | ||
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.10", | ||
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", | ||
"name": "Versatile Thermostat integration", | ||
"context": "..", | ||
"appPort": [ | ||
"9123:8123" | ||
], | ||
// "postCreateCommand": "container install", | ||
"postCreateCommand": "./container install", | ||
"extensions": [ | ||
"ms-python.python", | ||
"github.vscode-pull-request-github", | ||
"ryanluker.vscode-coverage-gutters", | ||
"ms-python.vscode-pylance" | ||
], | ||
"postCreateCommand": "./container dev-setup", | ||
|
||
"mounts": [ | ||
"source=${localWorkspaceFolder}/.devcontainer/configuration.yaml,target=/home/vscode/core/config/configuration.yaml,type=bind,consistency=cached", | ||
"source=${localWorkspaceFolder}/custom_components,target=/home/vscode/core/config/custom_components,type=bind,consistency=cached" | ||
"source=/Users/jmcollin/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"terminal.integrated.profiles.linux": { | ||
"Bash Profile": { | ||
"path": "bash", | ||
"args": [] | ||
|
||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"github.vscode-pull-request-github", | ||
"ryanluker.vscode-coverage-gutters", | ||
"ms-python.vscode-pylance" | ||
], | ||
// "mounts": [ | ||
// "source=${localWorkspaceFolder}/.devcontainer/configuration.yaml,target=/home/vscode/core/config/configuration.yaml,type=bind,consistency=cached", | ||
// "source=${localWorkspaceFolder}/custom_components,target=/home/vscode/core/config/custom_components,type=bind,consistency=cached" | ||
// ], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "bash", | ||
"args": [] | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
// "terminal.integrated.shell.linux": "/bin/bash", | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.analysis.autoSearchPaths": true, | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.formatting.provider": "black", | ||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true, | ||
"python.experiments.optOutFrom": ["pythonTestAdapter"], | ||
"python.analysis.logLevel": "Trace" | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.linux": "Bash Profile", | ||
// "terminal.integrated.shell.linux": "/bin/bash", | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.analysis.autoSearchPaths": true, | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.formatting.provider": "black", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,4 +105,6 @@ dist | |
|
||
# init file required for unittest | ||
custom_components/__init__.py | ||
__pycache__ | ||
__pycache__ | ||
|
||
config/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
{ | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
}, | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.pythonPath": "/usr/local/bin/python", | ||
"files.associations": { | ||
"*.yaml": "home-assistant" | ||
}, | ||
"python.testing.pytestArgs": [ | ||
"tests" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"python.analysis.extraPaths": [ | ||
"/home/vscode/core", | ||
"/workspaces/versatile_thermostat" | ||
] | ||
// "/home/vscode/core", | ||
"/workspaces/custom_components/versatile_thermostat" | ||
], | ||
"python.formatting.provider": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Consignes de contribution | ||
|
||
Contribuer à ce projet doit être aussi simple et transparent que possible, que ce soit : | ||
|
||
- Signaler un bug | ||
- Discuter de l'état actuel du code | ||
- Soumettre un correctif | ||
- Proposer de nouvelles fonctionnalités | ||
|
||
## Github est utilisé pour tout | ||
|
||
Github est utilisé pour héberger du code, pour suivre les problèmes et les demandes de fonctionnalités, ainsi que pour accepter les demandes d'extraction. | ||
|
||
Les demandes d'extraction sont le meilleur moyen de proposer des modifications à la base de code. | ||
|
||
1. Fourchez le dépôt et créez votre branche à partir de `master`. | ||
2. Si vous avez modifié quelque chose, mettez à jour la documentation. | ||
3. Assurez-vous que votre code peluche (en utilisant du noir). | ||
4. Testez votre contribution. | ||
5. Émettez cette pull request ! | ||
|
||
## Toutes les contributions que vous ferez seront sous la licence logicielle MIT | ||
|
||
En bref, lorsque vous soumettez des modifications de code, vos soumissions sont considérées comme étant sous la même [licence MIT](http://choosealicense.com/licenses/mit/) qui couvre le projet. N'hésitez pas à contacter les mainteneurs si cela vous préoccupe. | ||
|
||
## Signaler les bogues en utilisant les [issues] de Github (../../issues) | ||
|
||
Les problèmes GitHub sont utilisés pour suivre les bogues publics. | ||
Signalez un bogue en [ouvrant un nouveau problème](../../issues/new/choose) ; C'est si facile! | ||
|
||
## Rédiger des rapports de bogue avec des détails, un arrière-plan et un exemple de code | ||
|
||
Les **rapports de bogues géniaux** ont tendance à avoir : | ||
|
||
- Un résumé rapide et/ou un historique | ||
- Étapes à reproduire | ||
- Être spécifique! | ||
- Donnez un exemple de code si vous le pouvez. | ||
- Ce à quoi vous vous attendiez arriverait | ||
- Que se passe-t-il réellement | ||
- Notes (y compris éventuellement pourquoi vous pensez que cela pourrait se produire, ou des choses que vous avez essayées qui n'ont pas fonctionné) | ||
|
||
Les gens *adorent* les rapports de bogues approfondis. Je ne plaisante même pas. | ||
|
||
## Utilisez un style de codage cohérent | ||
|
||
Utilisez [black](https://github.com/ambv/black) pour vous assurer que le code suit le style. | ||
|
||
## Testez votre modification de code | ||
|
||
Ce composant personnalisé est basé sur les meilleures pratiques décrites ici [modèle d'intégration_blueprint](https://github.com/custom-components/integration_blueprint). | ||
|
||
Il est livré avec un environnement de développement dans un conteneur, facile à lancer | ||
si vous utilisez Visual Studio Code. Avec ce conteneur, vous aurez un stand alone | ||
Instance de Home Assistant en cours d'exécution et déjà configurée avec le inclus | ||
[`.devcontainer/configuration.yaml`](./.devcontainer/configuration.yaml) | ||
déposer. | ||
|
||
## Licence | ||
|
||
En contribuant, vous acceptez que vos contributions soient autorisées sous sa licence MIT. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# 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. Test you contribution. | ||
5. 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. | ||
|
||
## Test your code modification | ||
|
||
This custom component is based on best practices described here [integration_blueprint template](https://github.com/custom-components/integration_blueprint). | ||
|
||
It comes with development environment in a container, easy to launch | ||
if you use Visual Studio Code. With this container you will have a stand alone | ||
Home Assistant instance running and already configured with the included | ||
[`.devcontainer/configuration.yaml`](./.devcontainer/configuration.yaml) | ||
file. | ||
|
||
## License | ||
|
||
By contributing, you agree that your contributions will be licensed under its MIT License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.