pigeon-tem-comms 0.4.6__tar.gz → 0.4.8__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 (28) hide show
  1. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/PKG-INFO +3 -3
  2. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/README.md +1 -1
  3. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/ui.py +9 -1
  4. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/pigeon_tem_comms.egg-info/PKG-INFO +3 -3
  5. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/pyproject.toml +1 -1
  6. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/tests/test_ui.py +12 -1
  7. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/LICENSE +0 -0
  8. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/__init__.py +0 -0
  9. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/buffer.py +0 -0
  10. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/camera.py +0 -0
  11. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/montage.py +0 -0
  12. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/qc.py +0 -0
  13. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/scope.py +0 -0
  14. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/stage/__init__.py +0 -0
  15. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/stage/aperture.py +0 -0
  16. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/stage/motion.py +0 -0
  17. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/stage/rotation.py +0 -0
  18. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/tile/__init__.py +0 -0
  19. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/TEM_comms/tile/statistics.py +0 -0
  20. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/pigeon_tem_comms.egg-info/SOURCES.txt +0 -0
  21. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/pigeon_tem_comms.egg-info/dependency_links.txt +0 -0
  22. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/pigeon_tem_comms.egg-info/entry_points.txt +0 -0
  23. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/pigeon_tem_comms.egg-info/requires.txt +0 -0
  24. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/pigeon_tem_comms.egg-info/top_level.txt +0 -0
  25. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/setup.cfg +0 -0
  26. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/tests/test_buffer.py +0 -0
  27. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/tests/test_qc.py +0 -0
  28. {pigeon_tem_comms-0.4.6 → pigeon_tem_comms-0.4.8}/tests/test_scope_command.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pigeon-tem-comms
3
- Version: 0.4.6
3
+ Version: 0.4.8
4
4
  Summary: Pigeon messages for the next generation TEM imaging system.
5
5
  Author-email: Cameron Devine <cameron.devine@alleninstitute.org>
6
6
  License: BSD 3 Clause
@@ -19,7 +19,7 @@ License-File: LICENSE
19
19
  Requires-Dist: pigeon-client
20
20
  Requires-Dist: pydantic
21
21
 
22
- [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/AllenInstitute/TEM_comms/test.yaml)](https://github.com/AllenInstitute/TEM_comms/actions)
22
+ [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/AllenInstitute/TEM_comms/main.yaml)](https://github.com/AllenInstitute/TEM_comms/actions)
23
23
  [![PyPI - Version](https://img.shields.io/pypi/v/pigeon-tem-comms)](https://pypi.org/project/pigeon-tem-comms/)
24
24
 
25
25
  # TEM Comms
@@ -1,4 +1,4 @@
1
- [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/AllenInstitute/TEM_comms/test.yaml)](https://github.com/AllenInstitute/TEM_comms/actions)
1
+ [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/AllenInstitute/TEM_comms/main.yaml)](https://github.com/AllenInstitute/TEM_comms/actions)
2
2
  [![PyPI - Version](https://img.shields.io/pypi/v/pigeon-tem-comms)](https://pypi.org/project/pigeon-tem-comms/)
3
3
 
4
4
  # TEM Comms
@@ -1,5 +1,5 @@
1
1
  from pigeon import BaseMessage
2
- from typing import Optional
2
+ from typing import Optional, Literal
3
3
  from pydantic import model_validator
4
4
 
5
5
 
@@ -43,4 +43,12 @@ class Setup(BaseMessage):
43
43
  center_beam: bool = False
44
44
  spread_beam: bool = False
45
45
  find_aperture: bool = False
46
+ calibrate_resolution: bool = False
46
47
  grid: Optional[int] = None
48
+ mag_mode: Optional[Literal["LM", "MAG1", "MAG2"]] = None
49
+ mag: Optional[int] = None
50
+
51
+ @model_validator(mode="after")
52
+ def check_mag(self):
53
+ assert (self.mag_mode is None) == (self.mag is None)
54
+ return self
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pigeon-tem-comms
3
- Version: 0.4.6
3
+ Version: 0.4.8
4
4
  Summary: Pigeon messages for the next generation TEM imaging system.
5
5
  Author-email: Cameron Devine <cameron.devine@alleninstitute.org>
6
6
  License: BSD 3 Clause
@@ -19,7 +19,7 @@ License-File: LICENSE
19
19
  Requires-Dist: pigeon-client
20
20
  Requires-Dist: pydantic
21
21
 
22
- [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/AllenInstitute/TEM_comms/test.yaml)](https://github.com/AllenInstitute/TEM_comms/actions)
22
+ [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/AllenInstitute/TEM_comms/main.yaml)](https://github.com/AllenInstitute/TEM_comms/actions)
23
23
  [![PyPI - Version](https://img.shields.io/pypi/v/pigeon-tem-comms)](https://pypi.org/project/pigeon-tem-comms/)
24
24
 
25
25
  # TEM Comms
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pigeon-tem-comms"
3
- version = "0.4.6"
3
+ version = "0.4.8"
4
4
  authors = [
5
5
  { name="Cameron Devine", email="cameron.devine@alleninstitute.org" },
6
6
  ]
@@ -1,4 +1,4 @@
1
- from TEM_comms.ui import Run
1
+ from TEM_comms.ui import Run, Setup
2
2
  from pydantic import ValidationError
3
3
  import pytest
4
4
 
@@ -16,3 +16,14 @@ def test_run():
16
16
  Run(montage=True, session_id="test", grid_first=1, grid_last=2)
17
17
  msg = Run()
18
18
  assert not msg.montage
19
+
20
+
21
+ def test_setup():
22
+ with pytest.raises(ValidationError):
23
+ Setup(mag_mode="LM")
24
+
25
+ with pytest.raises(ValidationError):
26
+ Setup(mag=10)
27
+
28
+ Setup()
29
+ Setup(mag_mode="LM", mag=1)