Python 3 & Micromanager -- Status update?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Python 3 & Micromanager -- Status update?

StevenF
Hey Micromanager Community,

At the risk of sounding a bit redundant, what is the status on having the
newer versions of MMCorePy support python 3.6/3.7 & onward?
I know that i am not the only one waiting for this to happen.
In my case, i know that some labs cannot use the code i am working on
because the new drivers aren't compatible with the old version for which
this specific build was done
https://github.com/zfphil/micro-manager-python3
<https://github.com/zfphil/micro-manager-python3>  

Anyway i would love to get the newest beta versions working with what i am
working on and not having to really on an year and a half old build of the
beta.

Thanks in advance,

Cheers,

Steven



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Python 3 & Micromanager -- Status update?

Stuurman, Nico
Hi Steven,


> Hey Micromanager Community,
>
> At the risk of sounding a bit redundant, what is the status on having the
> newer versions of MMCorePy support python 3.6/3.7 & onward?

Yes, this is a bit redundant.  Maybe things were not very clear, so I'll
try to explain.

I work on Micro-Manager in my spare time, and whenever our lab has needs
related to Micro-Manager.  I have no need for Python 3 support, so I
will not work on that.

The Micro-Manager Core and device interface are quite stable (i.e. they
change maybe a few times per year), so it is very possible for someone
else (like you!) to build a MMCorePy3 binary and make this available for
everyone who needs it.  If you do not know how to do that, you can ask
other people, or you can pay someone to do this for you.

I may sound a bit terse, but that is because I like to help people out
where I can.  Python3 support is simply too much work (plus, I have no
need for it whatsoever myself), but I strangely still feel compelled to
help, so it is a bit unpleasant that you keep on asking without doing
anything.

Best,

Nico


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Python 3 & Micromanager -- Status update?

hadim
I see no '.i' file in
https://github.com/zfphil/micro-manager-python3/tree/master/MMCorePy. This
SWIG file is needed to be able to build the Python wrapper. Any idea where
this file could be?

Once we have it, we should make a PR to Nico's MM repository in order to
integrate this Python wrapper with each new MM 2.0 build. What do you think?



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Python 3 & Micromanager -- Status update?

Stuurman, Nico
Hi Hadim,
> I see no '.i' file in
> https://protect2.fireeye.com/url?k=8e6be42a-d22b897c-8e6bc337-0cc47adb57f0-fc06dfce9689f362&u=https://github.com/zfphil/micro-manager-python3/tree/master/MMCorePy. This
> SWIG file is needed to be able to build the Python wrapper. Any idea where
> this file could be?
>
> Once we have it, we should make a PR to Nico's MM repository in order to
> integrate this Python wrapper with each new MM 2.0 build. What do you think?

Not exactly.  It would need installing Python 3 side by side with Python
2 on the various build machines, and making sure everything works as
expected.  I'd much rather have someone else do that particular part of
the build (only needs to be done when the code interface changes), and
put a download link on the Micro-Manager website.

Best,


Nico


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Python 3 & Micromanager -- Status update?

Kyle Douglass-2


Not exactly.  It would need installing Python 3 side by side with Python
2 on the various build machines, and making sure everything works as
expected.  I'd much rather have someone else do that particular part of
the build (only needs to be done when the code interface changes).
 
Another difficulty is choosing the right version of Python. If you put, for example, 3.6 on the build machines, then people who need 3.7 possibly won't be able to use the wrapper.

I'm just brainstorming here, but I build Micro-Manager for Linux on Travis CI and I wonder whether the same could be done for Windows. (IIRC Travis now supports Windows builds.) Then you could use the matrix build option of Travis to build Micro-Manager for a range of Python versions (3.5, 3.6, and 3.7) for example.

I am willing to help with this if someone knows already how to compile MM for Windows in headless mode (without a GUI). The main difficulties I foresee are managing 3rdpartypublic and Travis's build timeouts of 50 minutes; I workaround the latter difficulty by using a compiler cache. The former difficulty though is still painful; it takes ~8 minutes to clone 3rdpartypublic.

Best,
Kyle


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Python 3 & Micromanager -- Status update?

StevenF
In reply to this post by Stuurman, Nico
Stuurman, Nico wrote
> I may sound a bit terse, but that is because I like to help people out
> where I can.  Python3 support is simply too much work (plus, I have no
> need for it whatsoever myself), but I strangely still feel compelled to
> help, so it is a bit unpleasant that you keep on asking without doing
> anything.

I have tried doing the build myself in the past but have been unsuccessful,
hence why i was asking. The other reason why i keep asking is i know for a
fact that Egor Zindy has done the work when it comes to the having the
python library be python3.6 compatible, he is just awaiting for it to be
integrated in the main build :


Zindy, Egor wrote
> I sent my Python 3 code to OpenImaging back in August (contract work) but
> haven't heard back from them

This is a direct quote from him when we where talking about this very
subject last year. Obviously if no one had worked on it and i was the only
one asking for it i would double my efforts and make it myself.  But from
what i understand, the work has already been done. I hope you can understand
why am asking again, and i just wanted to know the *Status* of the
advancement of this feature, why it's being delayed for example? can we
help?


Stuurman, Nico wrote
> I work on Micro-Manager in my spare time, and whenever our lab has needs
> related to Micro-Manager.  I have no need for Python 3 support, so I
> will not work on that.

I am currently using the mm2-beta version of Micromanager. Isn't this branch
being worked on by Mark Tsuchida who now has his own company OpenImaging
that is and i quote from the website :
"Open Imaging is a new company set up by the µManager development team to
further develop µManager and provide µManager-related services." If i do
understand correctly your branch (the gamma one) is basically your fork of
mm2-beta that you use for your lab? If that is the case then obviously i do
not expect you to do these things for free or only out the kindess of your
heart.

Thanks for the replies,

Best,

Steven



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Python 3 & Micromanager -- Status update?

Egor Zindy
Hey everyone,

I'll add my twopence piece to the pot since my ears are burning...

>The other reason why i keep asking is i know for a
> fact that Egor Zindy has done the work when it comes to the having the
> python library be python3.6 compatible, he is just awaiting for it to be
> integrated in the main build :
>
>
> Zindy, Egor wrote
> > I sent my Python 3 code to OpenImaging back in August (contract work) but
> > haven't heard back from them
>
> This is a direct quote from him when we where talking about this very
> subject last year.

To expand on what I wrote, I managed to produce some usable Python3 bindings alongside the Python2 ones, as part of a small *contracted* feasibility study. Providing both bindings is the only way to go in my opinion, since a lot of people (including me sometimes) still rely on Python 2. At least for a little while longer. The interesting part was to assess how much of the existing code could be re-used to avoid code duplication as much as possible. This approach worked well for the Windows project files, but still needs some refactoring on the Linux side, to try and share the automake/autoconf code rather than duplicating it.

Sorry Steven, but that's where I left it at. I have no doubt this will find its way back into the MM tree at some point (in one form or another), but as I was contracted to look at this, this isn't for me to decide. Otherwise, trust me, I would've sent you some test DLLs the second they'd successfully compiled! :-)

> Obviously if no one had worked on it and i was the only
> one asking for it i would double my efforts and make it myself.  But from
> what i understand, the work has already been done.

As far as my own testing went, yes. But without at least a second pair of eyes on the code and some thorough testing, I wouldn't call it "done" by any stretch of imagination... Frustrating I know since you've been waiting for this for months and would be the ideal person to test the new code.

> I hope you can understand
> why am asking again, and i just wanted to know the *Status* of the
> advancement of this feature, why it's being delayed for example? can we
> help?

On a positive note, anything we (as a community) can help with, I'm in of course.

Cheers,
Egor
________________________________________
From: StevenF [[hidden email]]
Sent: 13 February 2019 10:14
To: [hidden email]
Subject: Re: [micro-manager-general] Python 3 & Micromanager -- Status update?

Stuurman, Nico wrote
> I may sound a bit terse, but that is because I like to help people out
> where I can.  Python3 support is simply too much work (plus, I have no
> need for it whatsoever myself), but I strangely still feel compelled to
> help, so it is a bit unpleasant that you keep on asking without doing
> anything.

I have tried doing the build myself in the past but have been unsuccessful,
hence why i was asking. The other reason why i keep asking is i know for a
fact that Egor Zindy has done the work when it comes to the having the
python library be python3.6 compatible, he is just awaiting for it to be
integrated in the main build :


Zindy, Egor wrote
> I sent my Python 3 code to OpenImaging back in August (contract work) but
> haven't heard back from them

This is a direct quote from him when we where talking about this very
subject last year. Obviously if no one had worked on it and i was the only
one asking for it i would double my efforts and make it myself.  But from
what i understand, the work has already been done. I hope you can understand
why am asking again, and i just wanted to know the *Status* of the
advancement of this feature, why it's being delayed for example? can we
help?


Stuurman, Nico wrote
> I work on Micro-Manager in my spare time, and whenever our lab has needs
> related to Micro-Manager.  I have no need for Python 3 support, so I
> will not work on that.

I am currently using the mm2-beta version of Micromanager. Isn't this branch
being worked on by Mark Tsuchida who now has his own company OpenImaging
that is and i quote from the website :
"Open Imaging is a new company set up by the µManager development team to
further develop µManager and provide µManager-related services." If i do
understand correctly your branch (the gamma one) is basically your fork of
mm2-beta that you use for your lab? If that is the case then obviously i do
not expect you to do these things for free or only out the kindess of your
heart.

Thanks for the replies,

Best,

Steven



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Python 3 & Micromanager -- Status update?

StevenF
Egor Zindy wrote
> To expand on what I wrote, I managed to produce some usable Python3
> bindings alongside the Python2 ones, as part of a small *contracted*
> feasibility study. Providing both bindings is the only way to go in my
> opinion, since a lot of people (including me sometimes) still rely on
> Python 2. At least for a little while longer. The interesting part was to
> assess how much of the existing code could be re-used to avoid code
> duplication as much as possible. This approach worked well for the Windows
> project files, but still needs some refactoring on the Linux side, to try
> and share the automake/autoconf code rather than duplicating it.

Okay i see then my bad i hadn't quite understood what exactly was the work
done for then!


Egor Zindy wrote
> As far as my own testing went, yes. But without at least a second pair of
> eyes on the code and some thorough testing, I wouldn't call it "done" by
> any stretch of imagination... Frustrating I know since you've been waiting
> for this for months and would be the ideal person to test the new code.

My code is python 3.6 and uses micromanager's MMCorePy, i would gladly test
if it's any help/needed of course and provide any feedback or try to help!

Anyway i think moving towards python 3 is inevitable for any python library
and it would be a shame if MMCorePy would be left behind!

And again sorry for bringing this up, things where just a bit unclear for
me.

Cheers,

Steven



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Python 3 & Micromanager -- Status update?

Stuurman, Nico
In reply to this post by StevenF
On 2/13/19 2:14 AM, StevenF wrote:
> I am currently using the mm2-beta version of Micromanager. Isn't this
> branch being worked on by Mark Tsuchida who now has his own company
> OpenImaging that is and i quote from the website :
> "Open Imaging is a new company set up by the µManager development team to further develop µManager and provide µManager-related services." If i do understand correctly your branch (the gamma one) is basically your fork of mm2-beta that you use for your lab? If that is the case then obviously i do not expect you to do these things for free or only out the kindess of your
> heart.

Explanation of 2.0-gamma can be found here:
https://valelab4.ucsf.edu/~nstuurman/micro-manager/WhyGamma/

Notable differences with beta:
- Uses Java 8 rather than 6
- Includes a 3D viewer (using Lois Royer's ClearViewer underneath)
- has active development
(https://github.com/nicost/micro-manager/commits/ViewerPlusCV versus
https://github.com/micro-manager/micro-manager/commits/mm2)

and yes, I am maintaining this for use in the lab (and everyone else who
can use it and is welcome to contribute).

Best,


Nico



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general