-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
71 lines (54 loc) · 1.93 KB
/
justfile
File metadata and controls
71 lines (54 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Justfile for pydantic-ocsf
# Run 'just --list' to see all available commands
# Default recipe - show available commands
default:
@just --list
# Install development dependencies
install:
uv sync --extra dev
# Install all dependencies including generator
install-all:
uv sync --all-extras
# Run all checks (format check, lint, type check, tests)
check: lint format-check typecheck test
# Run tests with coverage
test python="3.12":
uv run --python {{python}} pytest tests/ -v --cov=ocsf --cov-report=xml --cov-report=term
# Run tests with verbose output
test-verbose python="3.12":
uv run --python {{python}} pytest tests/ -vv --cov=ocsf --cov-report=xml --cov-report=term
# Check code formatting without making changes
format-check python="3.12":
uv run --python {{python}} ruff format --check src/ tests/ scripts/
# Format code (fix formatting issues)
format python="3.12":
uv run --python {{python}} ruff format src/ tests/ scripts/
# Lint code with ruff
lint:
uv run --python 3.12 ruff check src/ tests/ scripts/
# Lint and auto-fix issues where possible
lint-fix:
uv run --python 3.12 ruff check --fix src/ tests/ scripts/
# Type check with mypy
typecheck:
uv run --python 3.12 mypy src/ocsf/ scripts/ --ignore-missing-imports
# Download OCSF schemas (v1.7.0)
download-schemas:
uv run scripts/download_schemas.py
# Regenerate type stub files from schemas
regenerate-stubs:
uv run scripts/regenerate_stubs.py
# Download schemas and regenerate stubs (full rebuild)
rebuild: download-schemas regenerate-stubs
# Clean build artifacts and caches
clean:
rm -rf build/ dist/ *.egg-info
rm -rf .pytest_cache .mypy_cache .ruff_cache
rm -rf htmlcov/ .coverage coverage.xml
find . -type d -name __pycache__ -exec rm -rf {} +
# Build distribution packages
build: install-all rebuild
hatch build
just format
# Run a quick development check (format, lint, test)
dev-check: format lint-fix test