Skip to content

Commit 3ac93c6

Browse files
authored
Merge pull request #61 from eifrach/makefile
NO-ISSUE: adding a makefile to run locally
2 parents 73b6ac4 + f994586 commit 3ac93c6

File tree

7 files changed

+168
-1
lines changed

7 files changed

+168
-1
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ openshift/
66
nowflake_CSV/
77
**/*.pvc
88
__pycache__/
9+
**/.pytest_cache
10+
.coverage
11+
coverage.xml

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Run tests with coverage
4949
run: |
50-
uv add --dev pytest-cov
50+
uv sync --dev
5151
uv run pytest tests/ --cov=src --cov-report=xml --cov-report=term -v --tb=short
5252
5353
- name: Upload coverage to Codecov

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ Snowflake_CSV/
22
.venv/
33
**/*.pvc
44
__pycache__/
5+
**/.pytest_cache
6+
.coverage
7+
coverage.xml

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# note: on MacOS you need to install make via brew ( min version 4.0+)
2+
# brew install make
3+
.ONESHELL:
4+
5+
SHELL = /bin/bash
6+
CONTAINER_NAME = "localhost/jira-mcp-snowflake:latest"
7+
8+
uv_sync_dev:
9+
uv sync --dev
10+
11+
test: lint pytest
12+
13+
build:
14+
podman build -t $(CONTAINER_NAME) .
15+
16+
lint: uv_sync_dev
17+
uv run flake8 src/ --max-line-length=120 --ignore=E501,W503
18+
19+
pytest: uv_sync_dev
20+
uv run pytest tests/ --cov=src --cov-report=xml --cov-report=term -v --tb=short
21+

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,39 @@ uv sync
158158
uv run python src/mcp_server.py
159159
```
160160

161+
### Using Makefile Targets
162+
163+
For convenience, several Makefile targets are available to streamline development tasks:
164+
165+
#### Development Setup
166+
```bash
167+
# Install dependencies including dev packages
168+
make uv_sync_dev
169+
```
170+
171+
#### Testing and Quality Assurance
172+
```bash
173+
# Run linting (flake8)
174+
make lint
175+
176+
# Run tests with coverage
177+
make pytest
178+
179+
# Run both linting and tests
180+
make test
181+
```
182+
183+
#### Building
184+
```bash
185+
# Build container image with Podman
186+
make build
187+
```
188+
189+
**Note**: On macOS, you may need to install a newer version of make via Homebrew:
190+
```bash
191+
brew install make
192+
```
193+
161194
### Container Deployment
162195

163196
## Building locally

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ dev-dependencies = [
2626
"requests>=2.32.4",
2727
"pytest>=8.0.0",
2828
"pytest-asyncio>=0.23.0",
29+
"pytest-cov>=6.2.1",
2930
]

uv.lock

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)