Skip to content
Merged

Prek #149

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Latest commit
env:
CACHE_VERSION: 1
DEFAULT_PYTHON: "3.14"
PRE_COMMIT_HOME: ~/.cache/pre-commit
PREK_HOME: ~/.cache/prek
VENV: venv

on:
Expand Down Expand Up @@ -75,13 +75,12 @@ jobs:
pip install uv
uv venv --seed venv
. venv/bin/activate
uv pip install pre-commit -r requirements.txt -r requirements-test.txt
pre-commit install
pre-commit install-hooks
- name: Full pre-commit
uv pip install prek -r requirements.txt -r requirements-test.txt
prek install
- name: Full prek (pre-commit)
run: |
. venv/bin/activate
SKIP=no-commit-to-branch pre-commit run --show-diff-on-failure --color=always --all-files
SKIP=no-commit-to-branch prek run --show-diff-on-failure --color=always --all-files

pytest:
runs-on: ubuntu-latest
Expand Down
5 changes: 0 additions & 5 deletions .markdownlint.yaml

This file was deleted.

19 changes: 10 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repos:
exclude_types: [csv, json]
exclude: ^userdata/|^fixtures/
- repo: https://github.com/PyCQA/bandit
rev: 1.8.6
rev: 1.9.2
hooks:
- id: bandit
name: "Bandit checking"
Expand All @@ -56,14 +56,14 @@ repos:
- id: yamllint
name: "YAML linting"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
- id: shellcheck
name: "Shell checking"
args:
- --external-sources
- repo: https://github.com/cdce8p/python-typing-update
rev: v0.7.3
rev: v0.8.1
hooks:
# Run `python-typing-update` hook manually from time to time
# to update python typing syntax.
Expand All @@ -76,10 +76,11 @@ repos:
- --force
- --keep-updates
files: ^(airos|tests|script)/.+\.py$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.34
hooks:
- id: markdownlint
- id: pymarkdown
name: MarkDown Lint
- repo: local
hooks:
- id: parsetest
Expand All @@ -91,20 +92,20 @@ repos:
files: ^(airos|tests|script)/.+\.py$|^fixtures/userdata/.+\.json$
pass_filenames: false
- id: pytest
name: "pytest"
name: "Testing using pytest"
entry: script/run-in-env.sh pytest --log-level info tests/ --cov='airos/'
language: script
types: [python]
pass_filenames: false
files: ^(airos|tests|script)/.+\.py$
- id: pylint
name: "pylinting"
name: "Linting with pylint"
entry: script/run-in-env.sh pylint -j 0
language: script
types: [python]
files: ^(airos|tests|script)/.+\.py$
- id: mypy
name: mypy
name: "Typing check using mypy"
entry: script/run-in-env.sh mypy
language: script
require_serial: true
Expand Down
1 change: 1 addition & 0 deletions .pymarkdown
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "plugins": { "md013": { "enabled": false }, "md024": { "enabled": false }, "md033": { "enabled": false }, "md041": { "enabled": false } } }
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [0.6.2] - 2026-01-12

### Changed

- Migrated pre-commit to prek

## [0.6.1] - 2026-01-03

### Added
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "airos"
version = "0.6.1"
version = "0.6.2"
license = "MIT"
description = "Ubiquiti airOS module(s) for Python 3."
readme = "README.md"
Expand Down