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/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/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" }, 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/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" }, ] 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 56d2a8b..75d5136 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 cea8759..2958a1d 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" },