Skip to content

Commit 704313c

Browse files
chore(cd): fix protobuf import issue (#204)
- chore(cd): fix protobuf import issue #204
1 parent bcfc723 commit 704313c

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

.github/workflows/cd-pydgraph.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,8 @@ jobs:
3030
python -m pip install twine
3131
- name: Verify that protobufs are checked in
3232
run: |
33-
# we modify one line in proto/api_pb2_grpc.py as described in readme
3433
python scripts/protogen.py
35-
ACTUAL_DIFF=$(git diff --shortstat)
36-
EXPECTED_DIFF=" 1 file changed, 1 insertion(+), 1 deletion(-)"
37-
if [[ "$ACTUAL_DIFF" == "$EXPECTED_DIFF" ]]; then
38-
echo "found expected difference"
39-
else
40-
echo "unexpected difference when regenerating protobufs, verify they are checked in"
41-
exit 1
42-
fi
34+
git diff --exit-code -- .
4335
- name: Build pydgraph
4436
run: |
4537
rm -rf dist

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [v23.0.1] - 2023-05-29
9+
10+
### Added
11+
12+
- chore(cd): fix protobuf import issue (#204)
13+
814
## [v23.0.0] - 2023-05-15
915

1016
### Breaking

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -523,14 +523,6 @@ command:
523523
python scripts/protogen.py
524524
```
525525

526-
The generated file `api_pb2_grpc.py` needs to be changed in recent versions of python.
527-
The required change is outlined below as a diff.
528-
529-
```diff
530-
-import api_pb2 as api__pb2
531-
+from . import api_pb2 as api__pb2
532-
```
533-
534526
### Running tests
535527

536528
To run the tests in your local machine, run:

pydgraph/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
"""Metadata about this package."""
1616

17-
VERSION = '23.0.0'
17+
VERSION = '23.0.1rc1'

pydgraph/proto/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import sys
2+
from pathlib import Path
3+
sys.path.append(str(Path(__file__).parent))

pydgraph/proto/api_pb2_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
44

5-
from . import api_pb2 as api__pb2
5+
import api_pb2 as api__pb2
66

77

88
class DgraphStub(object):

0 commit comments

Comments
 (0)