Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 5 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8
with:
version: "0.11.2"
- 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 --frozen
- name: Check formatting
run: make fmt-check
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8
with:
version: "0.11.2"
- 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
8 changes: 5 additions & 3 deletions .github/workflows/regen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ jobs:
permission-pull-requests: write
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8
with:
version: "0.11.2"
- 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 --frozen
- name: Generate code
run: |
make clone-proto
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8
with:
version: "0.11.2"
- 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 --frozen
- 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 . --extend-exclude=cloudquery

fmt-check:
black --check . --exclude=cloudquery
uv run black --check . --extend-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
```

55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[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",
"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