Skip to content

Commit

Permalink
revert accidental changes
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypinkard committed Jul 9, 2024
1 parent 43c6b23 commit 1e13f6e
Show file tree
Hide file tree
Showing 31 changed files with 1,199 additions and 850 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ labels: bug
configuration, it is likely unrelated to pycro-manager
-->

<!--The best bug reports are those which can be converted into an automated integration_tests.
<!--The best bug reports are those which can be converted into an automated test.
This ensures that once fixed, the bug can be avoided in the future. Tests are minimal
scripts that reproduce the errant behavior using the Micro-Manager Demo configuration.
Examples of tests can be found here:
https://github.com/micro-manager/pycro-manager/tree/main/pycromanager/test
-->

<!--If you're familiar with the process of making pull requests, the most helpful type of
bug report to create is one with a linked pull request with a execution_engine integration_tests added (which should
bug report to create is one with a linked pull request with a new test added (which should
currently fail due to the bug). More information running the testing framework can be found here:
(https://github.com/micro-manager/pycro-manager/blob/main/Contributing.md#testing-the-code).
If you're not familiar with this process, it is also okay to simply paste a snippet of
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ labels: enhancement
Welcome! Thanks for thinking of a way to improve pycromanager. If this solves a problem for you, then it probably solves that problem for lots of people! So the whole community will benefit from this request.
Before creating a execution_engine feature request please search the issues for relevant feature requests.
Before creating a new feature request please search the issues for relevant feature requests.
-->

### Problem
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# If changes to java versions
# Deploy execution_engine version of pycromanager java to maven,
# Deploy new version of pycromanager java to maven,
# and then update micro-manager ivy file and make PR
# If changes to python version
# await for PR to merge into execution_engine MM version
# then publish execution_engine version to pypi
# await for PR to merge into new MM version
# then publish new version to pypi

name: Build and deploy Java and Python components of Pycro-Manager

Expand All @@ -20,7 +20,7 @@ concurrency: PM_version_update

jobs:

# Use a filter to determine whether to deploy execution_engine java version
# Use a filter to determine whether to deploy new java version
check-java-version:
if: ${{ github.repository == 'micro-manager/pycro-manager' }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
repository: micro-manager/pycro-manager
ref: main

- name: Wait for execution_engine version to be available and update ivy.xml
- name: Wait for new version to be available and update ivy.xml
run: |
cd pycro-manager
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
git push origin --delete dependency_update_from_pycromanager
# After java deps have updated in MM, time to check if a execution_engine python version is needed
# After java deps have updated in MM, time to check if a new python version is needed
check-python-version:
if: ${{ github.repository == 'micro-manager/pycro-manager' }}
runs-on: ubuntu-latest
Expand All @@ -213,12 +213,12 @@ jobs:
pypi-deploy:
# Once any changes to java have gone into micro-manager, a execution_engine version of PM can be deployed to PyPi
# Once any changes to java have gone into micro-manager, a new version of PM can be deployed to PyPi
needs: [check-java-version, mm-update, maven-deploy, check-python-version]
name: Deploy execution_engine version to PyPi if needed
name: Deploy new version to PyPi if needed

# Run if
# java update is complete without errors and execution_engine version is merged into MM main (or no java update)
# java update is complete without errors and new version is merged into MM main (or no java update)
# and python version changed
# weird syntax needed, see: https://github.com/actions/runner/issues/491#issuecomment-850884422
if: ${{ github.repository == 'micro-manager/pycro-manager' && always() && needs.check-python-version.outputs.changed == 'true' && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and integration_tests
name: Build and test

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion build_automation/update_PycroManagerJava.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def read_versions(root):
for lib_name in main_branch_versions.keys():
old_version = main_branch_versions[lib_name]
new_version = updated_versions[lib_name]
print('\t', lib_name, '\t\told: ', old_version, '\texecution_engine: ', new_version)
print('\t', lib_name, '\t\told: ', old_version, '\tnew: ', new_version)
if new_version > old_version:
if new_version.minor > old_version.minor:
minor_version_increased = True
Expand Down
6 changes: 3 additions & 3 deletions docs/source/application_notebooks/PSF_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ def grab_image(image, metadata):


def acquire_data(z_range):
""" micro-manager data acquisition. Creates acquisition event_implementations for z-stack.
This example: use custom event_implementations, not multi_d_acquisition because the
""" micro-manager data acquisition. Creates acquisition events for z-stack.
This example: use custom events, not multi_d_acquisition because the
z-stage is not run from micro-manager but controlled via external DAQ."""
with JavaBackendAcquisition(directory=None, name=None,
show_display=True,
Expand All @@ -177,7 +177,7 @@ def acquire_data(z_range):


def acquire_multid(z_range):
""" micro-manager data acquisition. Creates acquisition event_implementations for z-stack.
""" micro-manager data acquisition. Creates acquisition events for z-stack.
This example: use multi_d_acquisition because the z-stage is run
from micro-manager.
Unless hardware triggering is set up in micro-manager, this will be fairly slow:
Expand Down
6 changes: 3 additions & 3 deletions misc/PropertyMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def encode(self) -> dict:

@staticmethod
def hook(d: dict):
"""Check if a dictionary represents an instance of this class and return a execution_engine instance. If this dict does not match
"""Check if a dictionary represents an instance of this class and return a new instance. If this dict does not match
the correct pattern then just return the original dict."""
if "type" in d and d["type"] in Property.pTypes.values():
if "scalar" in d:
Expand All @@ -101,7 +101,7 @@ def encode(self) -> dict:

@staticmethod
def hook(d: dict):
"""Check if a dictionary represents an instance of this class and return a execution_engine instance. If this dict does not match
"""Check if a dictionary represents an instance of this class and return a new instance. If this dict does not match
the correct pattern then just return the original dict."""
if "type" in d and d["type"] in Property.pTypes.values():
if "array" in d:
Expand Down Expand Up @@ -239,7 +239,7 @@ def __getitem__(self, idx: typing.Union[slice, int]) -> PropertyMap:


if __name__ == "__main__":
"""Test that opens a position list file, saves it to a execution_engine file and then checks that both versions
"""Test that opens a position list file, saves it to a new file and then checks that both versions
are still identical"""
path1 = r"PositionList.pos"
path2 = r"PositionListOut.pos"
Expand Down
8 changes: 4 additions & 4 deletions misc/examples/positionTransformation.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from misc.positions import PositionList

"""This example demonstrates how to generate execution_engine imaging positions from a set of positions after the sample has been picked up and likely shifted or rotated.
"""This example demonstrates how to generate new imaging positions from a set of positions after the sample has been picked up and likely shifted or rotated.
This method relies on measuring a set of reference positions (at least 3) before and after moving the dish. You can then use these positions to generate an
affine transform. This affine transform can then be applied to your original cell positions in order to generate a execution_engine set of positions for the same cells.
affine transform. This affine transform can then be applied to your original cell positions in order to generate a new set of positions for the same cells.
In the case of a standard cell culture dish it is best to use the corners of the glass coverslip as your reference locations.
"""
preTreatRefPositions = PositionList.load(
Expand All @@ -19,10 +19,10 @@
) # Load the positions of the cells we are measuring before the dish was removed.
postTreatCellPositions = preTreatCellPositions.applyAffineTransform(
transformMatrix
) # Transform the cell positions to the execution_engine expected locations.
) # Transform the cell positions to the new expected locations.
postTreatCellPositions.save(
r"experimentPath\transformedPositions.pos"
) # Save the execution_engine positions to a file that can be loaded by Micro-Manager.
) # Save the new positions to a file that can be loaded by Micro-Manager.

preTreatRefPositions.plot()
postTreatRefPositions.plot()
8 changes: 4 additions & 4 deletions misc/positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def renameXYStage(self, label: str):
"""Change the name of the xy stage.
Args:
label: The execution_engine name for the xy Stage
label: The new name for the xy Stage
"""
self.defaultXYStage = label
self.getXYPosition().renameStage(label)
Expand All @@ -230,7 +230,7 @@ def copy(self) -> MultiStagePosition:
"""Creates a copy fo the object
Returns:
A execution_engine `MultiStagePosition` object.
A new `MultiStagePosition` object.
"""
return copy.deepcopy(self)

Expand Down Expand Up @@ -340,7 +340,7 @@ def renameStage(self, label) -> PositionList:
"""Change the name of the xy stage.
Args:
label: The execution_engine name for the xy Stage
label: The new name for the xy Stage
Returns:
A reference to this object
Expand Down Expand Up @@ -523,7 +523,7 @@ def hover(event):


def generateList(data: np.ndarray) -> PositionList:
"""Example function to create a brand execution_engine position list in python.
"""Example function to create a brand new position list in python.
Args:
data: An Nx2 array of xy coordinates. These coordinates will be converted to a PositionList which can be
Expand Down
6 changes: 3 additions & 3 deletions pycromanager/acq_future.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _add_notifications(self, axes_or_axes_list):

def _notify(self, notification):
"""
Called by the kernel notification dispatcher in order so that it can check off that the notification was
Called by the internal notification dispatcher in order so that it can check off that the notification was
received. Want to store this, rather than just waiting around for it, in case the await methods are called
after the notification has already been sent.
"""
Expand All @@ -66,10 +66,10 @@ def _notify(self, notification):

def _monitor_axes(self, axes_or_axes_list):
"""
In the case where the acquisition future is constructed for a Generator, the event_implementations to be monitored
In the case where the acquisition future is constructed for a Generator, the events to be monitored
are not known until the generator is run. If user code awaits for an event and that event has already
passed, the future must be able to check if the event has already passed and return immediately.
So this function is called by the generator as event_implementations are created to add them to the list of event_implementations to
So this function is called by the generator as events are created to add them to the list of events to
keep track of.
:param axes_or_axes_list: the axes of the event
Expand Down
Loading

0 comments on commit 1e13f6e

Please sign in to comment.