diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..8d0f718b --- /dev/null +++ b/Makefile @@ -0,0 +1,166 @@ +# Python Package Release Makefile +# This Makefile provides convenient targets for bumping versions of all Python packages +# using bump2version. After running a target, remember to push: git push origin main + +.PHONY: help + +help: ## Show this help message + @echo "Python Package Release Automation" + @echo "" + @echo "Usage: make " + @echo "" + @echo "Available targets:" + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-25s %s\n", $$1, $$2}' + @echo "" + @echo "After bumping, push changes with: git push origin main" + +# Core package targets +bump-patch-core: ## Bump patch version of cua-core (0.1.8 → 0.1.9) + @echo "Bumping cua-core patch version..." + cd libs/python/core && bump2version patch + @echo "✓ Done! Now run: git push origin main" + +bump-minor-core: ## Bump minor version of cua-core (0.1.8 → 0.2.0) + @echo "Bumping cua-core minor version..." + cd libs/python/core && bump2version minor + @echo "✓ Done! Now run: git push origin main" + +bump-major-core: ## Bump major version of cua-core (0.1.8 → 1.0.0) + @echo "Bumping cua-core major version..." + cd libs/python/core && bump2version major + @echo "✓ Done! Now run: git push origin main" + +# Pylume package targets +bump-patch-pylume: ## Bump patch version of pylume (0.2.2 → 0.2.3) + @echo "Bumping pylume patch version..." + cd libs/python/pylume && bump2version patch + @echo "✓ Done! Now run: git push origin main" + +bump-minor-pylume: ## Bump minor version of pylume (0.2.2 → 0.3.0) + @echo "Bumping pylume minor version..." + cd libs/python/pylume && bump2version minor + @echo "✓ Done! Now run: git push origin main" + +bump-major-pylume: ## Bump major version of pylume (0.2.2 → 1.0.0) + @echo "Bumping pylume major version..." + cd libs/python/pylume && bump2version major + @echo "✓ Done! Now run: git push origin main" + +# Computer package targets +bump-patch-computer: ## Bump patch version of cua-computer (0.4.0 → 0.4.1) + @echo "Bumping cua-computer patch version..." + cd libs/python/computer && bump2version patch + @echo "✓ Done! Now run: git push origin main" + +bump-minor-computer: ## Bump minor version of cua-computer (0.4.0 → 0.5.0) + @echo "Bumping cua-computer minor version..." + cd libs/python/computer && bump2version minor + @echo "✓ Done! Now run: git push origin main" + +bump-major-computer: ## Bump major version of cua-computer (0.4.0 → 1.0.0) + @echo "Bumping cua-computer major version..." + cd libs/python/computer && bump2version major + @echo "✓ Done! Now run: git push origin main" + +# SOM package targets +bump-patch-som: ## Bump patch version of cua-som (0.1.0 → 0.1.1) + @echo "Bumping cua-som patch version..." + cd libs/python/som && bump2version patch + @echo "✓ Done! Now run: git push origin main" + +bump-minor-som: ## Bump minor version of cua-som (0.1.0 → 0.2.0) + @echo "Bumping cua-som minor version..." + cd libs/python/som && bump2version minor + @echo "✓ Done! Now run: git push origin main" + +bump-major-som: ## Bump major version of cua-som (0.1.0 → 1.0.0) + @echo "Bumping cua-som major version..." + cd libs/python/som && bump2version major + @echo "✓ Done! Now run: git push origin main" + +# Agent package targets +bump-patch-agent: ## Bump patch version of cua-agent (0.4.0 → 0.4.1) + @echo "Bumping cua-agent patch version..." + cd libs/python/agent && bump2version patch + @echo "✓ Done! Now run: git push origin main" + +bump-minor-agent: ## Bump minor version of cua-agent (0.4.0 → 0.5.0) + @echo "Bumping cua-agent minor version..." + cd libs/python/agent && bump2version minor + @echo "✓ Done! Now run: git push origin main" + +bump-major-agent: ## Bump major version of cua-agent (0.4.0 → 1.0.0) + @echo "Bumping cua-agent major version..." + cd libs/python/agent && bump2version major + @echo "✓ Done! Now run: git push origin main" + +# Computer Server package targets +bump-patch-computer-server: ## Bump patch version of cua-computer-server (0.1.0 → 0.1.1) + @echo "Bumping cua-computer-server patch version..." + cd libs/python/computer-server && bump2version patch + @echo "✓ Done! Now run: git push origin main" + +bump-minor-computer-server: ## Bump minor version of cua-computer-server (0.1.0 → 0.2.0) + @echo "Bumping cua-computer-server minor version..." + cd libs/python/computer-server && bump2version minor + @echo "✓ Done! Now run: git push origin main" + +bump-major-computer-server: ## Bump major version of cua-computer-server (0.1.0 → 1.0.0) + @echo "Bumping cua-computer-server major version..." + cd libs/python/computer-server && bump2version major + @echo "✓ Done! Now run: git push origin main" + +# MCP Server package targets +bump-patch-mcp-server: ## Bump patch version of cua-mcp-server (0.1.0 → 0.1.1) + @echo "Bumping cua-mcp-server patch version..." + cd libs/python/mcp-server && bump2version patch + @echo "✓ Done! Now run: git push origin main" + +bump-minor-mcp-server: ## Bump minor version of cua-mcp-server (0.1.0 → 0.2.0) + @echo "Bumping cua-mcp-server minor version..." + cd libs/python/mcp-server && bump2version minor + @echo "✓ Done! Now run: git push origin main" + +bump-major-mcp-server: ## Bump major version of cua-mcp-server (0.1.0 → 1.0.0) + @echo "Bumping cua-mcp-server major version..." + cd libs/python/mcp-server && bump2version major + @echo "✓ Done! Now run: git push origin main" + +# Convenience targets for common workflows +bump-all-patch: ## Bump patch version for ALL packages (use with caution!) + @echo "⚠️ Bumping patch version for ALL packages..." + @read -p "Are you sure? [y/N] " -n 1 -r; \ + echo; \ + if [[ $$REPLY =~ ^[Yy]$$ ]]; then \ + $(MAKE) bump-patch-core && \ + $(MAKE) bump-patch-pylume && \ + $(MAKE) bump-patch-computer && \ + $(MAKE) bump-patch-som && \ + $(MAKE) bump-patch-agent && \ + $(MAKE) bump-patch-computer-server && \ + $(MAKE) bump-patch-mcp-server; \ + fi + +# Dry run targets (test without making changes) +dry-run-patch-%: ## Dry run for patch version bump (e.g., make dry-run-patch-core) + @echo "Dry run: Bumping $* patch version..." + cd libs/python/$* && bump2version --dry-run --verbose patch + +dry-run-minor-%: ## Dry run for minor version bump (e.g., make dry-run-minor-core) + @echo "Dry run: Bumping $* minor version..." + cd libs/python/$* && bump2version --dry-run --verbose minor + +dry-run-major-%: ## Dry run for major version bump (e.g., make dry-run-major-core) + @echo "Dry run: Bumping $* major version..." + cd libs/python/$* && bump2version --dry-run --verbose major + +# Show current versions +show-versions: ## Show current versions of all packages + @echo "Current Python package versions:" + @echo " cua-core: $$(grep 'current_version' libs/python/core/.bumpversion.cfg | cut -d' ' -f3)" + @echo " pylume: $$(grep 'current_version' libs/python/pylume/.bumpversion.cfg | cut -d' ' -f3)" + @echo " cua-computer: $$(grep 'current_version' libs/python/computer/.bumpversion.cfg | cut -d' ' -f3)" + @echo " cua-som: $$(grep 'current_version' libs/python/som/.bumpversion.cfg | cut -d' ' -f3)" + @echo " cua-agent: $$(grep 'current_version' libs/python/agent/.bumpversion.cfg | cut -d' ' -f3)" + @echo " cua-computer-server: $$(grep 'current_version' libs/python/computer-server/.bumpversion.cfg | cut -d' ' -f3)" + @echo " cua-mcp-server: $$(grep 'current_version' libs/python/mcp-server/.bumpversion.cfg | cut -d' ' -f3)" diff --git a/README.md b/README.md index a73a9816..78954f99 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,73 @@ Some optional extras for this project depend on third-party packages that are li When you choose to install and use such optional extras, your use, modification, and distribution of those third-party components are governed by their respective licenses (e.g., AGPL-3.0 for `ultralytics`). +## Releasing Packages + +Cua uses `bump2version` to manage package versions across all Python modules. A Makefile is provided to simplify the release process. + +### Prerequisites + +#### install `bump2version` + +using brew +``` +brew install bumpversion +``` + + +### View Current Versions + +```bash +make show-versions +``` + +### Bump Package Versions + +To bump a specific package version: + +```bash +# Patch version bump (e.g., 0.1.8 → 0.1.9) +make bump-patch-core # cua-core +make bump-patch-pylume # pylume +make bump-patch-computer # cua-computer +make bump-patch-som # cua-som +make bump-patch-agent # cua-agent +make bump-patch-computer-server # cua-computer-server +make bump-patch-mcp-server # cua-mcp-server + +# Minor version bump (e.g., 0.1.8 → 0.2.0) +make bump-minor-core # Replace 'core' with any package name + +# Major version bump (e.g., 0.1.8 → 1.0.0) +make bump-major-core # Replace 'core' with any package name +``` + +### Dry Run (Test Before Bumping) + +To preview changes without modifying files: + +```bash +make dry-run-patch-core # Test patch bump for cua-core +make dry-run-minor-pylume # Test minor bump for pylume +make dry-run-major-agent # Test major bump for cua-agent +``` + +### Bump All Packages (Use with Caution) + +```bash +make bump-all-patch # Bumps patch version for ALL packages +``` + +### After Bumping + +After running any bump command, push your changes: + +```bash +git push origin main && git push origin --tags +``` + +For more details, run `make help` or see the [Makefile](./Makefile). + ## Contributing We welcome contributions to Cua! Please refer to our [Contributing Guidelines](CONTRIBUTING.md) for details. diff --git a/libs/python/agent/.bumpversion.cfg b/libs/python/agent/.bumpversion.cfg new file mode 100644 index 00000000..3d046f43 --- /dev/null +++ b/libs/python/agent/.bumpversion.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.4.32 +commit = True +tag = True +tag_name = agent-v{new_version} +message = Bump cua-agent to v{new_version} + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/libs/python/agent/pyproject.toml b/libs/python/agent/pyproject.toml index d8ee534b..902ac0fa 100644 --- a/libs/python/agent/pyproject.toml +++ b/libs/python/agent/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "pdm.backend" [project] name = "cua-agent" -version = "0.4.0" +version = "0.4.32" description = "CUA (Computer Use) Agent for AI-driven computer interaction" readme = "README.md" authors = [ diff --git a/libs/python/computer-server/.bumpversion.cfg b/libs/python/computer-server/.bumpversion.cfg new file mode 100644 index 00000000..831ffd2e --- /dev/null +++ b/libs/python/computer-server/.bumpversion.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.1.24 +commit = True +tag = True +tag_name = computer-server-v{new_version} +message = Bump cua-computer-server to v{new_version} + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/libs/python/computer-server/pyproject.toml b/libs/python/computer-server/pyproject.toml index 941f43c5..6468a48d 100644 --- a/libs/python/computer-server/pyproject.toml +++ b/libs/python/computer-server/pyproject.toml @@ -5,6 +5,7 @@ build-backend = "pdm.backend" [project] name = "cua-computer-server" version = "0.1.24" + description = "Server component for the Computer-Use Interface (CUI) framework powering Cua" authors = [ { name = "TryCua", email = "gh@trycua.com" } diff --git a/libs/python/computer/.bumpversion.cfg b/libs/python/computer/.bumpversion.cfg new file mode 100644 index 00000000..1cbb791b --- /dev/null +++ b/libs/python/computer/.bumpversion.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.4.7 +commit = True +tag = True +tag_name = computer-v{new_version} +message = Bump cua-computer to v{new_version} + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/libs/python/core/.bumpversion.cfg b/libs/python/core/.bumpversion.cfg new file mode 100644 index 00000000..917e4cc8 --- /dev/null +++ b/libs/python/core/.bumpversion.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.1.9 +commit = True +tag = True +tag_name = core-v{new_version} +message = Bump cua-core to v{new_version} + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/libs/python/core/pyproject.toml b/libs/python/core/pyproject.toml index b9692162..c4bcd459 100644 --- a/libs/python/core/pyproject.toml +++ b/libs/python/core/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "pdm.backend" [project] name = "cua-core" -version = "0.1.8" +version = "0.1.9" description = "Core functionality for Cua including telemetry and shared utilities" readme = "README.md" authors = [ diff --git a/libs/python/mcp-server/.bumpversion.cfg b/libs/python/mcp-server/.bumpversion.cfg new file mode 100644 index 00000000..abe0f5e2 --- /dev/null +++ b/libs/python/mcp-server/.bumpversion.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.1.13 +commit = True +tag = True +tag_name = mcp-server-v{new_version} +message = Bump cua-mcp-server to v{new_version} + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/libs/python/mcp-server/pyproject.toml b/libs/python/mcp-server/pyproject.toml index f80a1b6b..ff4b5986 100644 --- a/libs/python/mcp-server/pyproject.toml +++ b/libs/python/mcp-server/pyproject.toml @@ -7,7 +7,7 @@ name = "cua-mcp-server" description = "MCP Server for Computer-Use Agent (CUA)" readme = "README.md" requires-python = ">=3.11" -version = "0.1.0" +version = "0.1.13" authors = [ {name = "TryCua", email = "gh@trycua.com"} ] diff --git a/libs/python/pylume/.bumpversion.cfg b/libs/python/pylume/.bumpversion.cfg new file mode 100644 index 00000000..4a316b37 --- /dev/null +++ b/libs/python/pylume/.bumpversion.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.2.1 +commit = True +tag = True +tag_name = pylume-v{new_version} +message = Bump pylume to v{new_version} + +[bumpversion:file:pylume/__init__.py] +search = __version__ = "{current_version}" +replace = __version__ = "{new_version}" diff --git a/libs/python/pylume/pylume/__init__.py b/libs/python/pylume/pylume/__init__.py index 5b3818ef..adfb15d9 100644 --- a/libs/python/pylume/pylume/__init__.py +++ b/libs/python/pylume/pylume/__init__.py @@ -35,7 +35,7 @@ from .models import ( # Import main class last to avoid circular imports from .pylume import PyLume -__version__ = "0.2.2" +__version__ = "0.2.1" __all__ = [ "PyLume", diff --git a/libs/python/som/.bumpversion.cfg b/libs/python/som/.bumpversion.cfg new file mode 100644 index 00000000..232fe9f9 --- /dev/null +++ b/libs/python/som/.bumpversion.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.1.3 +commit = True +tag = True +tag_name = som-v{new_version} +message = Bump cua-som to v{new_version} + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/libs/python/som/pyproject.toml b/libs/python/som/pyproject.toml index 10b29ff8..f871eb18 100644 --- a/libs/python/som/pyproject.toml +++ b/libs/python/som/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "pdm.backend" [project] name = "cua-som" -version = "0.1.0" +version = "0.1.3" description = "Computer Vision and OCR library for detecting and analyzing UI elements" authors = [ { name = "TryCua", email = "gh@trycua.com" }