Skip to content

Commit f5aae34

Browse files
committed
Added 'generate_route_manifest' as a pre-commit hook step that triggers when FastAPI router modules are modified
1 parent ce7a623 commit f5aae34

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# YAML formatting specifications: https://yaml.org/spec/1.2.2/
22

33
repos:
4+
# Generate up-to-date Murfey route manifest
5+
# NOTE: This will only work if Murfey is installed in the current Python environment
6+
- repo: local
7+
hooks:
8+
- id: generate-route-manifest
9+
name: Generating Murfey route manifest
10+
entry: murfey.generate_route_manifest
11+
language: system
12+
# Only run if FastAPI router-related modules are changed
13+
files: ^src/murfey/(instrument_server/.+\.py|server/(main|api/.+)\.py)$
14+
pass_filenames: false
15+
416
# Syntax validation and some basic sanity checks
517
- repo: https://github.com/pre-commit/pre-commit-hooks
618
rev: v4.5.0 # Released 2023-10-09

0 commit comments

Comments
 (0)