Repository navigation
Migrate to the plugin template layout, use thorlabs' Elliptec, rewrite the extension - #1
Merged
Merged
Conversation
- pyproject.toml + hatch_build.py replace setup.py, MANIFEST.in and plugin_info.toml (entry points are generated from the [features] table, version comes from git tags) - tests/test_plugin_package_structure.py: acceptance checks from pymodaq.utils.plugin_testing - .github/workflows: tests, compatibility and publish call the shared workflows of PyMoDAQ/pymodaq_plugins_template (legacy Test.yml/Testbase.yml removed) - AGENTS.md / CLAUDE.md for AI coding assistants Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
The shared tests and the template target pymodaq>=5.3.2 (pymodaq_utils>=5.3.1, pymodaq_gui and pymodaq_data>=5.3.0), so releases of this plugin cannot be installed next to an older PyMoDAQ. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
…n of thorlabs - pyproject: classifiers computed at build ([tool.pymodaq]), build requirement pymodaq_utils>=5.3.6 - the Elliptec actuator now comes from pymodaq_plugins_thorlabs (its copy here was an older version with the same plugin name, so PyMoDAQ would pick one of the two) - pymodaq_plugins_raspberry (PiCamera, needs picamera2) is installed on aarch64/armv7l only - remove leftovers of the old template (root __init__.py, PID model template) - AGENTS.md, .gitignore, __init__.py and utils.py as in the template Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0133Ko33t5rFAg2uX8hVMgZs
- the extension derives from CustomExt, as the template one: the Dashboard toolbar loads experiments and states, instruments are looked up by name after each experiment is set - the old preset is replaced by two experiments: FTIR_JM (Elliptec + PiCamera) and FTIR_JM_mock (Mock plugins), copied in the experiment folder by main() - module names and positions come from the plugin configuration, read through GlobalConfig - README describes the extension Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0133Ko33t5rFAg2uX8hVMgZs
Every plugin declares the pymodaq.plugins entry point, read by get_instrument_plugins, so the Config of utils.py is registered even without instrument plugins. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0133Ko33t5rFAg2uX8hVMgZs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: the plugin was packaged with
setup.py,MANIFEST.inandplugin_info.toml, shipped its own (older) copy of the Elliptec actuator, and its FTIR_JM extension was a PyMoDAQ 4CustomAppstarted from a preset.After: it has the layout of the current plugin template, gets the Elliptec actuator from
pymodaq_plugins_thorlabs, and the FTIR_JM extension is aCustomExtthat works with the Dashboard's experiments; two experiments replace the old preset.What changes:
pyproject.toml(hatch, version from git tags, classifiers computed at build from[tool.pymodaq]) replacessetup.py,MANIFEST.inandplugin_info.toml; shared CI workflows of the template; acceptance tests frompymodaq.utils.plugin_testing;AGENTS.md/CLAUDE.md. Leftovers of the old template removed (root__init__.py, PID model template).daq_move_Elliptec.pyis removed andpymodaq_plugins_thorlabs>=5.3.0is a dependency. Both files descend from the same plugin; the thorlabs one is the PyMoDAQ 5 version (degree units,current_value, master/slave handling). Keeping both would give two actuators namedElliptec, and PyMoDAQ takes the first one found (find_dict_in_list_from_key_valinpymodaq/control_modules/instruments.py).pymodaq_plugins_raspberry(PiCamera, needspicamera2) is installed onaarch64/armv7lonly, so the package installs on CI runners and PCs.CustomExtlike the template (create_dashboard_toolbar,do_things_after_experiment_set,main()withload_dashboard_with_arguments/create_extension). Instrument names and the two target positions are read from the plugin configuration throughGlobalConfig.resources/FTIR_JM.xml(Elliptec + PiCamera) andresources/FTIR_JM_mock.xml(Mock plugins), created with PyMoDAQ 5.3'sExperimentManagerparameters and copied into the experiment folder bymain().How tested: with pymodaq 5.3.5 and PyQt5,
pytest(2 passed, 2 skipped: no instrument plugin left) andcheck_pluginpass, the wheel's metadata and entry points were checked, and the extension was run headless onFTIR_JM_mock: the experiment loads, Snap shows the image and Move Abs moves the actuator. Nothing was run against the real hardware (Elliptec, PiCamera, Raspberry Pi).🤖 Generated with Claude Code
https://claude.ai/code/session_0133Ko33t5rFAg2uX8hVMgZs