Skip to content

Commit fe9cb84

Browse files
drernieclaude
andauthored
feat: Consolidate scripts folder (#183)
## Summary Consolidates scattered scripts into a unified, organized structure as specified in [#173-consolidate-scripts-folder.md](./spec/173-consolidate-scripts-folder.md). ### Changes Made - **Moved `bin/*` scripts to `./scripts`**: Unified all executable scripts under single directory - **Renamed `scripts/test` → `scripts/tests`**: Consistent with rest of project naming conventions - **Updated all references**: Fixed paths in Makefiles, documentation, and test files - **Fixed broken test paths**: Scripts tests now work with consolidated structure ### Files Consolidation **Before:** ``` bin/ ├── check-dev.sh ├── common.sh ├── mcp-test.py ├── release.sh ├── test-prereqs.sh └── version.sh scripts/ ├── coverage_analysis.py ├── generate_canonical_tools.py ├── test/ └── version-utils.py ``` **After:** ``` scripts/ ├── check-dev.sh ├── common.sh ├── coverage_analysis.py ├── generate_canonical_tools.py ├── mcp-test.py ├── release.sh ├── test-prereqs.sh ├── tests/ # ← renamed from 'test' ├── version.sh └── version-utils.py ``` ### Test Results - ✅ `make python-dist` - Works with updated script references - ✅ `make test-scripts` - Finds tests in new `scripts/tests/` location - ✅ Script path tests fixed - No more `FileNotFoundError` for release.sh ### Benefits 1. **Improved discoverability** - All scripts in one logical location 2. **Consistent organization** - Matches project conventions (`tests/` not `test/`) 3. **Reduced confusion** - No more wondering whether to check `bin/` or `scripts/` 4. **Better maintainability** - Single location for script updates 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <[email protected]>
1 parent b0ebe9b commit fe9cb84

26 files changed

+311
-1054
lines changed

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ The following permissions are granted for this repository:
407407
- Workflow orchestration APIs reject blank workflow IDs; trim identifiers in tests when constructing fixtures to avoid silent acceptance.
408408

409409
### 2025-09-20 uv packaging notes
410-
- DXT packaging currently runs through `make.deploy` using `uv pip install`; the UV PyPI build flow lives in `bin/release.sh python-dist` with `make python-dist`, mirroring how `make dxt` exposes DXT packaging.
411-
- `python-dist` builds local artifacts without credentials. `bin/release.sh python-publish` (via `make python-publish`) requires either `UV_PUBLISH_TOKEN` or `UV_PUBLISH_USERNAME`/`UV_PUBLISH_PASSWORD`, defaults to TestPyPI (`PYPI_PUBLISH_URL`/`PYPI_REPOSITORY_URL` override), and respects `DIST_DIR`.
410+
- DXT packaging currently runs through `make.deploy` using `uv pip install`; the UV PyPI build flow lives in `scripts/release.sh python-dist` with `make python-dist`, mirroring how `make dxt` exposes DXT packaging.
411+
- `python-dist` builds local artifacts without credentials. `scripts/release.sh python-publish` (via `make python-publish`) requires either `UV_PUBLISH_TOKEN` or `UV_PUBLISH_USERNAME`/`UV_PUBLISH_PASSWORD`, defaults to TestPyPI (`PYPI_PUBLISH_URL`/`PYPI_REPOSITORY_URL` override), and respects `DIST_DIR`.
412412
- GitHub Actions builds dist artifacts via `python-dist`, publishes them with `pypa/gh-action-pypi-publish`, then runs `make dxt`, `make dxt-validate`, and `make release-zip` to keep DXT parity. Secrets supply the PyPI/TestPyPI token (`secrets.PYPI_TOKEN`).
413413

414414
## important-instruction-reminders

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ config-claude:
9595

9696
# Version Management Targets
9797
bump-patch:
98-
@bin/release.sh bump patch
98+
@scripts/release.sh bump patch
9999

100100
bump-minor:
101-
@bin/release.sh bump minor
101+
@scripts/release.sh bump minor
102102

103103
bump-major:
104-
@bin/release.sh bump major
104+
@scripts/release.sh bump major
105105

106106
# Combined Release Targets (bump + commit + tag)
107107
release-patch: bump-patch
@@ -111,7 +111,7 @@ release-patch: bump-patch
111111
git commit -m "bump: patch version to $$VERSION"; \
112112
echo "✅ Committed version bump to $$VERSION"
113113
@echo "🏷️ Creating release tag..."
114-
@bin/release.sh release
114+
@scripts/release.sh release
115115

116116
release-minor: bump-minor
117117
@echo "🔍 Committing minor version bump..."
@@ -120,7 +120,7 @@ release-minor: bump-minor
120120
git commit -m "bump: minor version to $$VERSION"; \
121121
echo "✅ Committed version bump to $$VERSION"
122122
@echo "🏷️ Creating release tag..."
123-
@bin/release.sh release
123+
@scripts/release.sh release
124124

125125
release-major: bump-major
126126
@echo "🔍 Committing major version bump..."
@@ -129,4 +129,4 @@ release-major: bump-major
129129
git commit -m "bump: major version to $$VERSION"; \
130130
echo "✅ Committed version bump to $$VERSION"
131131
@echo "🏷️ Creating release tag..."
132-
@bin/release.sh release
132+
@scripts/release.sh release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ SERVER_PID=$!
4545

4646
# 4. Verify that it works
4747
sleep 8
48-
bin/mcp-test.py http://127.0.0.1:8000/mcp/
48+
scripts/mcp-test.py http://127.0.0.1:8000/mcp/
4949
kill $SERVER_PID
5050
```
5151

bin/version.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

extract_tools.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

make.deploy

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DIST_DIR := dist
1111
# Variables
1212
DXT_NAME := quilt-mcp
1313
# Allow VERSION to be overridden from command line, otherwise read from pyproject.toml
14-
MANIFEST_VERSION := $(shell python3 scripts/version-utils.py get-version 2>/dev/null || echo "dev")
14+
MANIFEST_VERSION := $(shell python3 scripts/version.py get-version 2>/dev/null || echo "dev")
1515
PACKAGE_VERSION := $(if $(VERSION),$(VERSION),$(MANIFEST_VERSION))
1616
PACKAGE_ID := $(DIST_DIR)/$(DXT_NAME)-$(PACKAGE_VERSION)
1717
DXT_PACKAGE := $(PACKAGE_ID).dxt
@@ -47,7 +47,6 @@ $(ASSETS_MARKER): $(ASSET_FILES)
4747
@mkdir -p $(BUILD_DIR)
4848
@cp -r $(ASSETS_DIR)/* $(BUILD_DIR)/
4949
@if [ -f "$(BUILD_DIR)/check-dxt.sh" ]; then chmod +x $(BUILD_DIR)/check-dxt.sh; fi
50-
@if [ -f "$(BUILD_DIR)/check-prereqs.sh" ]; then chmod +x $(BUILD_DIR)/check-prereqs.sh; fi
5150
@echo "Generating manifest.json from template..."
5251
@sed 's/{{ version }}/$(PACKAGE_VERSION)/g' $(BUILD_DIR)/manifest.json.j2 > $(BUILD_DIR)/manifest.json
5352
@rm $(BUILD_DIR)/manifest.json.j2
@@ -96,7 +95,7 @@ python-dist: check-tools
9695
@echo "✅ Python packaging complete"
9796

9897
python-publish:
99-
@./bin/release.sh python-publish
98+
@./scripts/release.sh python-publish
10099

101100
# DXT Package Validation
102101
dxt-validate: check-tools dxt
@@ -126,18 +125,18 @@ release-tag:
126125
@echo "Creating release tag..."
127126
@if [ "${DRY_RUN}" = "1" ]; then \
128127
echo "🔍 DRY RUN: Would create release tag"; \
129-
./bin/release.sh release --dry-run; \
128+
./scripts/release.sh release --dry-run; \
130129
else \
131-
./bin/release.sh release; \
130+
./scripts/release.sh release; \
132131
fi
133132

134133
release-dev-tag:
135134
@echo "Creating development tag..."
136135
@if [ "${DRY_RUN}" = "1" ]; then \
137136
echo "🔍 DRY RUN: Would create development tag"; \
138-
./bin/release.sh dev --dry-run; \
137+
./scripts/release.sh dev --dry-run; \
139138
else \
140-
./bin/release.sh dev; \
139+
./scripts/release.sh dev; \
141140
fi
142141

143142
# Cleanup Targets

make.dev

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ coverage-html:
7979
@echo "✅ HTML coverage report generated in htmlcov/"
8080
@echo "📊 Open htmlcov/index.html in your browser to view the report"
8181

82-
test-scripts: scripts/test/test_*.py | $(RESULTS_DIR)
82+
test-scripts: scripts/tests/test_*.py | $(RESULTS_DIR)
8383
@echo "Running script tests (coverage analysis, workflow behavior)..."
8484
@uv sync --group test
85-
@if [ -d "scripts/test" ] && [ "$$(find scripts/test -name "*.py" | wc -l)" -gt 0 ]; then \
86-
export PYTHONPATH="src" && uv run python -m pytest scripts/test/ -v; \
85+
@if [ -d "scripts/tests" ] && [ "$$(find scripts/tests -name "*.py" | wc -l)" -gt 0 ]; then \
86+
export PYTHONPATH="src" && uv run python -m pytest scripts/tests/ -v; \
8787
else \
8888
echo "No script tests found"; \
8989
fi
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)