docs: improve CLI dev workflow and prioritize Node.js installation (#4579)

This commit is contained in:
Saket Aryan
2026-03-28 06:20:03 +05:30
committed by GitHub
parent 3225e30859
commit 13d42a99e9
8 changed files with 118 additions and 61 deletions
+30 -17
View File
@@ -1,30 +1,43 @@
.PHONY: install dev lint format test build clean publish publish-test
VENV := .venv
PYTHON := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
install:
pip install -e .
.PHONY: install dev lint format test build clean publish publish-test shell
dev:
pip install -e ".[dev]"
$(VENV)/bin/activate:
python3 -m venv $(VENV)
$(PIP) install -U pip
lint:
ruff check .
ruff format --check .
install: $(VENV)/bin/activate
$(PIP) install -e .
format:
ruff check --fix .
ruff format .
dev: $(VENV)/bin/activate
$(PIP) install -e ".[dev]"
test:
pytest
lint: dev
$(VENV)/bin/ruff check .
$(VENV)/bin/ruff format --check .
build: clean
hatch build
format: dev
$(VENV)/bin/ruff check --fix .
$(VENV)/bin/ruff format .
test: dev
$(VENV)/bin/pytest
build: clean $(VENV)/bin/activate
$(PIP) install hatch
$(VENV)/bin/hatch build
clean:
rm -rf dist/
publish: build
hatch publish
$(VENV)/bin/hatch publish
publish-test: build
hatch publish --repo test
$(VENV)/bin/hatch publish --repo test
shell: $(VENV)/bin/activate
@echo "Spawning a new shell with the virtual environment activated..."
@VIRTUAL_ENV=$(CURDIR)/$(VENV) PATH=$(CURDIR)/$(VENV)/bin:$$PATH exec $(SHELL)