diff --git a/README.md b/README.md index c2651aa..f165cd7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,29 @@ Needs a long-lived token for HA in `secrets.yaml` +### Debugger + +Use with VSCode's debugger using a `launch.json` file. + +```json +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "AppDaemon Dev", + "type": "debugpy", + "request": "launch", + "module": "appdaemon", + "justMyCode": true, + "args": "-c ../conf" + }, + ] +} +``` + ### Test Script ```bash @@ -20,22 +43,22 @@ cd $REPO_DIR rm -rf ./dist +# isort ./appdaemon ./docs/conf.py + +black ./appdaemon ./docs/conf.py + +pre-commit run --all-files + +python -m pytest + python -m build -docker build -t appdaemon:jsl-dev . +docker build -t appdaemon:local-dev . cd ../conf docker compose run -it --rm appdaemon ``` -## TODO - -### Reloading - -- Seems to work from non-package module -- Does not work from inside a package module - - ## Reference - [`importlib.reload(module)`](https://docs.python.org/3/library/importlib.html#importlib.reload)