Skip to content

Commit 7be8625

Browse files
committed
Add Makefile and run make all
1 parent b5e774b commit 7be8625

3 files changed

Lines changed: 33 additions & 3 deletions

File tree

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Makefile for pygins project
2+
3+
.PHONY: test format sort lint security-check all
4+
5+
# Run all quality checks
6+
all: test format sort lint security-check
7+
8+
# Run tests using pytest
9+
test:
10+
poetry run pytest
11+
12+
# Format code using black
13+
format:
14+
poetry run black .
15+
16+
# Sort imports using isort
17+
sort:
18+
poetry run isort .
19+
20+
# Lint code using ruff
21+
lint:
22+
poetry run ruff check .
23+
24+
# Check for vulnerable dependencies using pip-audit
25+
security-check:
26+
poetry run pip-audit
27+

l9format/l9format.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import decimal
2+
23
from serde import Model, fields
34

5+
46
# Import from https://github.com/rossmacarthur/serde/commit/304884bca3c80e8b9a22a054b64dd94e3324b593#diff-dd2f65f16516311f0183377201a3d0b7894438787da732fc2bbc9c28cbde9fb8
57
# A helper function...
68
def round_decimal(

tests/test_l9format.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from l9format import l9format
2-
from pathlib import Path
3-
import os
41
import json
2+
import os
3+
from pathlib import Path
4+
5+
from l9format import l9format
56

67
TESTS_DIR = Path(os.path.dirname(__file__))
78

0 commit comments

Comments
 (0)