Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.13"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
run: uv sync
- name: Check formatting
run: make fmt-check
8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.13"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install build
- name: Build package
run: python -m build
run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions .github/workflows/regen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
permission-pull-requests: write
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: '3.13'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
run: uv sync
- name: Generate code
run: |
make clone-proto
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.13"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
run: uv sync
- name: Run tests
run: make test
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
test:
pytest .
uv run pytest .

fmt:
black . --exclude=cloudquery
uv run black . --exclude=cloudquery

fmt-check:
black --check . --exclude=cloudquery
uv run black --check . --exclude=cloudquery

clone-proto:
git clone https://github.com/cloudquery/plugin-pb
Expand All @@ -15,8 +15,8 @@ gen-proto:

mkdir -p ./protos/cloudquery/plugin_v3
cp ./plugin-pb/plugin/v3/*.proto ./protos/cloudquery/plugin_v3/.
python -m grpc_tools.protoc -I./protos --python_out=. --pyi_out=. --grpc_python_out=. ./protos/cloudquery/plugin_v3/*.proto
uv run python -m grpc_tools.protoc -I./protos --python_out=. --pyi_out=. --grpc_python_out=. ./protos/cloudquery/plugin_v3/*.proto

mkdir -p ./protos/cloudquery/discovery_v1
cp ./plugin-pb/discovery/v1/*.proto ./protos/cloudquery/discovery_v1/.
python -m grpc_tools.protoc -I./protos --python_out=. --pyi_out=. --grpc_python_out=. ./protos/cloudquery/discovery_v1/*.proto
uv run python -m grpc_tools.protoc -I./protos --python_out=. --pyi_out=. --grpc_python_out=. ./protos/cloudquery/discovery_v1/*.proto
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ This is a low-level auto-generated gRPC client and server for CloudQuery plugin

### Prerequisites

- [Python 3.7+](https://www.python.org/downloads/)

we recommend using virtualenv to manage your python environment.

```bash
virtualenv -p python3.7 venv # or any python >= 3.7
source venv/bin/activate
```
- [Python 3.9+](https://www.python.org/downloads/)
- [uv](https://docs.astral.sh/uv/)

### Install dependencies

```bash
pip install -r requirements.txt
uv sync
```

### Regenerate gRPC code
Expand All @@ -27,4 +21,3 @@ pip install -r requirements.txt
make clone-proto # This is needed only once
make gen
```

56 changes: 56 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[build-system]
requires = ["setuptools>=75.0"]
build-backend = "setuptools.build_meta"

[project]
name = "cloudquery-plugin-pb"
version = "0.0.54"
description = "CloudQuery Plugin client and server library"
readme = "README.md"
license = "MPL-2.0"
requires-python = ">=3.9"
authors = [
{ name = "CloudQuery LTD", email = "pypi-packages@cloudquery.io" },
]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Topic :: Internet",
]
dependencies = [
"grpcio>=1.56.0",
"grpcio-tools>=1.56.0",
"protobuf>=6.30.0",
"pyarrow>=13.0.0",
]

[project.urls]
Homepage = "https://github.com/cloudquery/plugin-pb-python"

[dependency-groups]
dev = [
"black>=26.3.1; python_version >= '3.10'",
"pytest>=9.0.2; python_version >= '3.10'",
]

[tool.setuptools.packages.find]
include = ["cloudquery*"]

[tool.setuptools.package-data]
cloudquery = [
"plugin_v3/py.typed",
"plugin_v3/*.pyi",
"discovery_v1/py.typed",
"discovery_v1/*.pyi",
]

[tool.uv]
exclude-newer = "1 week"
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

77 changes: 0 additions & 77 deletions setup.py

This file was deleted.

Loading
Loading