Skip to content

Commit 00d531e

Browse files
committed
Remove dependency on crossplane-function-sdk-python
1 parent 626ca93 commit 00d531e

10 files changed

Lines changed: 474 additions & 15 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ jobs:
7070
- name: Install Hatch
7171
uses: pypa/hatch@install
7272

73+
- name: Generate run_function protobuf
74+
run: hatch run generate:protoc
75+
7376
- name: Run Unit Tests
7477
run: hatch run test:ci
7578

@@ -114,6 +117,9 @@ jobs:
114117
- name: Set PyPI Project Version
115118
run: hatch version ${{ env.PYPI_VERSION }}
116119

120+
- name: Generate run_function protobuf
121+
run: hatch run generate:protoc
122+
117123
- name: Build Sdist and Wheel
118124
run: hatch build
119125

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ __marimo__/
212212

213213
# function-pythonic
214214
crossplane/pythonic/__version__.py
215+
crossplane/pythonic/proto/v1/run_function_pb2*
215216
pocs/
216217
pythonic-packages/
217218
tests/protobuf/pytest_pb2*

crossplane/pythonic/composite.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11

22
import datetime
33
from google.protobuf.duration_pb2 import Duration
4-
from crossplane.function.proto.v1 import run_function_pb2 as fnv1
54

6-
from . import auto_ready
7-
from . import protobuf
5+
from . import (
6+
auto_ready,
7+
protobuf,
8+
)
9+
from .proto.v1 import run_function_pb2 as fnv1
810

911

1012
_notset = object()

crossplane/pythonic/function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import sys
88

99
import grpc
10-
from crossplane.function.proto.v1 import run_function_pb2 as fnv1
11-
from crossplane.function.proto.v1 import run_function_pb2_grpc as grpcv1
10+
from .proto.v1 import run_function_pb2 as fnv1
11+
from .proto.v1 import run_function_pb2_grpc as grpcv1
1212
from .. import pythonic
1313

1414
logger = logging.getLogger(__name__)

crossplane/pythonic/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
import signal
88
import sys
99

10-
import crossplane.function.proto.v1.run_function_pb2_grpc as grpcv1
1110
import grpc
1211

1312
from . import (
1413
__about__,
1514
command,
1615
function,
1716
)
17+
from .proto.v1 import run_function_pb2_grpc as grpcv1
18+
1819

1920
logger = logging.getLogger(__name__)
2021

0 commit comments

Comments
 (0)