Skip to content

Commit fb2a864

Browse files
author
Johan Broberg
committed
Refactor dependency management and add verification script
- Updated setup.py to enforce exact version matching for internal dependencies. - Enhanced pyproject.toml with new workspace extensions and centralized version constraints for external dependencies. - Introduced a new script (verify_constraints.py) to ensure proper configuration of version constraints across packages. - Modified uv.lock to reflect updated dependency specifications and removed version constraints from package metadata.
1 parent 56e2831 commit fb2a864

File tree

33 files changed

+2546
-357
lines changed

33 files changed

+2546
-357
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ jobs:
105105

106106
- name: Install the project
107107
run: uv lock && uv sync --locked --all-extras --dev
108-
108+
109+
- name: Verify centralized version constraints
110+
run: python scripts/verify_constraints.py
111+
109112
- name: Check linting
110113
run: |
111114
uv run --frozen ruff check . --preview

CLAUDE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,31 @@ libraries/
136136
- MCP (Model Context Protocol) integration
137137
- Framework-specific adapters for tool execution
138138

139+
### Centralized Dependency Version Management
140+
141+
This monorepo uses uv's `constraint-dependencies` feature to centralize version constraints:
142+
143+
**How it works:**
144+
1. **Root pyproject.toml** defines version constraints for all external packages
145+
2. **Package pyproject.toml** files declare dependencies by name only (no version)
146+
3. **uv** applies root constraints during dependency resolution
147+
148+
**Adding a new dependency:**
149+
1. Add the package name to your package's `dependencies` array
150+
2. Add the version constraint to root `pyproject.toml` `constraint-dependencies`
151+
3. Run `uv lock && uv sync`
152+
153+
**Updating a dependency version:**
154+
1. Edit the constraint in root `pyproject.toml` only
155+
2. Run `uv lock && uv sync`
156+
3. All packages automatically use the new version
157+
158+
**Important:** Internal workspace dependencies (e.g., `microsoft-agents-a365-runtime >= 0.0.0`)
159+
keep their version specifiers - these are build-time placeholders, not actual constraints.
160+
161+
**CI Enforcement:** The `scripts/verify_constraints.py` script runs in CI to prevent
162+
accidental reintroduction of version constraints in package files.
163+
139164
### Test Organization
140165

141166
Tests mirror the library structure:

0 commit comments

Comments
 (0)