memphis.py
memphis.py copied to clipboard
Bug: Review no-member error for ProtoBuf
Running Pylint on master generates the following error:
memphis/memphis.py:450:23: E1101: Module 'google.protobuf.descriptor_pb2' has no 'FileDescriptorSet' member (no-member)
We should fix this or disable it on a per-line basis using:
# pylint: disable-next=no-member
print("A no-member error will be suppressed for this line
@rnowling-memphis I looked into the memphis/memphis file on my local machine and after running the pylint test the given error is found on the following lines:
-
bug.py:478:21: E1101: Instance of 'FileDescriptorSet' has no 'file' member (no-member)
-
bug.py:479:23: E1101: Instance of 'FileDescriptorSet' has no 'file' member (no-member)
-
bug.py:482:27: E1101: Instance of 'FileDescriptorSet' has no 'file' member (no-member)
Here's the code snippet, Please have a look into this :
- After adding
# pylint: disable-next=no-member
, on line 478,479,482, The error got fixed!
Thanks @Adarsh-jaiss ! I'm not sure that disabling the linting error is the right move here without first checking that the code works. In the previous instance, it made sense to disable the error because we explicitly check that the member exists and have an alternative code path if not. Here, we absolutely depend on the file
attribute existing. This one will require more work on your end to debug. In particular, it seems like you would need to:
- Set up Memphis locally using Docker
- Create a station with a protocol buffer-based schemaverse attachment
- Modify the memphis.py code to add some print statements or something so you can verify that this code block is run, the file field exists, etc.
- Install the SDK into a local virtual environment
- Write a simple producer that produces messages in protocol buffer format.
I think this is going to be a fair amount of work. If you don't want to take that on quite yet, I think there is other work that needs to be done that would be much easier. For example, it would be nice to add examples to the function documentation like those for Consumer.fetch()
so that we can eventually generate useful API docs. What do you think?
Either way, we value your contributions and thank you!
- In which issue, is that function reffered to?
- I would love to work on that issue
Thanks @Adarsh-jaiss ! I'm not sure that disabling the linting error is the right move here without first checking that the code works. In the previous instance, it made sense to disable the error because we explicitly check that the member exists and have an alternative code path if not. Here, we absolutely depend on the
file
attribute existing. This one will require more work on your end to debug. In particular, it seems like you would need to:
- Set up Memphis locally using Docker
- Create a station with a protocol buffer-based schemaverse attachment
- Modify the memphis.py code to add some print statements or something so you can verify that this code block is run, the file field exists, etc.
- Install the SDK into a local virtual environment
- Write a simple producer that produces messages in protocol buffer format.
I think this is going to be a fair amount of work. If you don't want to take that on quite yet, I think there is other work that needs to be done that would be much easier. For example, it would be nice to add examples to the function documentation like those for
Consumer.fetch()
so that we can eventually generate useful API docs. What do you think?Either way, we value your contributions and thank you!
Hey @rnowling-memphis
- I have locally installed the memphsis and now i'm trying to understand the issue and would love to work on this issue!
- And in the meantime , I'll also be working on the another issues including the one which you talked above
- please explain the issue you mentioned above in detail, so that i can work on that