File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "features" : {
3+ "ghcr.io/devcontainers/features/github-cli:1" : {
4+ "version" : " 1.1.0" ,
5+ "resolved" : " ghcr.io/devcontainers/features/github-cli@sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671" ,
6+ "integrity" : " sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671"
7+ },
8+ "ghcr.io/jsburckhardt/devcontainer-features/uv:1" : {
9+ "version" : " 1.0.0" ,
10+ "resolved" : " ghcr.io/jsburckhardt/devcontainer-features/uv@sha256:542a0bc2203205b3c696de650ba862f280b20af3543493cc232edd9ac35791f7" ,
11+ "integrity" : " sha256:542a0bc2203205b3c696de650ba862f280b20af3543493cc232edd9ac35791f7"
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change 4949 },
5050 "image" : " mcr.microsoft.com/devcontainers/python:3.11-bookworm" ,
5151 "name" : " A Python3, async interface to the Hilo API" ,
52- "postCreateCommand" : " uv sync && uv run pre-commit install"
52+ "postCreateCommand" : " uv sync --group dev --group test && uv run pre-commit install"
5353}
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ jobs:
2424 python-version : ${{ env.DEFAULT_PYTHON }}
2525
2626 - name : Install uv
27- uses : astral-sh/setup-uv@v8.0 .0
27+ uses : astral-sh/setup-uv@v8.1 .0
2828
2929 - name : Install dependencies
30- run : uv sync
30+ run : uv sync --group dev
3131
3232 - name : Run pre-commit on all files
3333 env :
@@ -47,10 +47,10 @@ jobs:
4747 python-version : ${{ env.DEFAULT_PYTHON }}
4848
4949 - name : Install uv
50- uses : astral-sh/setup-uv@v8.0 .0
50+ uses : astral-sh/setup-uv@v8.1 .0
5151
5252 - name : Install dependencies
53- run : uv sync
53+ run : uv sync --group test
5454
5555 - name : Run tests
5656 run : uv run pytest -v
Original file line number Diff line number Diff line change 11---
22repos :
33 - repo : https://github.com/PyCQA/bandit
4- rev : ' 1.7.9 '
4+ rev : ' 1.9.2 '
55 hooks :
66 - id : bandit
77 args :
@@ -12,14 +12,14 @@ repos:
1212 - repo : https://github.com/astral-sh/ruff-pre-commit
1313 rev : v0.15.9
1414 hooks :
15- - id : ruff
16- args : [--fix, --exit-non-zero-on-fix]
17- files : ^pyhilo/.+\.py$
1815 - id : ruff-format
1916 args : [--quiet]
2017 files : ^pyhilo/.+\.py$
18+ - id : ruff
19+ args : [--fix, --exit-non-zero-on-fix]
20+ files : ^pyhilo/.+\.py$
2121 - repo : https://github.com/codespell-project/codespell
22- rev : v2.2.6
22+ rev : v2.4.1
2323 hooks :
2424 - id : codespell
2525 args :
@@ -38,9 +38,13 @@ repos:
3838 - types-PyYAML
3939
4040 - repo : https://github.com/pre-commit/pre-commit-hooks
41- rev : v5 .0.0
41+ rev : v6 .0.0
4242 hooks :
4343 - id : check-json
44+ # Exclude .devcontainer.json and .vscode since it uses JSONC
45+ exclude : (.vscode|.devcontainer)
46+ - id : check-yaml
47+ - id : trailing-whitespace
4448 - id : no-commit-to-branch
4549 args :
4650 - --branch=dev
5155# - id: pydocstyle
5256# files: ^((pyhilo|tests)/.+)?[^/]+\.py$
5357 - repo : https://github.com/gruntwork-io/pre-commit
54- rev : v0.1.12
58+ rev : v0.1.30
5559 hooks :
5660 - id : shellcheck
5761 files : ^script/.+
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ You need at least:
4141To install all packages, including all development requirements:
4242
4343``` bash
44- uv sync
44+ uv sync --group dev --group test
4545```
4646
4747As this repository uses the [ pre-commit] [ pre-commit ] framework, all changes
@@ -78,8 +78,6 @@ check [the contributor's page][contributors].
7878[ license-shield ] : https://img.shields.io/github/license/dvd-dev/python-hilo.svg
7979[ devcontainer-shield ] : https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode
8080[ devcontainer ] : https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/dvd-dev/python-hilo
81- [ poetry-install ] : https://python-poetry.org/docs/#installation
82- [ poetry ] : https://python-poetry.org
8381[ pre-commit ] : https://pre-commit.com/
8482[ uv ] : https://docs.astral.sh/uv/
8583[ ruff ] : https://docs.astral.sh/ruff/
Original file line number Diff line number Diff line change @@ -41,18 +41,38 @@ build-backend = "hatchling.build"
4141
4242[dependency-groups ]
4343dev = [
44- " pre-commit>=4.0.0" ,
44+ " pre-commit>=4.6.0" ,
45+ ]
46+ test = [
4547 " pytest>=8.0.0" ,
4648 " pytest-asyncio>=0.24.0" ,
49+ " pytest-cov>=5.0.0" ,
50+ " ruff>=0.15.12" ,
4751]
4852
4953[tool .pytest .ini_options ]
5054testpaths = [" tests" ]
5155asyncio_mode = " auto"
56+ addopts = [
57+ " --strict" ,
58+ " --cov=pyhilo" ,
59+ ]
5260
5361[tool .hatch .build .targets .wheel ]
5462packages = [" pyhilo" ]
5563
64+ [tool .coverage .run ]
65+ source = [" pyhilo" ]
66+
67+ [tool .coverage .report ]
68+ show_missing = true
69+ exclude_lines = [
70+ " pragma: no cover" ,
71+ " raise NotImplemented()" ,
72+ " if __name__ == .__main__.:" ,
73+ " main()" ,
74+ ]
75+
5676[tool .ruff ]
5777line-length = 88
5878target-version = " py311"
You can’t perform that action at this time.
0 commit comments