Skip to content

Commit

Permalink
Add vscode config
Browse files Browse the repository at this point in the history
  • Loading branch information
acockburn committed Mar 13, 2023
1 parent 3463be8 commit 45edb36
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,3 @@ target/

# Mac stuff
.DS_Store

# VSCode
.vscode
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// 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": "python",
"request": "launch",
"module": "appdaemon",
"justMyCode": true,
"args": "-c /home/hass/appdaemon/dev_test --toml"
},
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

}
155 changes: 155 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"version": "2.0.0",
"tasks":
[
{
"label": "Run Dev",
"command": "${command:python.interpreterPath}",
"args": ["-m", "appdaemon", "-c", "/home/hass/appdaemon/dev_test", "--toml"],
"type": "shell",
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Build Docs",
"command": "${command:python.interpreterPath}",
"args": ["/home/hass/src/venv/python_3.11/bin/sphinx-build", "-T", "-E", "${workspaceFolder}/docs", "${workspaceFolder}/../docs_build"],
"type": "shell",
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Auto Build Docs",
"command": "${command:python.interpreterPath}",
"args": ["/home/hass/src/venv/python_3.11/bin/sphinx-autobuild", "-T", "-E", "${workspaceFolder}/docs", "${workspaceFolder}/../docs_build", "--port", "9999"],
"type": "shell",
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Build Package",
"command": "${command:python.interpreterPath}",
"args": ["-m", "build"],
"type": "shell",
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Docker Build Production",
"command": "docker",
"args": ["build", "--tag", "appdaemon-production", "."],
"type": "shell",
"dependsOn": ["Build Package"],
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Docker Build Other",
"command": "docker",
"args": ["build", "--tag", "${input:tagName}", "."],
"type": "shell",
"dependsOn": ["Build Package"],
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Build Runtime Requirements",
"command": "pip-compile",
"args": ["--resolver=backtracking", "pyproject.toml"],
"type": "shell",
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Build Dev Requirements",
"command": "pip-compile",
"args": ["--extra=dev", "--output-file=dev-requirements.txt", "--resolver=backtracking", "pyproject.toml"],
"type": "shell",
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Build Doc Requirements",
"command": "pip-compile",
"args": ["--extra=doc", "--output-file=doc-requirements.txt", "--resolver=backtracking", "pyproject.toml"],
"type": "shell",
"presentation":
{
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Build All Requirements",
"dependsOn": ["Build Runtime Requirements", "Build Dev Requirements", "Build Doc Requirements"]
}
],
"inputs":
[
{
"id": "tagName",
"description": "Name of the image tag",
"type": "promptString"
}
]
}

0 comments on commit 45edb36

Please sign in to comment.