zivid / zivid-python

Official Python package for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
40 stars 14 forks source link

Module names are inconsitent #47

Closed trym-b closed 4 years ago

trym-b commented 4 years ago

The current zivid module names are inconsistent, we are using both snake case and lower case without separators. For example captureassistant and camera_state. These should all be proper snake case.

A quick fix could be to simply rename all the modules to proper snake case, but we should instead implement a camelCase to snake_case function in the pybind11 layer, so that we can simply do a one-to-one mapping of the _zivid modules to zivid modules

nedrebo commented 4 years ago

I think we should go straight for the proper solution to avoid tech debt.

The fix should be to replace the tolower here with a transform from capital case to snake case:

https://github.com/zivid/zivid-python/blob/b52396668cd60c285d1e1ac6f7748e5c93fb740b/src/include/ZividPython/Wrappers.h#L52-L60

kontramind commented 4 years ago

Would it be possible to have test(s) to check if the name transformation is working - or it would be considered as over-engineering?

trym-b commented 4 years ago

Perhaps we could add that, although we have not set up a C++ test framework for this repository so it might be a bit too much work at this moment.

eskaur commented 4 years ago

This one is fixed now, right? @trym-b

trym-b commented 4 years ago

Right, will close it.