@@ -139,7 +139,7 @@ serve-ssl: certs
139
139
SSL=true CERT_FILE=certs/cert.pem KEY_FILE=certs/key.pem ./run-gunicorn.sh
140
140
141
141
dev :
142
- uvicorn mcpgateway.main:app --reload --reload-exclude=' public/'
142
+ @ $( VENV_DIR ) /bin/ uvicorn mcpgateway.main:app --reload --reload-exclude=' public/'
143
143
144
144
run :
145
145
./run.sh
@@ -342,65 +342,65 @@ lint:
342
342
# # Individual targets (alphabetical)
343
343
# # --------------------------------------------------------------------------- ##
344
344
autoflake : # # 🧹 Strip unused imports / vars
345
- autoflake --in-place --remove-all-unused-imports \
345
+ @ $( VENV_DIR ) /bin/ autoflake --in-place --remove-all-unused-imports \
346
346
--remove-unused-variables -r mcpgateway mcpgateway-wrapper tests
347
347
348
348
black : # # 🎨 Reformat code with black
349
- @echo " 🎨 black …" && black -l 200 mcpgateway mcpgateway-wrapper tests
349
+ @echo " 🎨 black …" && $( VENV_DIR ) /bin/ black -l 200 mcpgateway mcpgateway-wrapper tests
350
350
351
351
isort : # # 🔀 Sort imports
352
- @echo " 🔀 isort …" && isort .
352
+ @echo " 🔀 isort …" && $( VENV_DIR ) /bin/ isort .
353
353
354
354
flake8 : # # 🐍 flake8 checks
355
- flake8 mcpgateway
355
+ @ $( VENV_DIR ) /bin/ flake8 mcpgateway
356
356
357
357
pylint : # # 🐛 pylint checks
358
- pylint mcpgateway
358
+ @ $( VENV_DIR ) /bin/ pylint mcpgateway
359
359
360
360
markdownlint : # # 📖 Markdown linting
361
- markdownlint -c .markdownlint.json .
361
+ @ $( VENV_DIR ) /bin/ markdownlint -c .markdownlint.json .
362
362
363
363
mypy : # # 🏷️ mypy type-checking
364
- mypy mcpgateway
364
+ @ $( VENV_DIR ) /bin/ mypy mcpgateway
365
365
366
366
bandit : # # 🛡️ bandit security scan
367
- bandit -r mcpgateway
367
+ @ $( VENV_DIR ) /bin/ bandit -r mcpgateway
368
368
369
369
pydocstyle : # # 📚 Docstring style
370
- pydocstyle mcpgateway
370
+ @ $( VENV_DIR ) /bin/ pydocstyle mcpgateway
371
371
372
372
pycodestyle : # # 📝 Simple PEP-8 checker
373
- pycodestyle mcpgateway --max-line-length=200
373
+ @ $( VENV_DIR ) /bin/ pycodestyle mcpgateway --max-line-length=200
374
374
375
375
pre-commit : # # 🪄 Run pre-commit hooks
376
- pre-commit run --all-files --show-diff-on-failure
376
+ @ $( VENV_DIR ) /bin/ pre-commit run --all-files --show-diff-on-failure
377
377
378
378
ruff : # # ⚡ Ruff lint + format
379
- ruff check mcpgateway && ruff format mcpgateway mcpgateway-wrapper tests
379
+ @ $( VENV_DIR ) /bin/ ruff check mcpgateway && $( VENV_DIR ) /bin/ ruff format mcpgateway mcpgateway-wrapper tests
380
380
381
381
ty : # # ⚡ Ty type checker
382
- ty check mcpgateway mcpgateway-wrapper tests
382
+ @ $( VENV_DIR ) /bin/ ty check mcpgateway mcpgateway-wrapper tests
383
383
384
384
pyright : # # 🏷️ Pyright type-checking
385
- pyright mcpgateway mcpgateway-wrapper tests
385
+ @ $( VENV_DIR ) /bin/ pyright mcpgateway mcpgateway-wrapper tests
386
386
387
387
radon : # # 📈 Complexity / MI metrics
388
- radon mi -s mcpgateway mcpgateway-wrapper tests && \
389
- radon cc -s mcpgateway mcpgateway-wrapper tests && \
390
- radon hal mcpgateway mcpgateway-wrapper tests && \
391
- radon raw -s mcpgateway mcpgateway-wrapper tests
388
+ @ $( VENV_DIR ) /bin/ radon mi -s mcpgateway mcpgateway-wrapper tests && \
389
+ $( VENV_DIR ) /bin/ radon cc -s mcpgateway mcpgateway-wrapper tests && \
390
+ $( VENV_DIR ) /bin/ radon hal mcpgateway mcpgateway-wrapper tests && \
391
+ $( VENV_DIR ) /bin/ radon raw -s mcpgateway mcpgateway-wrapper tests
392
392
393
393
pyroma : # # 📦 Packaging metadata check
394
- pyroma -d .
394
+ @ $( VENV_DIR ) /bin/ pyroma -d .
395
395
396
396
importchecker : # # 🧐 Orphaned import detector
397
- importchecker .
397
+ @ $( VENV_DIR ) /bin/ importchecker .
398
398
399
399
spellcheck : # # 🔤 Spell-check
400
- pyspelling || true
400
+ @ $( VENV_DIR ) /bin/ pyspelling || true
401
401
402
402
fawltydeps : # # 🏗️ Dependency sanity
403
- fawltydeps --detailed --exclude ' docs/**' . || true
403
+ @ $( VENV_DIR ) /bin/ fawltydeps --detailed --exclude ' docs/**' . || true
404
404
405
405
wily : # # 📈 Maintainability report
406
406
@git stash --quiet
@@ -409,7 +409,7 @@ wily: ## 📈 Maintainability report
409
409
@git stash pop --quiet
410
410
411
411
pyre : # # 🧠 Facebook Pyre analysis
412
- pyre
412
+ @ $( VENV_DIR ) /bin/ pyre
413
413
414
414
depend : # # 📦 List dependencies
415
415
pdm list --freeze
@@ -445,11 +445,11 @@ sbom: ## 🛡️ Generate SBOM & security report
445
445
446
446
pytype : # # 🧠 Pytype static type analysis
447
447
@echo " 🧠 Pytype analysis…"
448
- pytype -V 3.12 -j auto mcpgateway mcpgateway-wrapper tests
448
+ @ $( VENV_DIR ) /bin/ pytype -V 3.12 -j auto mcpgateway mcpgateway-wrapper tests
449
449
450
450
check-manifest : # # 📦 Verify MANIFEST.in completeness
451
451
@echo " 📦 Verifying MANIFEST.in completeness…"
452
- check-manifest
452
+ @ $( VENV_DIR ) /bin/ check-manifest
453
453
454
454
# -----------------------------------------------------------------------------
455
455
# 📑 YAML / JSON / TOML LINTERS
@@ -467,7 +467,7 @@ LINTERS += yamllint jsonlint tomllint
467
467
yamllint : # # 📑 YAML linting
468
468
@command -v yamllint > /dev/null 2>&1 || { \
469
469
echo ' ❌ yamllint not installed ➜ pip install yamllint' ; exit 1; }
470
- @echo ' 📑 yamllint …' && yamllint -c .yamllint .
470
+ @echo ' 📑 yamllint …' && $( VENV_DIR ) /bin/ yamllint -c .yamllint .
471
471
472
472
jsonlint : # # 📑 JSON validation (jq)
473
473
@command -v jq > /dev/null 2>&1 || { \
@@ -482,7 +482,7 @@ tomllint: ## 📑 TOML validation (tomlcheck)
482
482
echo ' ❌ tomlcheck not installed ➜ pip install tomlcheck' ; exit 1; }
483
483
@echo ' 📑 tomllint (tomlcheck) …'
484
484
@find . -type f -name ' *.toml' -print0 \
485
- | xargs -0 -I{} tomlcheck " {}"
485
+ | xargs -0 -I{} $( VENV_DIR ) /bin/ tomlcheck " {}"
486
486
487
487
# =============================================================================
488
488
# 🕸️ WEBPAGE LINTERS & STATIC ANALYSIS
0 commit comments