micro-manager / pymmdevice

(Experimental) Python device adapters for Micro-Manager
0 stars 0 forks source link

Naming conventions between python and C APIs #10

Open henrypinkard opened 1 week ago

henrypinkard commented 1 week ago

from previous PR:

@henrypinkard There is a discrepancy between the required properties and methods for Python implementations of devices compared to MM's requirements. In certain cases where MM uses methods, Python uses properties, which could lead to confusion. On the other hand, some things are easier/more natural to express as properties on the python side. So at some point it would be great to hear more about your thinking on this, and I think it would be beneficial to establish a rule for when Python devices should mirror MM's approach versus implementing a simpler alternative.

  • Consider renaming left and right properties in the camera device to contain "roi" for naming consistency with the rest of the MM APIs

@IvoVellekoop Agreed, we should think about the naming. Is there a list of standard property names for the different device types that I can use?

As of right now, the APIs that exist across device types exist only in function names, not in properties. This is something I hope to change in the future (https://github.com/micro-manager/mmCoreAndDevices/issues/258). However, this will be an opt-in system that will be enforced only for new device APIs.

The most strictly consistent way to create parallelism between the python and C APIs would be to say that all API related functionality should be done through methods, though I don't necessarily think this is required. I'd be curious to hear others' thoughts on this.