-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJustfile
More file actions
60 lines (52 loc) · 1.4 KB
/
Justfile
File metadata and controls
60 lines (52 loc) · 1.4 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
# Justfile for Python project management
# list of commands
help:
@just -l
# Sync all packages
sync:
@echo "Syncing dependencies..."
@uv sync --all-groups --all-extras
# Format code with ruff and isort
format:
@echo "Formatting code with ruff..."
@ruff format yaicli
@ruff check --fix yaicli
@ruff format tests
@ruff check --fix tests
@echo "Formatting code with isort..."
@isort yaicli yaicli
@isort yaicli tests
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
@rm -rf build/ dist/ *.egg-info/
@echo "Cleaning cache files..."
@find . -type d -name "__pycache__" -exec rm -rf {} +
@echo "Cleaning test artifacts..."
@rm -rf .pytest_cache/
@echo "Cleaning pdm build artifacts..."
@rm -rf .pdm_build/
@echo "Cleaning ruff cache..."
@rm -rf .ruff_cache/
# Run tests with pytest
test:
@echo "Running tests..."
@uv run pytest
# Build package with hatch (runs clean first)
build:
@echo "Building package..."
@rm -rf dist/
@uv build
# Publish package to PyPI
publish: build
@echo "Publishing package..."
@uv-publish
# Install package in editable mode by uv
install:
@echo "Installing packages..."
@uv sync --all-groups --all-extras
# Lock uv file and generate changelog from git log
changelog:
@echo "Lock and Generating changelog..."
@uv lock
@git cliff -l --prepend CHANGELOG.md