Skip to content

Commit

Permalink
Merge pull request #26 from bellflight/develop
Browse files Browse the repository at this point in the history
Main release
  • Loading branch information
NathanVaughn committed Jun 3, 2023
2 parents 790a753 + 9976da1 commit 3d98b86
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 245 deletions.
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"
]
}
}
}
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Expand Up @@ -15,26 +15,26 @@ repos:
- --no-update
id: poetry-lock
repo: https://github.com/python-poetry/poetry
rev: 1.4.0
rev: 1.5.1
- hooks:
- args:
- --fix
id: ruff
repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.253
rev: v0.0.270
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
- hooks:
- id: pyleft
repo: https://github.com/nathanvaughn/pyleft
rev: v1.1.4
rev: v1.2.1
- hooks:
- id: pyright
repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.296
rev: v1.1.311
- hooks:
- id: markdownlint
repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
rev: v0.34.0
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"
}
]
}
5 changes: 3 additions & 2 deletions Dockerfile
Expand Up @@ -2,11 +2,12 @@ FROM docker.io/library/python:3.11 AS poetry-exporter

WORKDIR /work

RUN python -m pip install poetry

COPY pyproject.toml pyproject.toml
COPY poetry.lock poetry.lock

RUN python -m pip install poetry \
&& poetry export -o requirements.txt
RUN poetry export -o requirements.txt

FROM docker.io/library/python:3.11-bullseye

Expand Down
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
446 changes: 218 additions & 228 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pyproject.toml
Expand Up @@ -9,15 +9,15 @@

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
adafruit-circuitpython-neopixel-spi = "1.0.5"
loguru = "^0.6.0"
bell-avr-libraries = "0.2.0a0"
adafruit-circuitpython-neopixel-spi = "1.0.7"
loguru = "0.7.0"
bell-avr-libraries = "0.2.0a2"
# https://github.com/NVIDIA/jetson-gpio/issues/79
jetson-gpio = { version = "2.0.21", markers = "sys_platform == 'linux'" }
jetson-gpio = { version = "!=2.1.0", markers = "sys_platform == 'linux'" }

[tool.poetry.group.dev.dependencies]
pre-commit = "^2.21.0"
pytest-cov = "^4.0.0"
pre-commit = "^3.3.2"
pytest-cov = "^4.1.0"
pytest = "^7.2.1"
pytest-mock = "^3.10.0"

Expand Down

0 comments on commit 3d98b86

Please sign in to comment.