-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (47 loc) · 1.49 KB
/
Makefile
File metadata and controls
62 lines (47 loc) · 1.49 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
.PHONY: setup sync clean test lint update-lock local-dev first-time-setup dev-setup sync-all first-time-local-setup
# Environment variable for local SDK path (optional)
SOCKET_SDK_PATH ?= ../socketdev
# Environment variable to control local development mode
USE_LOCAL_SDK ?= false
# === High-level workflow targets ===
# First-time repo setup after cloning (using PyPI packages)
first-time-setup: clean setup
# First-time setup for local development (using local SDK)
first-time-local-setup:
$(MAKE) clean
$(MAKE) USE_LOCAL_SDK=true dev-setup
# Update lock file after changing pyproject.toml
update-lock:
uv lock
# Setup for local development
dev-setup: clean local-dev setup
# Sync all dependencies after pulling changes
sync-all: sync
# === Implementation targets ===
# Installs dependencies needed for local development
# Currently: socketdev from test PyPI or local path
local-dev:
ifeq ($(USE_LOCAL_SDK),true)
uv add --editable $(SOCKET_SDK_PATH)
endif
# Creates virtual environment and installs dependencies from uv.lock
setup: update-lock
uv sync --all-extras
ifeq ($(USE_LOCAL_SDK),true)
uv add --editable $(SOCKET_SDK_PATH)
endif
# Installs exact versions from uv.lock into your virtual environment
sync:
uv sync --all-extras
ifeq ($(USE_LOCAL_SDK),true)
uv add --editable $(SOCKET_SDK_PATH)
endif
# Removes virtual environment and cache files
clean:
rm -rf .venv
find . -type d -name "__pycache__" -exec rm -rf {} +
test:
uv run pytest
lint:
uv run ruff check .
uv run ruff format --check .