-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
111 lines (80 loc) · 4.07 KB
/
Copy pathMakefile
File metadata and controls
111 lines (80 loc) · 4.07 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# streamlit-coco — local development
UV ?= uv
# Always include [dev] so cortex-code-agent-sdk is available for demos/tests.
PYTHON ?= $(UV) run --extra dev
E2E_PYTHON ?= $(UV) run --extra e2e
STREAMLIT = $(PYTHON) python -m streamlit run
EXAMPLE ?= examples/chat_app.py
.DEFAULT_GOAL := help
.PHONY: help install sync test lint format check audit e2e-install e2e test-all \
run chat approval structured headless backlog cwd-upload e2e-harness \
bi-semantic tableau-semantic app-builder \
build publish sync-release clean adoption-stats
# Public release clone (override: make sync-release RELEASE_REPO=/path/to/streamlit-coco)
# Temporary: personal repo until DevoteamSP is validated on PyPI (see doc/deployment/publish.md).
RELEASE_REPO ?= $(abspath $(CURDIR)/../streamlit-coco)
RELEASE_REMOTE ?= https://github.com/lletourmy/streamlit-coco.git
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
install: ## Install package + [dev] extras (editable via uv)
$(UV) sync --extra dev
sync: install ## Alias for install
test: ## Run unit/smoke pytest (excludes browser e2e)
$(PYTHON) pytest tests/ --ignore=tests/e2e -v
lint: ## Lint with ruff
$(PYTHON) ruff check .
format: ## Format with ruff
$(PYTHON) ruff format .
$(PYTHON) ruff check --fix .
audit: ## Dependency vulnerability scan (pip-audit)
$(PYTHON) pip-audit --skip-editable
check: lint test ## Lint then unit tests
e2e-install: ## Install [e2e] extra + Chromium for Playwright
$(UV) sync --extra e2e
$(E2E_PYTHON) playwright install chromium
e2e: ## Run Playwright UX e2e against examples/e2e_ux_harness.py
$(E2E_PYTHON) pytest tests/e2e -m e2e -v
test-all: check e2e audit ## Full automated gate: lint + unit + e2e + audit
run: ## Run EXAMPLE (default: examples/chat_app.py)
$(STREAMLIT) $(EXAMPLE)
chat: ## Run examples/chat_app.py
$(STREAMLIT) examples/chat_app.py
approval: ## Run examples/approval_gate.py
$(STREAMLIT) examples/approval_gate.py
structured: ## Run examples/structured_output.py
$(STREAMLIT) examples/structured_output.py
headless: ## Run examples/headless_pipeline.py
$(PYTHON) examples/headless_pipeline.py
backlog: ## Run Product Backlog Desk demo (examples/backlog_desk)
cd examples/backlog_desk && $(UV) run --project ../.. python -m streamlit run streamlit_app.py
cwd-upload: ## Run examples/cwd_upload_chat.py (upload into cwd)
$(STREAMLIT) examples/cwd_upload_chat.py
bi-semantic: ## Run BI → Semantic (Tableau / Power BI, repo streamlit-coco)
cd examples/bi_to_semantic && $(UV) run --project ../.. --extra dev --with 'streamlit-extras>=1.3.0' --with 'pbixray>=0.15.4' python -m streamlit run app.py
tableau-semantic: bi-semantic ## Deprecated alias for bi-semantic
app-builder: ## Run App Builder (type library → brief → Copilot / Preview)
cd examples/app_builder && $(UV) run --project ../.. --extra dev --with 'streamlit-extras>=1.3.0' python -m streamlit run app.py
e2e-harness: ## Run CoCo-free UX harness used by Playwright
$(STREAMLIT) examples/e2e_ux_harness.py
# Adoption metrics (PyPI + GitHub traffic). FORCE=1 overwrites today; UPDATE_ROADMAP=1 refreshes Current KPIs.
ADOPTION_STATS_FLAGS =
ifneq ($(FORCE),)
ADOPTION_STATS_FLAGS += --force
endif
ifneq ($(UPDATE_ROADMAP),)
ADOPTION_STATS_FLAGS += --update-roadmap
endif
adoption-stats: ## Collect PyPI + GitHub traffic into doc-dev/metrics/
$(PYTHON) python scripts/collect_adoption_stats.py $(ADOPTION_STATS_FLAGS)
build: ## Build sdist + wheel into dist/
$(UV) build
publish: build ## Upload dist/ to PyPI (prefer tagging streamlit-coco; see doc/deployment/publish.md)
$(UV) publish
sync-release: ## Sync release tree → ../streamlit-coco (DRY_RUN=1 / COMMIT=1 / PUSH=1)
RELEASE_REPO="$(RELEASE_REPO)" RELEASE_REMOTE="$(RELEASE_REMOTE)" \
DRY_RUN="$(DRY_RUN)" COMMIT="$(COMMIT)" PUSH="$(PUSH)" MESSAGE="$(MESSAGE)" \
bash scripts/sync_release.sh
clean: ## Remove caches and build artifacts
rm -rf dist/ build/ *.egg-info .pytest_cache .ruff_cache
find . -type d -name __pycache__ -not -path './.venv/*' -exec rm -rf {} +