Skip to content

Commit

Permalink
a huge commit where this library was refactored into Pigeon and this …
Browse files Browse the repository at this point in the history
…repo is now just message definitions
  • Loading branch information
CameronDevine committed May 30, 2024
1 parent f712979 commit 9638bb3
Show file tree
Hide file tree
Showing 34 changed files with 72 additions and 630 deletions.
9 changes: 0 additions & 9 deletions Dockerfile.publisher

This file was deleted.

8 changes: 0 additions & 8 deletions Dockerfile.subscriber

This file was deleted.

11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright 2024 Allen Institute

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/AllenInstitute/TEM_comms/test.yaml)](https://github.com/AllenInstitute/TEM_comms/actions)
[![PyPI - Version](https://img.shields.io/pypi/v/pigeon-tem-comms)](https://pypi.org/project/pigeon-tem-comms/)

# TEM Comms

TEM Comms is a set of [Pydantic](https://docs.pydantic.dev/latest/) models to be used as messages with [Pigeon](https://github.com/AllenInstitute/pigeon) for the [Allen Institute's](https://alleninstitute.org/) next generation transmission electron microscope (TEM) [image acquisition system](https://alleninstitute.github.io/TEM_architecture/).
38 changes: 37 additions & 1 deletion TEM_comms/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
from .client import TEMComms
from . import buffer
from . import camera
from . import scope
from . import stage
from . import tile

import importlib.metadata


__version__ = importlib.metadata.version("TEM_comms")

topics = {
"buffer.status": buffer.Status,
"camera.command": camera.Command,
"camera.image": camera.Image,
"camera.settings": camera.Settings,
"camera.status": camera.Status,
"scope.command": scope.Command,
"scope.status": scope.Status,
"stage.aperture.command": stage.aperture.Command,
"stage.aperture.status": stage.aperture.Status,
"stage.motion.command": stage.motion.Command,
"stage.motion.status": stage.motion.Status,
"stage.rotation.command": stage.rotation.Command,
"stage.rotation.status": stage.rotation.Status,
"tile.jpeg": tile.JPEG,
"tile.minimap": tile.Minimap,
"tile.processed": tile.Processed,
"tile.raw": tile.Raw,
"tile.statistics.focus": tile.statistics.Focus,
"tile.statistics.histogram": tile.statistics.Histogram,
"tile.statistics.min_max_mean": tile.statistics.MinMaxMean,
"tile.transform": tile.Transform,
}


msgs = (topics, __version__)
55 changes: 0 additions & 55 deletions TEM_comms/__main__.py

This file was deleted.

2 changes: 1 addition & 1 deletion TEM_comms/msgs/buffer.py → TEM_comms/buffer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .base import BaseMessage
from emarfarap import BaseMessage


class Status(BaseMessage):
Expand Down
2 changes: 1 addition & 1 deletion TEM_comms/msgs/camera.py → TEM_comms/camera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .base import BaseMessage
from emarfarap import BaseMessage

class Command(BaseMessage):
tile_id: str
Expand Down
139 changes: 0 additions & 139 deletions TEM_comms/client.py

This file was deleted.

5 changes: 0 additions & 5 deletions TEM_comms/exceptions.py

This file was deleted.

13 changes: 0 additions & 13 deletions TEM_comms/logging.py

This file was deleted.

29 changes: 0 additions & 29 deletions TEM_comms/msgs/__init__.py

This file was deleted.

12 changes: 0 additions & 12 deletions TEM_comms/msgs/base.py

This file was deleted.

2 changes: 1 addition & 1 deletion TEM_comms/msgs/scope.py → TEM_comms/scope.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .base import BaseMessage
from emarfarap import BaseMessage
from typing import Literal
from pydantic import model_validator

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from TEM_comms.msgs.base import BaseMessage
from emarfarap import BaseMessage

class Command(BaseMessage):
aperture_id: int | None = None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..base import BaseMessage
from emarfarap import BaseMessage

class Command(BaseMessage):
x: int | None = None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..base import BaseMessage
from emarfarap import BaseMessage

class Command(BaseMessage):
angle_x: float | None = None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..base import BaseMessage
from emarfarap import BaseMessage
from . import statistics


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..base import BaseMessage
from emarfarap import BaseMessage

class Focus(BaseMessage):
tile_id: str
Expand Down
4 changes: 0 additions & 4 deletions dev-requirements.in

This file was deleted.

Loading

0 comments on commit 9638bb3

Please sign in to comment.