deapi 5.2.1__tar.gz → 5.2.2__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 (108) hide show
  1. {deapi-5.2.1 → deapi-5.2.2}/.github/workflows/build.yaml +14 -2
  2. {deapi-5.2.1 → deapi-5.2.2}/.github/workflows/documentation.yaml +2 -1
  3. {deapi-5.2.1 → deapi-5.2.2}/.pre-commit-config.yaml +1 -1
  4. deapi-5.2.2/LICENSE +21 -0
  5. {deapi-5.2.1 → deapi-5.2.2}/PKG-INFO +6 -2
  6. {deapi-5.2.1 → deapi-5.2.2}/README.md +2 -2
  7. {deapi-5.2.1 → deapi-5.2.2}/deapi/client.py +771 -210
  8. {deapi-5.2.1 → deapi-5.2.2}/deapi/data_types.py +62 -8
  9. {deapi-5.2.1 → deapi-5.2.2}/deapi/fake_data/__init__.py +1 -2
  10. {deapi-5.2.1 → deapi-5.2.2}/deapi/prop_dump.json +121 -1
  11. deapi-5.2.2/deapi/service/de_service.py +549 -0
  12. {deapi-5.2.1 → deapi-5.2.2}/deapi/simulated_server/fake_server.py +139 -58
  13. {deapi-5.2.1 → deapi-5.2.2}/deapi/simulated_server/initialize_server.py +1 -1
  14. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/conftest.py +72 -0
  15. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/test_legacy.py +6 -2
  16. deapi-5.2.2/deapi/tests/speed_tests/test_internal_file_saving.py +166 -0
  17. deapi-5.2.2/deapi/tests/test_binning_rois/test_rois.py +21 -0
  18. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/test_client.py +132 -14
  19. deapi-5.2.2/deapi/tests/test_examples.py +48 -0
  20. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/test_fake_server/test_server.py +1 -1
  21. deapi-5.2.2/deapi/tests/test_file_saving/__init__.py +0 -0
  22. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/test_file_saving/test_file_loading_libertem.py +16 -4
  23. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/test_file_saving/test_file_loading_rsciio.py +10 -7
  24. deapi-5.2.2/deapi/tests/test_file_saving/test_h5ebsd.py +50 -0
  25. deapi-5.2.2/deapi/tests/test_file_saving/test_scan_pattern_saving.py +139 -0
  26. deapi-5.2.2/deapi/tests/test_insitu/__init__.py +0 -0
  27. deapi-5.2.2/deapi/tests/test_insitu/test_start_stop.py +50 -0
  28. deapi-5.2.2/deapi/tests/test_utils/__init__.py +0 -0
  29. deapi-5.2.2/deapi/tests/test_utils/test_utils.py +112 -0
  30. deapi-5.2.2/deapi/utils.py +68 -0
  31. deapi-5.2.2/deapi/version.py +3 -0
  32. deapi-5.2.2/deapi/wrappers.py +73 -0
  33. {deapi-5.2.1 → deapi-5.2.2}/deapi.egg-info/PKG-INFO +6 -2
  34. {deapi-5.2.1 → deapi-5.2.2}/deapi.egg-info/SOURCES.txt +16 -0
  35. {deapi-5.2.1 → deapi-5.2.2}/deapi.egg-info/entry_points.txt +1 -0
  36. {deapi-5.2.1 → deapi-5.2.2}/deapi.egg-info/requires.txt +3 -0
  37. deapi-5.2.2/examples/live_imaging/bright_spot_intensity.py +71 -0
  38. deapi-5.2.2/examples/live_imaging/taking_an_image_every_minute.py +65 -0
  39. {deapi-5.2.1 → deapi-5.2.2}/examples/live_imaging/viewing_the_sensor.py +15 -2
  40. deapi-5.2.2/examples/live_imaging/viewing_the_sensor_tem.py +61 -0
  41. deapi-5.2.2/examples/references/README.rst +3 -0
  42. {deapi-5.2.1 → deapi-5.2.2}/examples/setting_parameters/setting_up_stem.py +7 -5
  43. {deapi-5.2.1 → deapi-5.2.2}/examples/virtual_imaging/setting_virtual_masks.py +8 -4
  44. {deapi-5.2.1 → deapi-5.2.2}/examples/virtual_imaging/vdf_vbf.py +23 -5
  45. {deapi-5.2.1 → deapi-5.2.2}/pyproject.toml +5 -1
  46. deapi-5.2.1/deapi/tests/speed_tests/test_internal_file_saving.py +0 -54
  47. deapi-5.2.1/deapi/tests/test_file_saving/test_scan_pattern_saving.py +0 -68
  48. deapi-5.2.1/deapi/version.py +0 -3
  49. {deapi-5.2.1 → deapi-5.2.2}/.github/workflows/publish.yaml +0 -0
  50. {deapi-5.2.1 → deapi-5.2.2}/.github/workflows/test-publish.yaml +0 -0
  51. {deapi-5.2.1 → deapi-5.2.2}/CHANGES.rst +0 -0
  52. {deapi-5.2.1 → deapi-5.2.2}/deapi/__init__.py +0 -0
  53. {deapi-5.2.1 → deapi-5.2.2}/deapi/buffer_protocols/__init__.py +0 -0
  54. {deapi-5.2.1 → deapi-5.2.2}/deapi/buffer_protocols/pb_2_3_0.py +0 -0
  55. {deapi-5.2.1 → deapi-5.2.2}/deapi/buffer_protocols/pb_3_11_4.py +0 -0
  56. {deapi-5.2.1 → deapi-5.2.2}/deapi/buffer_protocols/pb_3_19_3.py +0 -0
  57. {deapi-5.2.1 → deapi-5.2.2}/deapi/buffer_protocols/pb_3_23_3.py +0 -0
  58. {deapi-5.2.1 → deapi-5.2.2}/deapi/buffer_protocols/pb_3_6_1.py +0 -0
  59. {deapi-5.2.1 → deapi-5.2.2}/deapi/conf.py +0 -0
  60. {deapi-5.2.1 → deapi-5.2.2}/deapi/fake_data/base_fake_data.py +0 -0
  61. {deapi-5.2.1 → deapi-5.2.2}/deapi/fake_data/grains.py +0 -0
  62. {deapi-5.2.1 → deapi-5.2.2}/deapi/index.rst +0 -0
  63. {deapi-5.2.1 → deapi-5.2.2}/deapi/python_3_instruction.txt +0 -0
  64. {deapi-5.2.1 → deapi-5.2.2}/deapi/release_notes.txt +0 -0
  65. {deapi-5.2.1 → deapi-5.2.2}/deapi/simulated_server/__init__.py +0 -0
  66. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/__init__.py +0 -0
  67. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/01_fps.py +0 -0
  68. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/02_hwRoisize.py +0 -0
  69. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/03_hwBinning.py +0 -0
  70. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/04_swBinning.py +0 -0
  71. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/05_swhwBinning.py +0 -0
  72. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/06_patternPixel.py +0 -0
  73. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/07_reference.py +0 -0
  74. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/08_virtmask.py +0 -0
  75. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/09_scanRoi.py +0 -0
  76. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/10_imageStatistics.py +0 -0
  77. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/__init__.py +0 -0
  78. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/func.py +0 -0
  79. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/original_tests/propertyName.py +0 -0
  80. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/speed_tests/__init__.py +0 -0
  81. {deapi-5.2.1 → deapi-5.2.2}/deapi/tests/speed_tests/test_movie_buffer_transfer.py +0 -0
  82. {deapi-5.2.1/deapi/tests/test_fake_server → deapi-5.2.2/deapi/tests/test_binning_rois}/__init__.py +0 -0
  83. {deapi-5.2.1/deapi/tests/test_file_saving → deapi-5.2.2/deapi/tests/test_fake_server}/__init__.py +0 -0
  84. {deapi-5.2.1 → deapi-5.2.2}/deapi.egg-info/dependency_links.txt +0 -0
  85. {deapi-5.2.1 → deapi-5.2.2}/deapi.egg-info/top_level.txt +0 -0
  86. {deapi-5.2.1 → deapi-5.2.2}/doc/Makefile +0 -0
  87. {deapi-5.2.1 → deapi-5.2.2}/doc/_static/de_api_icon.svg +0 -0
  88. {deapi-5.2.1 → deapi-5.2.2}/doc/_templates/autosummary/base.rst +0 -0
  89. {deapi-5.2.1 → deapi-5.2.2}/doc/_templates/custom-attribute-template.rst +0 -0
  90. {deapi-5.2.1 → deapi-5.2.2}/doc/_templates/custom-class-template.rst +0 -0
  91. {deapi-5.2.1 → deapi-5.2.2}/doc/_templates/custom-function-template.rst +0 -0
  92. {deapi-5.2.1 → deapi-5.2.2}/doc/_templates/custom-module-template.rst +0 -0
  93. {deapi-5.2.1 → deapi-5.2.2}/doc/_templates/custrom-method-template.rst +0 -0
  94. {deapi-5.2.1 → deapi-5.2.2}/doc/changes.rst +0 -0
  95. {deapi-5.2.1 → deapi-5.2.2}/doc/conf.py +0 -0
  96. {deapi-5.2.1 → deapi-5.2.2}/doc/help/dev_guide.rst +0 -0
  97. {deapi-5.2.1 → deapi-5.2.2}/doc/help/help.rst +0 -0
  98. {deapi-5.2.1 → deapi-5.2.2}/doc/help/index.rst +0 -0
  99. {deapi-5.2.1 → deapi-5.2.2}/doc/help/pyDEServer.rst +0 -0
  100. {deapi-5.2.1 → deapi-5.2.2}/doc/index.rst +0 -0
  101. {deapi-5.2.1 → deapi-5.2.2}/doc/intro.rst +0 -0
  102. {deapi-5.2.1 → deapi-5.2.2}/doc/make.bat +0 -0
  103. {deapi-5.2.1 → deapi-5.2.2}/doc/reference/index.rst +0 -0
  104. {deapi-5.2.1 → deapi-5.2.2}/examples/README.rst +0 -0
  105. {deapi-5.2.1 → deapi-5.2.2}/examples/live_imaging/README.rst +0 -0
  106. {deapi-5.2.1 → deapi-5.2.2}/examples/setting_parameters/README.rst +0 -0
  107. {deapi-5.2.1 → deapi-5.2.2}/examples/virtual_imaging/README.rst +0 -0
  108. {deapi-5.2.1 → deapi-5.2.2}/setup.cfg +0 -0
@@ -17,10 +17,10 @@ jobs:
17
17
  fail-fast: false
18
18
  matrix:
19
19
  os: [ubuntu-latest, windows-latest, macos-latest]
20
- python-version: ["3.10", "3.11", "3.12"]
20
+ python-version: ["3.11", "3.12"]
21
21
  include:
22
22
  - os: ubuntu-latest
23
- python-version: 3.10
23
+ python-version: 3.11
24
24
 
25
25
  DEPENDENCIES: protobuf==5.26.0
26
26
  LABEL: -oldest
@@ -32,6 +32,18 @@ jobs:
32
32
  with:
33
33
  python-version: ${{ matrix.python-version }}
34
34
 
35
+ - name: Get the number of CPUs
36
+ id: cpus
37
+ run: |
38
+ import os, platform
39
+ num_cpus = os.cpu_count()
40
+ print(f"Number of CPU: {num_cpus}")
41
+ print(f"Architecture: {platform.machine()}")
42
+ output_file = os.environ["GITHUB_OUTPUT"]
43
+ with open(output_file, "a", encoding="utf-8") as output_stream:
44
+ output_stream.write(f"count={num_cpus}\n")
45
+ shell: python
46
+
35
47
  - name: Install dependencies and package
36
48
  shell: bash
37
49
  run: |
@@ -22,8 +22,9 @@ jobs:
22
22
  pip install -U -e .'[doc]'
23
23
 
24
24
  - name: Sphinx build
25
+ timeout-minutes: 15
25
26
  run: |
26
- python deapi/simulated_server/initialize_server.py 13241 &
27
+ python deapi/simulated_server/initialize_server.py 13240 &
27
28
  sleep 5 &&
28
29
  sphinx-build doc _build &&
29
30
  kill %1
@@ -1,7 +1,7 @@
1
1
  repos:
2
2
  - repo: https://github.com/psf/black
3
3
  # Version can be updated by running "pre-commit autoupdate"
4
- rev: 24.10.0
4
+ rev: 25.1.0
5
5
  hooks:
6
6
  - id: black
7
7
  ci:
deapi-5.2.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Direct Electron
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: deapi
3
- Version: 5.2.1
3
+ Version: 5.2.2
4
4
  Summary: API for DE Server
5
5
  Author: Direct Electron
6
6
  Project-URL: Bug Reports, https://github.com/directelectron/deapi/issues
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Topic :: Scientific/Engineering
21
21
  Requires-Python: >=3.8
22
+ License-File: LICENSE
22
23
  Requires-Dist: numpy>=1.20.0
23
24
  Requires-Dist: protobuf
24
25
  Requires-Dist: pillow
@@ -37,7 +38,10 @@ Requires-Dist: pytest-cov; extra == "tests"
37
38
  Requires-Dist: pytest-xprocess; extra == "tests"
38
39
  Requires-Dist: libertem; extra == "tests"
39
40
  Requires-Dist: hyperspy; extra == "tests"
41
+ Provides-Extra: service
42
+ Requires-Dist: pyqt6; extra == "service"
40
43
  Provides-Extra: doc
41
44
  Requires-Dist: sphinx; extra == "doc"
42
45
  Requires-Dist: pydata_sphinx_theme; extra == "doc"
43
46
  Requires-Dist: sphinx-gallery; extra == "doc"
47
+ Dynamic: license-file
@@ -1,8 +1,8 @@
1
1
  DE API - Python
2
2
  ===============
3
3
 
4
- The DE API provides python bindings for basic operations for controlling the DEServer. This API isn't functional without
5
- a working copy of DEServer and a Direct Electron Detector.
4
+ The DE API provides python bindings for basic operations for controlling Direct Electron's Mission Control Software. This API isn't functional without
5
+ a working copy of Mission Control, (or the older DE Server) and a Direct Electron Detector.
6
6
 
7
7
 
8
8
  Installation