Skip to content

Commit 5225375

Browse files
committed
Adjust Makefile to match to GitHub CI/CD (ish).
Signed-off-by: Jonathan Springer <[email protected]>
1 parent b074cb8 commit 5225375

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/lint.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
vulture mcpgateway --min-confidence 80
7171
7272
- id: pylint
73-
setup: pip install pylint pylint-pydantic
74-
cmd: pylint mcpgateway --errors-only --fail-under=10
73+
setup: true
74+
cmd: uv run pylint mcpgateway --fail-on E --fail-under=10
7575

7676
- id: interrogate
7777
setup: pip install interrogate
@@ -131,6 +131,11 @@ jobs:
131131
with:
132132
python-version: "3.12"
133133
cache: pip
134+
# -----------------------------------------------------------
135+
# Install uv
136+
# -----------------------------------------------------------
137+
- name: ⚡Set up uv
138+
uses: astral-sh/setup-uv@v6
134139

135140
# -----------------------------------------------------------
136141
# 2️⃣ Install Project + Dev Dependencies

Makefile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,27 @@ endef
103103
# 🌱 VIRTUAL ENVIRONMENT & INSTALLATION
104104
# =============================================================================
105105
# help: 🌱 VIRTUAL ENVIRONMENT & INSTALLATION
106+
# help: uv - Ensure uv is installed or install it if needed
106107
# help: venv - Create a fresh virtual environment with uv & friends
107108
# help: activate - Activate the virtual environment in the current shell
108109
# help: install - Install project into the venv
109110
# help: install-dev - Install project (incl. dev deps) into the venv
110111
# help: install-db - Install project (incl. postgres and redis) into venv
111112
# help: update - Update all installed deps inside the venv
113+
.PHONY: uv
114+
uv:
115+
@if ! type uv >/dev/null 2>&1; then \
116+
echo "🔧 'uv' not found - installing..."; \
117+
if type brew >/dev/null 2>&1; then \
118+
echo "🍺 Installing 'uv' via Homebrew..."; \
119+
brew install uv; \
120+
else \
121+
echo "🐍 Installing 'uv' via local install script..."; \
122+
curl -LsSf https://astral.sh/uv/install.sh | sh ; \
123+
echo "💡 Make sure to add 'uv' to your PATH if not done automatically."; \
124+
fi; \
125+
fi
126+
112127
.PHONY: venv
113128
venv:
114129
@rm -Rf "$(VENV_DIR)"
@@ -1010,8 +1025,9 @@ isort-check:
10101025
flake8: ## 🐍 flake8 checks
10111026
@echo "🐍 flake8 $(TARGET)..." && $(VENV_DIR)/bin/flake8 $(TARGET)
10121027

1013-
pylint: ## 🐛 pylint checks
1014-
@echo "🐛 pylint $(TARGET) (parallel)..." && $(VENV_DIR)/bin/pylint -j 8 $(TARGET)
1028+
pylint: uv ## 🐛 pylint checks
1029+
@echo "🐛 pylint $(TARGET) (parallel)..."
1030+
uv run pylint -j 0 --fail-on E --fail-under 10 $(TARGET)
10151031

10161032
markdownlint: ## 📖 Markdown linting
10171033
@# Install markdownlint-cli2 if not present

0 commit comments

Comments
 (0)