From 576c69807c442d34105fb2e452ad084a615e3446 Mon Sep 17 00:00:00 2001 From: Tim Li Date: Thu, 31 Jul 2025 14:25:22 -0700 Subject: [PATCH 1/2] change dependency management in favor of pyproject.toml and uv --- README.md | 22 +++++++++++++++++----- pyproject.toml | 6 +++--- requirements.txt | 15 --------------- 3 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 requirements.txt diff --git a/README.md b/README.md index 1ebe7ef..f22ddc8 100644 --- a/README.md +++ b/README.md @@ -22,15 +22,27 @@ cd cadence-python-client ### Setup -1. **Create virtual environment:** +1. **Install uv (recommended):** ```bash - python3 -m venv venv - source venv/bin/activate # Windows: venv\Scripts\activate + # macOS + brew install uv + + # Linux/Other + curl -LsSf https://astral.sh/uv/install.sh | sh + source $HOME/.local/bin/env # Add to your shell profile for persistence ``` -2. **Install dependencies:** +2. **Create virtual environment and install dependencies:** ```bash - pip install -r requirements.txt + uv venv + uv pip install -e ".[dev]" + ``` + + Or if you prefer traditional pip: + ```bash + python3.11 -m venv venv + source venv/bin/activate # Windows: venv\Scripts\activate + pip install -e ".[dev]" ``` ### Generate Protobuf Files diff --git a/pyproject.toml b/pyproject.toml index 349e3cc..b5f91b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,16 +19,16 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Distributed Computing", ] -requires-python = ">=3.11,<3.12" +requires-python = ">=3.11,<3.14" dependencies = [ "grpcio>=1.50.0", "grpcio-tools>=1.50.0", "protobuf==5.29.1", - "thriftpy2>=0.4.0", - "six>=1.16.0", "typing-extensions>=4.0.0", ] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 6c56e3a..0000000 --- a/requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Core dependencies -grpcio>=1.50.0 -grpcio-tools>=1.50.0 -protobuf==5.29.1 -typing-extensions>=4.0.0 - -# Development dependencies (optional) -pytest>=7.0.0 -pytest-cov>=4.0.0 -pytest-asyncio>=0.21.0 -black>=23.0.0 -isort>=5.12.0 -flake8>=6.0.0 -mypy>=1.0.0 -pre-commit>=3.0.0 \ No newline at end of file From d75941f5c1722b48fe806e0414b8a4acb337890c Mon Sep 17 00:00:00 2001 From: Tim Li Date: Tue, 5 Aug 2025 10:48:12 -0700 Subject: [PATCH 2/2] Add brew install in readme --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f22ddc8..55950d9 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,16 @@ cd cadence-python-client ### Setup -1. **Install uv (recommended):** +1. **Install protobuf (required):** + ```bash + # macOS + brew install protobuf@29 + + # Linux/Other + # Install protobuf 29.x via your package manager + ``` + +2. **Install uv (recommended):** ```bash # macOS brew install uv @@ -32,7 +41,7 @@ cd cadence-python-client source $HOME/.local/bin/env # Add to your shell profile for persistence ``` -2. **Create virtual environment and install dependencies:** +3. **Create virtual environment and install dependencies:** ```bash uv venv uv pip install -e ".[dev]" @@ -49,7 +58,7 @@ cd cadence-python-client Run the generation script: ```bash -python scripts/generate_protobuf_final.py +python scripts/generate_proto.py ``` This will: