Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use vscode-task-runner #25

Merged
merged 1 commit into from Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .devcontainer/devcontainer.json
Expand Up @@ -3,5 +3,16 @@
"build": {
"context": "..",
"dockerfile": "../Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"actboy168.tasks",
"ms-python.python",
"ms-azuretools.vscode-docker",
"redhat.vscode-yaml",
"tamasfe.even-better-toml"
]
}
}
}
21 changes: 21 additions & 0 deletions .vscode/tasks.json
@@ -0,0 +1,21 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "pre-commit",
"type": "shell",
"command": "poetry run pre-commit run --all-files",
"dependsOn": ["install"]
},
{
"label": "install",
"command": "poetry install --sync",
"type": "shell"
},
{
"label": "tests",
"command": "poetry run pytest -v --cov=src/ --cov-report=html",
"type": "shell"
}
]
}
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -23,12 +23,14 @@ It's assumed you have a version of Python installed from
[python.org](https://python.org) that is the same or newer as
defined in the [`Dockerfile`](Dockerfile).

First, install [Poetry](https://python-poetry.org/):
First, install [Poetry](https://python-poetry.org/) and
[VS Code Task Runner](https://pypi.org/project/vscode-task-runner/):

```bash
python -m pip install pipx --upgrade
pipx ensurepath
pipx install poetry
pipx install vscode-task-runner
# (Optionally) Add pre-commit plugin
poetry self add poetry-pre-commit-plugin
```
Expand All @@ -38,8 +40,7 @@ Now, you can clone the repo and install dependencies:
```bash
git clone https://github.com/bellflight/AVR-VMC-Status-Module
cd AVR-VMC-Status-Module
poetry install --sync
poetry run pre-commit install --install-hooks
vtr install
```

Run
Expand Down