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

Ship DemoCamera with pymmcore #19

Open
oeway opened this issue Sep 12, 2020 · 5 comments
Open

Ship DemoCamera with pymmcore #19

oeway opened this issue Sep 12, 2020 · 5 comments

Comments

@oeway
Copy link
Contributor

oeway commented Sep 12, 2020

Following the hints in #18, I manage to build a DemoCamera device adapter that works in Docker, it's very helpful for development and demo purpose. So I am wondering whether it make sense to build and ship the demo device adapter directly with pymmcore, so I don't even need to fetch a binary version elsewhere.

Here is the demo jupyter notebook I made: Binder (BTW, we can link to this repo as an example if you like.)

@marktsuchida
Copy link
Member

Yes, that sounds like a really good idea to me, too. Some logistical challenges might need to be solved around (1) building DemoCamera from setup.py and (2) configuring pymmcore so that it sees the bundled DemoCamera without having to have its search paths configured.

Awesome to see the notebook in action!

@tlambert03
Copy link
Contributor

tlambert03 commented Aug 5, 2021

I also think this would be a nice idea. I'll point out that, in the meantime, the pymmcore-plus adds a few "conveniences" on top of pymmcore (i.e. slightly more pythonic behavior in some cases, a few more methods, etc...). And, it also comes with a mmcore install cli that will auto-fetch all device adapters. still not as nice as having democam packaged, but something to know about?

@marktsuchida
Copy link
Member

@tlambert03 Yeah, I saw your install feature and like it a lot (pymmcore's README now mentions pymmcore-plus, btw). Good to have it mentioned here.

I'm not sure it is worth trying to come up with an ad hoc way to build one device adapter (or a few, including Utilities) as part of pymmcore. It's hard to do correctly (or at least identically to the official MM build) using setuptools, whose limits we are already pushing. Switching to a more capable build system (e.g. Meson, which works with PEP 518) would make it doable, but I think such effort should first be directed toward improving the build system of the main MM project so that we don't have to come up with a pymmcore-specific solution. Once that's done, we'll certainly include DemoCamera in pymmcore.

@tlambert03
Copy link
Contributor

if I may slightly hijack this thread with a quick question (related to installing device adapters):
could you suggest a good way to (programmatically) determine/download the most recently nightly adapters compatible with a given device interface? For instance, if someone has pymmcore x.x.x.70.x ... and the adapter interface is bumped upstream, the download script will install an incompatible version. but I haven't yet found a good way to determine the adapter interface without downloading and checking (or perhaps looking at the git blame of MMDevice.h )

@marktsuchida
Copy link
Member

@tlambert03 I can't think of a good way at the moment, since we don't tag the commits used for nightly builds.

The intent is to keep supporting, say, 70-compatible pymmcore for a while after MMDevice is bumped to 71 (maybe until the next official MM release, since we have those again now). In other words, it will be possible to determine the correct version of pymmcore based on the MM installation, but not the other way around. But there could always be a few day's delay between the MMDevice version bump and the release of the corresponding pymmcore.

I suppose it wouldn't be that hard for us to publish a correspondence table (static JSON) that is automatically updated every day (seems doable with pymmcore-plus + GitHub Actions+Pages). Does that sound useful? (If yes, maybe let's start a new issue.)

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

3 participants