From 80c051a7fa3dabf67758c72d40cc9c99c601b456 Mon Sep 17 00:00:00 2001 From: tsubakiky Date: Tue, 8 Jul 2025 20:55:28 +0900 Subject: [PATCH 1/6] github: add publish to pypi --- .github/workflows/publish.yaml | 26 +++++++++++++++++++++++ CONTRIBUTING.md | 6 +++--- README.md | 4 ++-- conformance/pyproject.toml | 4 ++-- examples/pyproject.toml | 6 +++--- pyproject.toml | 2 +- src/connect/protocol_connect/constants.py | 2 +- src/connect/protocol_grpc/constants.py | 2 +- uv.lock | 2 +- 9 files changed, 40 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..cb34893 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,26 @@ +name: Build and release + +on: + release: + types: [published] + +jobs: + pypi-publish: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + + - name: Build package + run: uv build + + - name: Publish package to PyPi + run: uv publish --trusted-publishing always diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d0580da..f762c55 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing to Connect Python -Thank you for contributing to connect-python! Please read the [Contributor License Agreement (CLA)](https://site.gaudiy.com/contributor-license-agreement) before submitting any contributions. +Thank you for contributing to connect-py! Please read the [Contributor License Agreement (CLA)](https://site.gaudiy.com/contributor-license-agreement) before submitting any contributions. ## Development Setup @@ -9,8 +9,8 @@ Thank you for contributing to connect-python! Please read the [Contributor Licen **Setup:** ```bash -git clone https://github.com/YOUR_USERNAME/connect-python.git -cd connect-python +git clone https://github.com/YOUR_USERNAME/connect-py.git +cd connect-py uv sync go build -o ./bin/protoc-gen-connect-python -v -x ./cmd/protoc-gen-connect-python diff --git a/README.md b/README.md index 02ab6ab..3cab878 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Connect is a simple, reliable, and interoperable RPC framework that combines the ## Installation ```bash -pip install connect-python +pip install connect-py ``` **⚠️ Dependency Notice**: For gRPC/gRPC-Web support, this package uses forked libraries: @@ -266,7 +266,7 @@ This project includes a Protocol Buffer plugin (`protoc-gen-connect-python`) wri ## Contributing -We warmly welcome and greatly value contributions to the connect-python. However, before diving in, we kindly request that you take a moment to review our Contribution Guidelines. +We warmly welcome and greatly value contributions to the connect-py. However, before diving in, we kindly request that you take a moment to review our Contribution Guidelines. Additionally, please carefully read the Contributor License Agreement (CLA) before submitting your contribution to Gaudiy. By submitting your contribution, you are considered to have accepted and agreed to be bound by the terms and conditions outlined in the CLA, regardless of circumstances. diff --git a/conformance/pyproject.toml b/conformance/pyproject.toml index dc579de..631290d 100644 --- a/conformance/pyproject.toml +++ b/conformance/pyproject.toml @@ -7,13 +7,13 @@ authors = [{ name = "tsubakiky", email = "salovers1205@gmail.com" }] requires-python = ">=3.13" dependencies = [ "anyio>=4.8.0", - "connect-python", + "connect-py", "cryptography>=44.0.2", "hypercorn", ] [tool.uv.sources] -connect-python = { path = "../" } +connect-py = { path = "../" } hypercorn = { git = "https://github.com/tsubakiky/hypercorn" } [dependency-groups] diff --git a/examples/pyproject.toml b/examples/pyproject.toml index 45c1d31..6291bb9 100644 --- a/examples/pyproject.toml +++ b/examples/pyproject.toml @@ -1,18 +1,18 @@ [project] -name = "connect-python-examples" +name = "connect-py-examples" description = "The Python implementation of Connect: Protobuf RPC that works." readme = "README.md" license = { text = "Apache-2.0" } authors = [{ name = "tsubakiky", email = "salovers1205@gmail.com" }] requires-python = ">=3.13" version = "0.1.0" -dependencies = ["connect-python", "hypercorn"] +dependencies = ["connect-py", "hypercorn"] [tool.uv] dev-dependencies = ["mypy>=1.13.0", "pyright>=1.1.390", "ruff>=0.8.2"] [tool.uv.sources] -connect-python = { path = "../" } +connect-py = { path = "../" } hypercorn = { git = "https://github.com/tsubakiky/hypercorn" } [tool.ruff] diff --git a/pyproject.toml b/pyproject.toml index 2056666..0758c92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "connect-python" +name = "connect-py" description = "The Python implementation of Connect: Protobuf RPC that works." readme = "README.md" license = { text = "Apache-2.0" } diff --git a/src/connect/protocol_connect/constants.py b/src/connect/protocol_connect/constants.py index 0d01589..9787777 100644 --- a/src/connect/protocol_connect/constants.py +++ b/src/connect/protocol_connect/constants.py @@ -25,4 +25,4 @@ CONNECT_UNARY_CONNECT_QUERY_VALUE = "v" + CONNECT_PROTOCOL_VERSION _python_version = f"{sys.version_info.major}.{sys.version_info.minor}" -DEFAULT_CONNECT_USER_AGENT = f"connect-python/{__version__} (Python/{_python_version})" +DEFAULT_CONNECT_USER_AGENT = f"connect-py/{__version__} (Python/{_python_version})" diff --git a/src/connect/protocol_grpc/constants.py b/src/connect/protocol_grpc/constants.py index 25bd698..ed705f1 100644 --- a/src/connect/protocol_grpc/constants.py +++ b/src/connect/protocol_grpc/constants.py @@ -22,7 +22,7 @@ GRPC_ALLOWED_METHODS = [HTTPMethod.POST] _python_version = f"{sys.version_info.major}.{sys.version_info.minor}" -DEFAULT_GRPC_USER_AGENT = f"connect-python/{__version__} (Python/{_python_version})" +DEFAULT_GRPC_USER_AGENT = f"connect-py/{__version__} (Python/{_python_version})" RE_TIMEOUT = re.compile(r"^(\d{1,8})([HMSmun])$") diff --git a/uv.lock b/uv.lock index 1404d6a..f34a3ef 100644 --- a/uv.lock +++ b/uv.lock @@ -97,7 +97,7 @@ wheels = [ ] [[package]] -name = "connect-python" +name = "connect-py" source = { editable = "." } dependencies = [ { name = "anyio" }, From d7e2e9958ea9d5542a518d4e170db64951a704e4 Mon Sep 17 00:00:00 2001 From: tsubakiky Date: Tue, 8 Jul 2025 21:44:58 +0900 Subject: [PATCH 2/6] comformance: change project name --- conformance/uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conformance/uv.lock b/conformance/uv.lock index 47b210f..891a665 100644 --- a/conformance/uv.lock +++ b/conformance/uv.lock @@ -61,7 +61,7 @@ version = "0.1.0" source = { virtual = "." } dependencies = [ { name = "anyio" }, - { name = "connect-python" }, + { name = "connect-py" }, { name = "cryptography" }, { name = "hypercorn" }, ] @@ -76,7 +76,7 @@ dev = [ [package.metadata] requires-dist = [ { name = "anyio", specifier = ">=4.8.0" }, - { name = "connect-python", directory = "../" }, + { name = "connect-py", directory = "../" }, { name = "cryptography", specifier = ">=44.0.2" }, { name = "hypercorn", git = "https://github.com/tsubakiky/hypercorn" }, ] @@ -89,7 +89,7 @@ dev = [ ] [[package]] -name = "connect-python" +name = "connect-py" source = { directory = "../" } dependencies = [ { name = "anyio" }, From bc029e97c91d9171aaeace4ea30e7bfa079bcad1 Mon Sep 17 00:00:00 2001 From: tsubakiky Date: Tue, 8 Jul 2025 21:45:27 +0900 Subject: [PATCH 3/6] examples: change project name --- examples/uv.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/uv.lock b/examples/uv.lock index fd58d42..cbf5bce 100644 --- a/examples/uv.lock +++ b/examples/uv.lock @@ -34,7 +34,7 @@ wheels = [ ] [[package]] -name = "connect-python" +name = "connect-py" source = { directory = "../" } dependencies = [ { name = "anyio" }, @@ -76,11 +76,11 @@ dev = [ ] [[package]] -name = "connect-python-examples" +name = "connect-py-examples" version = "0.1.0" source = { virtual = "." } dependencies = [ - { name = "connect-python" }, + { name = "connect-py" }, { name = "hypercorn" }, ] @@ -93,7 +93,7 @@ dev = [ [package.metadata] requires-dist = [ - { name = "connect-python", directory = "../" }, + { name = "connect-py", directory = "../" }, { name = "hypercorn", git = "https://github.com/tsubakiky/hypercorn" }, ] From 01b505efb908953d0a55c4208a282492fc10f126 Mon Sep 17 00:00:00 2001 From: tsubakiky Date: Tue, 8 Jul 2025 22:03:09 +0900 Subject: [PATCH 4/6] contributing: rename --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f762c55..8ec8180 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ Thank you for contributing to connect-py! Please read the [Contributor License A **Setup:** ```bash -git clone https://github.com/YOUR_USERNAME/connect-py.git +git clone https://github.com/YOUR_USERNAME/connect-python.git cd connect-py uv sync From e38b2e5a5c291e4cb96b9be49f6c03d95fd0950b Mon Sep 17 00:00:00 2001 From: tsubaki <48980400+tsubakiky@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:20:34 +0900 Subject: [PATCH 5/6] =?UTF-8?q?CONTRIBUTING.md=20=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Koichi Shiraishi --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8ec8180..726c6a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ Thank you for contributing to connect-py! Please read the [Contributor License A **Setup:** ```bash git clone https://github.com/YOUR_USERNAME/connect-python.git -cd connect-py +cd connect-python uv sync go build -o ./bin/protoc-gen-connect-python -v -x ./cmd/protoc-gen-connect-python From 1cb712213a74bf4c1cac0e4cc80691beebcb84a4 Mon Sep 17 00:00:00 2001 From: tsubaki <48980400+tsubakiky@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:20:46 +0900 Subject: [PATCH 6/6] =?UTF-8?q?CONTRIBUTING.md=20=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Koichi Shiraishi --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 726c6a1..d0580da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing to Connect Python -Thank you for contributing to connect-py! Please read the [Contributor License Agreement (CLA)](https://site.gaudiy.com/contributor-license-agreement) before submitting any contributions. +Thank you for contributing to connect-python! Please read the [Contributor License Agreement (CLA)](https://site.gaudiy.com/contributor-license-agreement) before submitting any contributions. ## Development Setup