-
Notifications
You must be signed in to change notification settings - Fork 52
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
Expanded automatic testing #26
Comments
Alternatively, could test just the core/ZMQserver parts by starting up a java process from the command line and attempting to run various test cases |
If you're ok with pytest (opposed to, say, unitttest), i'm going to take a stab at this today and tomorrow. First PR will be just a few simple examples and conftests. Later we might want to translate some of your https://github.com/micro-manager/pycro-manager/tree/master/test to pytests. |
Awesome! I'm not familiar with either, so I trust your judgement. |
I would like to follow up on this. I think we can catch a lot of bugs if we can run pycromanager, AcqEngJ, NDViewer, etc. against the current build of MicroManager running the demo config. I think the pycromanager headless mode would really help here. @ziw-liu or @edyoshikun may be able to help from our side. Any suggestions on what would be the best infrastructure and how to get started? |
That would be awesome! And yes I totally agree. AcqEngJ/NDTiff/pycro-manager should all be able to be tested in headless mode as you say. The rough steps would be:
Happy to offer more advice and answer questions, though I'm not super knowledgeable about the final step For NDViewer, I'm unsure if the above will work, since I wouldn't expect the VMs to have graphics. Though I think this is less of a problem. I don't have any plans to add new features to it and it doesn't change very often. If there are future changes, I think there will just need to be some manual testing of pycromanager acquisitions. I probably should have done this before merging the breaking changes in micro-manager/NDViewer#16. @nicost FYI if you want to make further changes |
I spoke with @ziw-liu and he will be excited to help set up a test environment, integrated with GitHub Actions, that will install MM and run a few basic integration tests at the start, as @henrypinkard suggested. From there, we can all help build out the test coverage. @ziw-liu let us know if you run into troubles, and we'll all chip in with what we can. |
Awesome! |
And yeah I think once the framework is set up, the test coverage shouldn't be so hard to build bit by bit |
What would be a good schedule for running these tests? On every PR? Or every night after the MM nightly build compiles? Development of pycromanager is often coupled with development of AcqEngJ, NDTiffStorage, and NDViewer. Running pycromanager tests on every PR with the nightly build of MM will often fail as the nightly build does not yet incorporate changes to these three other libraries. One fix for this would be to run GitHub actions every night after a new MM build is compiled. Another option may be install the latest MM build, compile these three additional libraries (any idea how?), replace the out-of-date versions of the .jar files in the MM installation folder, and run PM tests with every PR. I think running tests nightly is a good start. Once we have that, we can work towards the second solution I proposed. Does that make sense? |
Ideally every PR, since this would prevent changes being pushed to pypi and broken versions being pip installable. There are continuous integration builds that could be used, which are developer builds that occur every time something merges into micro-manager. If its no more work, probably best to install these over nightly builds. But I don't think this alone would be enough, because ideally changes to AcqEngJ etc don't merge into MM until they've passed PM tests. Maven (the Java build system used by PM and its dependencies) can be used to build the PM java side, and it will automatically pull in the latest versions of these dependencies. Then it is just, as you say, a matter of copying them into the MM install and deleting whats already there. To do this build, install maven (differs depending on your OS, but there should be straightforward instructions), you navigate into the When getting ready to port this to github actions, this script might be a usefule reference. It executes a |
@henrypinkard Do you know of a way to enable the ZMQ server in MM after a fresh install without using the GUI? I've been trying to modify the Default User profile JSON file, but it seems like it will not be generated until the user registers in the GUI. |
Hmm I'm not sure there is a way, though you don't need to do this if you're running in headless mode, so maybe this is a moot point? |
I got the following error with this test. If PM does not need the MM user profile modification here, maybe it's due to port listening issues inside GitHub's runners.
|
Yeah I think that error message is misleading. This checkbox is irrelevant in headless mode. One strange thing I see: Which is weird because it doesn't seem like you've overriden the default ip address (which should be '127.0.0.1' -- localhost). It also looks like you're using an older version. I would upgrade to latest version of PM and MM because a bunch of stuff has recently changed. I agree githubs runners might be doing something weird, so I would recommend trying it on a machine that you actually have command line access to first. Also try doing |
This is due to a GitHub bug when copy-pasting GH Action logs. It tries to auto-detect job IDs as it does with issue/PR numbers and then replace with Markdown links. The actual log does say |
Managed to get a first working version. Will try the maven deployment next |
Incorporate some automatic testing framework (pytest?) to run all the examples, and add addition edge case examples of things one might do using Java-Python bridge.
Since almost all of these tests would need to run with micro-manager already running, it would probably be difficult to have github do this automatically, but it should be feasible to have a single script that can be run locally to do it
The text was updated successfully, but these errors were encountered: