Install the project in editable mode, in a Python environment where DataLab 1.4 or later and PyTango are available, then run the checks before submitting a change:
python -m pip install -e ".[test]"
python -m ruff check .
python -m ruff format --check .
python -m pytestGitHub Actions (.github/workflows/ci.yml) runs the same checks on Linux and Windows for each push to develop or main and each pull request; no TANGO database or hardware is needed. DataLab 1.4 is not released yet: the workflow installs DataLab, Sigima and SigimaX from the develop branch of their repositories, or from another branch when run manually (Run workflow, stack-ref input).
With DataLab 1.4 or later, add this project folder in Plugins > Configure plugins... > Plugin settings, then reload the plugins: DataLab loads the plugin from src/datalab_tango/adapters/desktop.py, without installing the project (see DataLab-Platform/DataLab#412). PyTango must be installed in DataLab's environment to connect to devices.
Dependencies point inward:
adapters -> instrument -> core
coreholds the connection layer.profilevalidates device profiles;receptionstores received values in a bounded, thread-safe buffer and reads attributes periodically;backendconnects to devices (PyTangoBackend, the only module importing PyTango, inside its methods);sessioncombines them for one attribute;convertturns values into Sigima signals and images with theirexperimental_source. The core does not import DataLab.instrument.pyexposes an attribute session as a DataLab instrument (PluginInstrument): DataLab calls it outside its user interface thread, opens it with its window and closes it with the window.adapters/desktop.pydeclares the plugin and its tool. There is no DataLab-Web adapter.simulation.pyserves simulated devices for trials and tests; no other module imports it.
tests/unit/test_architecture.py checks the layer boundaries.
tests/unit: profiles, reception, conversion and instrument, with a fake device (tests/support/fake_backend.py).tests/integration: simulated devices served by PyTango's test contexts in another process (tests/support/devices.pyand the shippedsimulationmodule), reached through the TANGO protocol, and the instrument window in DataLab. These tests receive values by periodic reads: change events depend on the network setup of the test machine. The device servers are given 60 s to start, PyTango's default being too short on some machines. With the Pulse & Transient and Camera characterization plugins on the Python path, the simulated devices use their simulators.
Day-to-day work lands on develop, the default branch: open pull requests against it. main is the release branch, created at the first release; after that, develop is merged into main only to cut a release.