Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming conventions between python and C APIs #10

Open
henrypinkard opened this issue Jun 28, 2024 · 0 comments
Open

Naming conventions between python and C APIs #10

henrypinkard opened this issue Jun 28, 2024 · 0 comments

Comments

@henrypinkard
Copy link
Member

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 (micro-manager/mmCoreAndDevices#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant