Remove duplicate session_pb2 codegen, add ni-apis submodule and dependency on ni.grpcdevice.v1.proto#2176
Remove duplicate session_pb2 codegen, add ni-apis submodule and dependency on ni.grpcdevice.v1.proto#2176
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2176 +/- ##
==========================================
- Coverage 89.85% 88.74% -1.12%
==========================================
Files 73 73
Lines 19006 19006
==========================================
- Hits 17077 16866 -211
- Misses 1929 2140 +211
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…ady installing through tox.ini files
|
I've been told we actually do need these, so disregard this comment. |
protoc needs a copy of session.proto in order to handle |
@bkeryan I don't understand. Doesn't |
Oh, dang. We need it in order to compile our api-specific .proto files? That's annoying. |
| with: | ||
| submodules: true |
There was a problem hiding this comment.
I don't think we need this.
This action is for running system tests. System tests do not involve tox -e codegen.
| with: | ||
| submodules: true |
There was a problem hiding this comment.
Like the other workflows in this folder, this is just runs system tests and examples.
I don't think we'll need submodules for that because it shouldn't involve codegen.
| METADATA_FILES := $(wildcard $(METADATA_DIR)/*.py) | ||
| SHARED_PROTOS_DIR := $(ROOT_DIR)/src/shared_protos | ||
| PROTO_DIRS := $(METADATA_DIR) $(SHARED_PROTOS_DIR) | ||
| NI_APIS_PROTOS_DIR := $(ROOT_DIR)/third_party/ni-apis/ni/grpcdevice/v1 |
There was a problem hiding this comment.
Is this the right place to get session.proto from or should it be this one?
https://github.com/ni/ni-apis-python/blob/main/proto/session.proto
The one in ni-apis is pretty bare.
I've updated CHANGELOG.md if applicable.I've added tests applicable for this pull requestWhat does this Pull Request accomplish?
Replaces the duplicate
session_pb2protobuf codegen in each nimi-python driver modules with a dependency onni.grpcdevice.v1.proto(similar to [ni/nidaqmx-python#859].import from . import session_pb2with absoluteimport session_pb2in_grpc_stub_interpreter.py.makoni.grpcdevice.v1.proto>=1.0.0as part of installers for modules that support grpc.session_pb2.pyandsession_pb2_grpc.pysession.protofileList issues fixed by this Pull Request below, if any.
What testing has been done?
ni.grpcdevice.v1.protopackage than importing from locally generatedsession_pb2file as before.