pigeon-tem-comms 0.1.0__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/PKG-INFO +11 -1
  2. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/__init__.py +6 -2
  3. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/buffer.py +1 -1
  4. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/camera.py +1 -1
  5. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/scope.py +1 -1
  6. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/stage/aperture.py +1 -1
  7. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/stage/motion.py +1 -1
  8. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/stage/rotation.py +1 -1
  9. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/tile/__init__.py +1 -1
  10. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/tile/statistics.py +1 -1
  11. pigeon_tem_comms-0.2.0/TEM_comms/ui.py +42 -0
  12. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/PKG-INFO +11 -1
  13. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/SOURCES.txt +3 -1
  14. pigeon_tem_comms-0.2.0/pyproject.toml +30 -0
  15. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/tests/test_buffer.py +1 -1
  16. pigeon_tem_comms-0.2.0/tests/test_ui.py +18 -0
  17. pigeon_tem_comms-0.1.0/pyproject.toml +0 -16
  18. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/LICENSE +0 -0
  19. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/README.md +0 -0
  20. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/TEM_comms/stage/__init__.py +0 -0
  21. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/dependency_links.txt +0 -0
  22. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/entry_points.txt +0 -0
  23. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/requires.txt +0 -0
  24. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/top_level.txt +0 -0
  25. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/setup.cfg +0 -0
  26. {pigeon_tem_comms-0.1.0 → pigeon_tem_comms-0.2.0}/tests/test_scope_command.py +0 -0
@@ -1,8 +1,18 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pigeon-tem-comms
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Pigeon messages for the next generation TEM imaging system.
5
5
  Author-email: Cameron Devine <cameron.devine@alleninstitute.org>
6
+ License: BSD 3 Clause
7
+ Project-URL: Homepage, https://github.com/AllenInstitute/TEM_comms
8
+ Project-URL: Documentation, https://alleninstitute.github.io/TEM_architecture/topics.html
9
+ Project-URL: Repository, https://github.com/AllenInstitute/TEM_comms
10
+ Project-URL: Issues, https://github.com/AllenInstitute/TEM_comms/issues
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: BSD License
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
6
16
  Requires-Python: >=3.10
7
17
  Description-Content-Type: text/markdown
8
18
  License-File: LICENSE
@@ -3,11 +3,12 @@ from . import camera
3
3
  from . import scope
4
4
  from . import stage
5
5
  from . import tile
6
+ from . import ui
6
7
 
7
8
  import importlib.metadata
8
9
 
9
10
 
10
- __version__ = importlib.metadata.version("TEM_comms")
11
+ __version__ = importlib.metadata.version("pigeon-tem-comms")
11
12
 
12
13
  topics = {
13
14
  "buffer.status": buffer.Status,
@@ -31,7 +32,10 @@ topics = {
31
32
  "tile.statistics.histogram": tile.statistics.Histogram,
32
33
  "tile.statistics.min_max_mean": tile.statistics.MinMaxMean,
33
34
  "tile.transform": tile.Transform,
35
+ "ui.edit": ui.Edit,
36
+ "ui.run": ui.Run,
37
+ "ui.setup": ui.Setup,
34
38
  }
35
39
 
36
40
 
37
- msgs = (topics, __version__)
41
+ msgs = (topics, __version__)
@@ -1,4 +1,4 @@
1
- from emarfarap import BaseMessage
1
+ from pigeon import BaseMessage
2
2
 
3
3
 
4
4
  class Status(BaseMessage):
@@ -1,4 +1,4 @@
1
- from emarfarap import BaseMessage
1
+ from pigeon import BaseMessage
2
2
 
3
3
  class Command(BaseMessage):
4
4
  tile_id: str
@@ -1,4 +1,4 @@
1
- from emarfarap import BaseMessage
1
+ from pigeon import BaseMessage
2
2
  from typing import Literal
3
3
  from pydantic import model_validator
4
4
 
@@ -1,4 +1,4 @@
1
- from emarfarap import BaseMessage
1
+ from pigeon import BaseMessage
2
2
 
3
3
  class Command(BaseMessage):
4
4
  aperture_id: int | None = None
@@ -1,4 +1,4 @@
1
- from emarfarap import BaseMessage
1
+ from pigeon import BaseMessage
2
2
 
3
3
  class Command(BaseMessage):
4
4
  x: int | None = None
@@ -1,4 +1,4 @@
1
- from emarfarap import BaseMessage
1
+ from pigeon import BaseMessage
2
2
 
3
3
  class Command(BaseMessage):
4
4
  angle_x: float | None = None
@@ -1,4 +1,4 @@
1
- from emarfarap import BaseMessage
1
+ from pigeon import BaseMessage
2
2
  from . import statistics
3
3
 
4
4
 
@@ -1,4 +1,4 @@
1
- from emarfarap import BaseMessage
1
+ from pigeon import BaseMessage
2
2
 
3
3
  class Focus(BaseMessage):
4
4
  tile_id: str
@@ -0,0 +1,42 @@
1
+ from pigeon import BaseMessage
2
+ from typing import Optional
3
+ from pydantic import model_validator
4
+
5
+
6
+ class Edit(BaseMessage):
7
+ roi_id: str
8
+ roi_pos_x: int
9
+ roi_pox_y: int
10
+ roi_width: int
11
+ roi_height: int
12
+ roi_angle: float
13
+
14
+
15
+ class Run(BaseMessage):
16
+ session_id: Optional[str] = None
17
+ grid_first: Optional[int] = None
18
+ grid_last: Optional[int] = None
19
+ montage: bool = False
20
+ abort_now: bool = False
21
+ abort_at_end: bool = False
22
+ resume: bool = False
23
+
24
+ @model_validator(mode="after")
25
+ def check_grid(self):
26
+ assert self.montage != (self.grid_first is None)
27
+ assert self.montage != (self.grid_last is None)
28
+ return self
29
+
30
+ @model_validator(mode="after")
31
+ def check_session(self):
32
+ assert self.montage != (self.session_id is None)
33
+ return self
34
+
35
+
36
+ class Setup(BaseMessage):
37
+ conch_owner: Optional[str] = None
38
+ auto_focus: bool = False
39
+ auto_exposure: bool = False
40
+ lens_correction: bool = False
41
+ acquire_brightfield: bool = False
42
+ acquire_darkfield: bool = False
@@ -1,8 +1,18 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pigeon-tem-comms
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Pigeon messages for the next generation TEM imaging system.
5
5
  Author-email: Cameron Devine <cameron.devine@alleninstitute.org>
6
+ License: BSD 3 Clause
7
+ Project-URL: Homepage, https://github.com/AllenInstitute/TEM_comms
8
+ Project-URL: Documentation, https://alleninstitute.github.io/TEM_architecture/topics.html
9
+ Project-URL: Repository, https://github.com/AllenInstitute/TEM_comms
10
+ Project-URL: Issues, https://github.com/AllenInstitute/TEM_comms/issues
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: BSD License
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
6
16
  Requires-Python: >=3.10
7
17
  Description-Content-Type: text/markdown
8
18
  License-File: LICENSE
@@ -5,6 +5,7 @@ TEM_comms/__init__.py
5
5
  TEM_comms/buffer.py
6
6
  TEM_comms/camera.py
7
7
  TEM_comms/scope.py
8
+ TEM_comms/ui.py
8
9
  TEM_comms/stage/__init__.py
9
10
  TEM_comms/stage/aperture.py
10
11
  TEM_comms/stage/motion.py
@@ -18,4 +19,5 @@ pigeon_tem_comms.egg-info/entry_points.txt
18
19
  pigeon_tem_comms.egg-info/requires.txt
19
20
  pigeon_tem_comms.egg-info/top_level.txt
20
21
  tests/test_buffer.py
21
- tests/test_scope_command.py
22
+ tests/test_scope_command.py
23
+ tests/test_ui.py
@@ -0,0 +1,30 @@
1
+ [project]
2
+ name = "pigeon-tem-comms"
3
+ version = "0.2.0"
4
+ authors = [
5
+ { name="Cameron Devine", email="cameron.devine@alleninstitute.org" },
6
+ ]
7
+ description = "Pigeon messages for the next generation TEM imaging system."
8
+ readme = "README.md"
9
+ requires-python = ">=3.10"
10
+ dependencies = [
11
+ "pigeon-client",
12
+ "pydantic",
13
+ ]
14
+ license = {text = "BSD 3 Clause"}
15
+ classifiers = [
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: BSD License",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ ]
22
+
23
+ [project.entry-points."pigeon.msgs"]
24
+ msgs = "TEM_comms:msgs"
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/AllenInstitute/TEM_comms"
28
+ Documentation = "https://alleninstitute.github.io/TEM_architecture/topics.html"
29
+ Repository = "https://github.com/AllenInstitute/TEM_comms"
30
+ Issues = "https://github.com/AllenInstitute/TEM_comms/issues"
@@ -1,7 +1,7 @@
1
1
  import re
2
2
 
3
3
  import pytest
4
- from TEM_comms.msgs.buffer import Status
4
+ from TEM_comms.buffer import Status
5
5
 
6
6
  from pydantic import ValidationError
7
7
 
@@ -0,0 +1,18 @@
1
+ from TEM_comms.ui import Run
2
+ from pydantic import ValidationError
3
+ import pytest
4
+
5
+
6
+ def test_run():
7
+ with pytest.raises(ValidationError):
8
+ Run(montage=True, session_id="test", grid_first=1)
9
+
10
+ with pytest.raises(ValidationError):
11
+ Run(montage=True, session_id="test", grid_last=2)
12
+
13
+ with pytest.raises(ValidationError):
14
+ Run(montage=True, grid_first=1, grid_last=2)
15
+
16
+ Run(montage=True, session_id="test", grid_first=1, grid_last=2)
17
+ msg = Run()
18
+ assert not msg.montage
@@ -1,16 +0,0 @@
1
- [project]
2
- name = "pigeon-tem-comms"
3
- version = "0.1.0"
4
- authors = [
5
- { name="Cameron Devine", email="cameron.devine@alleninstitute.org" },
6
- ]
7
- description = "Pigeon messages for the next generation TEM imaging system."
8
- readme = "README.md"
9
- requires-python = ">=3.10"
10
- dependencies = [
11
- "pigeon-client",
12
- "pydantic",
13
- ]
14
-
15
- [project.entry-points."pigeon.msgs"]
16
- msgs = "TEM_comms:msgs"