pymodaq_plugins_utils 5.0.5__tar.gz → 5.0.7__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 (31) hide show
  1. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/.github/workflows/Test.yml +2 -2
  2. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/.github/workflows/Testbase.yml +3 -3
  3. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/.github/workflows/compatibility.yml +2 -2
  4. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/.github/workflows/python-publish.yml +2 -2
  5. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/.github/workflows/updater.yml +1 -1
  6. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/PKG-INFO +7 -4
  7. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/README.rst +1 -1
  8. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/pyproject.toml +6 -1
  9. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/hardware/camera_base_pylablib.py +6 -1
  10. pymodaq_plugins_utils-5.0.7/tests/import_report_pymodaq_plugins_utils_None.txt +1 -0
  11. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/tests/test_plugin_package_structure.py +0 -23
  12. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/.gitattributes +0 -0
  13. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/.gitignore +0 -0
  14. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/LICENSE +0 -0
  15. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/hatch_build.py +0 -0
  16. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/icon.ico +0 -0
  17. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/__init__.py +0 -0
  18. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/app/__init__.py +0 -0
  19. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/exporters/__init__.py +0 -0
  20. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/extensions/__init__.py +0 -0
  21. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/extensions/custom_extension_template.py +0 -0
  22. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/hardware/__init__.py +0 -0
  23. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/hardware/base.py +0 -0
  24. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/hardware/serial_ports.py +0 -0
  25. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/hardware/visa.py +0 -0
  26. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/models/__init__.py +0 -0
  27. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/resources/__init__.py +0 -0
  28. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/resources/config_template.toml +0 -0
  29. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/scanners/__init__.py +0 -0
  30. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/src/pymodaq_plugins_utils/utils.py +0 -0
  31. {pymodaq_plugins_utils-5.0.5 → pymodaq_plugins_utils-5.0.7}/tests/hardware_test.py +0 -0
@@ -6,5 +6,5 @@ jobs:
6
6
  call_workflow:
7
7
  uses: ./.github/workflows/Testbase.yml
8
8
  with:
9
- python: '3.11'
10
- qt5: 'pyqt5'
9
+ python: '3.12'
10
+ qt5: 'pyside6'
@@ -18,9 +18,9 @@ jobs:
18
18
  QT_DEBUG_PLUGINS: 1
19
19
  steps:
20
20
  - name: Set up Python ${{ inputs.python }}
21
- uses: actions/checkout@v6.0.3
21
+ uses: actions/checkout@v7.0.1
22
22
  - name: Install dependencies
23
- uses: actions/setup-python@v6.2.0
23
+ uses: actions/setup-python@v7.0.0
24
24
  with:
25
25
  python-version: ${{ inputs.python }}
26
26
  - name: Install package
@@ -41,4 +41,4 @@ jobs:
41
41
  flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=src/pymodaq/resources/QtDesigner_Ressources,docs
42
42
  - name: Test with pytest
43
43
  run: |
44
- pytest -n auto -k "not test_compatibility"
44
+ pytest -n auto
@@ -36,10 +36,10 @@ jobs:
36
36
  echo "plugin_name=$(echo '${{ github.repository }}' | cut -d'/' -f2)" >> $GITHUB_ENV
37
37
 
38
38
  - name: Checkout the repo
39
- uses: actions/checkout@v6.0.3
39
+ uses: actions/checkout@v7.0.1
40
40
 
41
41
  - name: Set up Python ${{ matrix.python-version }}
42
- uses: actions/setup-python@v6.2.0
42
+ uses: actions/setup-python@v7.0.0
43
43
  with:
44
44
  python-version: ${{ matrix.python-version }}
45
45
 
@@ -13,9 +13,9 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
 
15
15
  steps:
16
- - uses: actions/checkout@v6.0.3
16
+ - uses: actions/checkout@v7.0.1
17
17
  - name: Set up Python
18
- uses: actions/setup-python@v6.2.0
18
+ uses: actions/setup-python@v7.0.0
19
19
  with:
20
20
  python-version: '3.13'
21
21
  - name: Install dependencies
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v6.0.3
15
+ - uses: actions/checkout@v7.0.1
16
16
  with:
17
17
  # [Required] Access token with `workflow` scope.
18
18
  token: ${{ secrets.WORKFLOW_SECRET }}
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: pymodaq_plugins_utils
3
- Version: 5.0.5
3
+ Version: 5.0.7
4
4
  Summary: Set of utility methods and classes to interact with instruments
5
5
  Project-URL: Homepage, https://pymodaq.cnrs.fr
6
6
  Project-URL: Documentation , https://pymodaq.cnrs.fr
7
7
  Project-URL: Repository , https://github.com/PyMoDAQ/pymodaq_plugins_utils
8
- Author-email: Weber Sebastien <sebastien.weber@cemes.fr>
8
+ Author-email: Weber Sebastien <sebastien.weber@cemes.fr>, Schouder Constant <constant.schouder@universite-paris-saclay.fr>
9
9
  Maintainer-email: Weber Sebastien <sebastien.weber@cemes.fr>
10
10
  License: The MIT License (MIT)
11
11
 
@@ -44,6 +44,9 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
44
44
  Classifier: Topic :: Software Development :: User Interfaces
45
45
  Requires-Python: >=3.8
46
46
  Requires-Dist: pymodaq>=5.0.0
47
+ Provides-Extra: camera
48
+ Requires-Dist: opencv-python; extra == 'camera'
49
+ Requires-Dist: pylablib; extra == 'camera'
47
50
  Provides-Extra: serial
48
51
  Requires-Dist: pyserial; extra == 'serial'
49
52
  Requires-Dist: pyvisa; extra == 'serial'
@@ -75,7 +78,7 @@ Authors
75
78
  =======
76
79
 
77
80
  * Sebastien J. Weber (sebastien.weber@cemes.fr)
78
- * Other author (myotheremail@xxx.org)
81
+ * Constant Schouder (constant.schouder@universite-paris-saclay.fr)
79
82
 
80
83
  .. if needed use this field
81
84
 
@@ -24,7 +24,7 @@ Authors
24
24
  =======
25
25
 
26
26
  * Sebastien J. Weber (sebastien.weber@cemes.fr)
27
- * Other author (myotheremail@xxx.org)
27
+ * Constant Schouder (constant.schouder@universite-paris-saclay.fr)
28
28
 
29
29
  .. if needed use this field
30
30
 
@@ -14,6 +14,11 @@ serial = [
14
14
  "pyserial",
15
15
  ]
16
16
 
17
+ camera = [
18
+ "pylablib",
19
+ "opencv-python",
20
+ ]
21
+
17
22
  [project]
18
23
  name = "pymodaq_plugins_utils"
19
24
  description = 'Set of utility methods and classes to interact with instruments'
@@ -24,7 +29,7 @@ dependencies = [
24
29
 
25
30
  authors = [
26
31
  {name = "Weber Sebastien", email = "sebastien.weber@cemes.fr"},
27
- #todo: list here all authors of your plugin
32
+ {name = "Schouder Constant", email = "constant.schouder@universite-paris-saclay.fr"},
28
33
  ]
29
34
  maintainers = [
30
35
  {name = "Weber Sebastien", email = "sebastien.weber@cemes.fr"},
@@ -86,6 +86,11 @@ class CameraCallback(QtCore.QObject):
86
86
  while ind_frames < mode.nframes:
87
87
  self.controller.wait_for_frame(since='now')
88
88
  new_frames, rng = self.controller.read_multiple_images(missing_frame='skip', return_rng=True)
89
+
90
+ # in case hardware has a random buffer size (ex: Andor CCD cameras)
91
+ if new_frames.shape[0] != mode.nframes:
92
+ new_frames = np.expand_dims(new_frames[-mode.nframes:], axis=0)
93
+
89
94
  if ind_average == 0 and ind_frames == 0:
90
95
  shape = list(new_frames.shape[1:])
91
96
  shape = [mode.n_average, mode.nframes] + shape
@@ -300,7 +305,7 @@ class CameraBasePyLabLib(DAQ_Viewer_base):
300
305
  self.settings.child('buffer', 'mode').setReadonly(True)
301
306
 
302
307
 
303
- self.callback_thread = QtCore.QThread() # creation of a Qt5 thread
308
+ self.callback_thread = QtCore.QThread(self) # creation of a Qt5 thread
304
309
  callback.moveToThread(self.callback_thread) # callback object will live within this thread
305
310
 
306
311
  callback.data_sig.connect(
@@ -0,0 +1 @@
1
+ "from pymodaq_plugins_template.utils import Config" in C:\Users\weber\Labo\ProgrammesPython\PyMoDAQ_Git\pymodaq_plugins_folder\pymodaq_plugins_utils\src\pymodaq_plugins_utils\extensions\custom_extension_template.py (12)
@@ -60,14 +60,6 @@ def test_imports():
60
60
  mod = importlib.import_module(pkg_name)
61
61
  assert hasattr(mod, 'config')
62
62
  assert hasattr(mod, '__version__')
63
- move_mod = importlib.import_module(f'{pkg_name}', 'daq_move_plugins')
64
- importlib.import_module(f'{pkg_name}', 'daq_viewer_plugins')
65
- importlib.import_module(f'{pkg_name}', 'extensions')
66
- importlib.import_module(f'{pkg_name}', 'models')
67
- importlib.import_module(f'{pkg_name}.daq_viewer_plugins', 'plugins_0D')
68
- importlib.import_module(f'{pkg_name}.daq_viewer_plugins', 'plugins_1D')
69
- importlib.import_module(f'{pkg_name}.daq_viewer_plugins', 'plugins_2D')
70
- importlib.import_module(f'{pkg_name}.daq_viewer_plugins', 'plugins_ND')
71
63
 
72
64
 
73
65
  def test_move_inst_plugins_name():
@@ -117,18 +109,3 @@ def test_viewer_has_mandatory_methods(dim):
117
109
  for meth in MANDATORY_VIEWER_METHODS:
118
110
  assert hasattr(klass, meth)
119
111
 
120
- def test_compatibility(capsys):
121
- capsys.disabled()
122
- try:
123
- from pymodaq_plugin_manager.compatibility_checker import PyMoDAQPlugin
124
- except (ModuleNotFoundError, ImportError) as e:
125
- pytest.fail(f"Please update pymodaq_plugin_manager to a newer version: {e}")
126
-
127
- plugin = PyMoDAQPlugin(get_package_name(), None)
128
- success = plugin.all_imports_valid()
129
- msg = '\n'.join(plugin.failed_imports + [''])
130
-
131
- if not success:
132
- plugin.save_import_report(".")
133
-
134
- assert success, msg