Skip to content

Add dt4acc EPICS twin integration tests on the FODO lattice - #528

Merged
gupichon-soleil merged 1 commit into
mainfrom
520-feature-dt4acc-integration-tests-for-the-epics-twin-on-the-fodo-lattice
Nov 27, 2026
Merged

gupichon-soleil merged 1 commit into
mainfrom
520-feature-dt4acc-integration-tests-for-the-epics-twin-on-the-fodo-lattice

Conversation

@gupichon-soleil

@gupichon-soleil gupichon-soleil commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

The dt4acc integration workflow only exercised the Tango twin. The dt4acc-soleil-twin image also ships an EPICS soft-IOC twin, and pyaml-test-lattice 0.4.0 provides the matching FODO 1 GeV 6D fixtures (dt4acc/fodo_1gev_6d_dt4acc_epics.json for the twin, pyaml/epics/pyaml-cs-oa/fodo_1gev_6d_pyaml-epics.yaml for pyAML). This PR runs smoke checks against the EPICS twin through pyaml-cs-oa, in CI and locally.

Related Issue

Features/issues described there are:

  • new feature: start_dt4acc_twin.sh can start the twin in EPICS mode (--mode epics --prefix <prefix>), waiting for the EPICS IOC ready: line instead of the Tango heartbeat.
  • new feature: a new epics-smoke job in dt4acc-integration.yml starts the EPICS twin with the prefix pyaml-it, restricts Channel Access and PVA to 127.0.0.1, and runs the EPICS smoke tests.

Changes to existing functionality

  • start_dt4acc_twin.sh: --mode defaults to tango, so existing calls behave as before. --prefix is rejected in Tango mode, and --tango-host/--tango-port are rejected in EPICS mode.
  • The FODO fixture loading moved from test_dt4acc_twin_smoke.py to tests/integration/fodo_fixtures.py, shared by both test files. It accepts control-system overrides, used to inject the EPICS PV prefix (prefix: "pyaml-it:").
  • The smoke job is unchanged, so its check name stays the same.
  • pyproject.toml: the test extra requires pyaml-test-lattice>=0.4.0.

Testing

The following tests (compatible with pytest) were added in tests/integration/test_dt4acc_epics_twin_smoke.py, marked integration and read through pyAML objects only:

  • test_epics_twin_accelerator_instantiates_and_reads_live_values: RF frequency and QF_001 strength are finite and positive.
  • test_epics_twin_reads_all_declared_magnetic_strengths: every magnet and combined function magnet strength is finite.
  • test_epics_twin_reads_bpm_positions: every BPM position is finite.

The PV prefix is read from PYAML_DT4ACC_EPICS_PREFIX (default pyaml-it).

Verified locally in WSL with the published image (after the softioc dependency fix in the image): 3/3 EPICS tests and 6/6 Tango tests pass. A wrong prefix makes the EPICS tests fail with NotConnectedError, so they really read from the twin.

Verify that your checklist complies with the project

  • New and existing unit tests pass locally
  • Tests were added to prove that all features/changes are effective
  • The code is commented where appropriate
  • Any existing features are not broken (unless there is an explicit change to an existing functionality)

🤖 Generated with Claude Code

@gupichon-soleil gupichon-soleil self-assigned this Nov 26, 2026
@gupichon-soleil gupichon-soleil linked an issue Nov 26, 2026 that may be closed by this pull request
2 tasks
start_dt4acc_twin.sh gains --mode epics/--prefix, a new epics-smoke CI job runs the tests through pyaml-cs-oa.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gupichon-soleil
gupichon-soleil force-pushed the 520-feature-dt4acc-integration-tests-for-the-epics-twin-on-the-fodo-lattice branch from 7344e1a to 6807f2c Compare November 26, 2026 10:46
@gupichon-soleil
gupichon-soleil marked this pull request as ready for review November 26, 2026 16:49

@GamelinAl GamelinAl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks ok ... (probably) ... from far far away as I am not at all familiar with this ;)

@gupichon-soleil
gupichon-soleil merged commit b26c979 into main Nov 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: dt4acc integration tests for the EPICS twin on the FODO lattice

2 participants