Skip to content

Integration tests improvements#306

Open
gupichon wants to merge 18 commits into
mainfrom
298-integration-test-improvement
Open

Integration tests improvements#306
gupichon wants to merge 18 commits into
mainfrom
298-integration-test-improvement

Conversation

@gupichon

@gupichon gupichon commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

This PR updates the DT4ACC integration setup to use the new public dt4acc-soleil-twin image and the updated embedded Tango launcher interface.

It also replaces the previous single-file FODO test configuration with a dedicated FODO 1 GeV 6D integration dataset, including the DT4ACC accelerator setup, lattice, pyAML device configuration, Tango catalog, and pyaml-cs-oa catalog.

Changes

  • Update the DT4ACC image URI to the new public registry:
    oras://registry.synchrotron-soleil.fr/software_control_system_public/dt4acc-soleil-twin:latest
  • Launch the twin through the new tango-db-embedded command.
  • Use the new FODO 1 GeV 6D DT4ACC setup and lattice files in CI.
  • Install ophyd-async[tango, ca, pva] for integration coverage.
  • Checkout the PR head repository/ref explicitly in the integration workflow.
  • Add split pyAML configuration files for the FODO 1 GeV 6D integration setup.
  • Exercise both tango-pyaml and pyaml-cs-oa backends against the same twin.
  • Add integration coverage for:
    • accelerator instantiation and live readback
    • all declared magnet strength readbacks
    • example configuration loading
    • chromaticity measurement
  • Mark simulator tune attributes as read-only where appropriate.
  • Fix the Accelerator.from_dict docstring parameter type.

@gupichon gupichon self-assigned this Jun 26, 2026
@gupichon gupichon linked an issue Jun 26, 2026 that may be closed by this pull request
@gupichon
gupichon requested a review from gubaidulinvadim June 29, 2026 15:10
@gupichon gupichon changed the title New lattice and pyaml configuration Integration tests improvements Jul 6, 2026
@gupichon

gupichon commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@JeanLucPons, @TeresiaOlsson, @gubaidulinvadim, @kparasch, @simoneliuzzo, @ everybody...
Hello all, I would like to get some suggestions for the integration tests. For now, I have a complete model with a basic test and a modular configuration. I am working on additional tests, but I would highly appreciate any contributions.

Feel free to contribute directly to the branch if you want, preferably in separate files. I can also build a lightweight configuration if needed.

@gubaidulinvadim

Copy link
Copy Markdown
Contributor

@gupichon I can have a look, but I prefer to do it after the latest changes on the twin side from Waheed are included.

@gupichon

gupichon commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@gupichon I can have a look, but I prefer to do it after the latest changes on the twin side from Waheed are included.

I agree, but it would help me if I had a concrete idea of the tests to be implemented.

@TeresiaOlsson

TeresiaOlsson commented Jul 6, 2026

Copy link
Copy Markdown
Member

I'm wondering if we should turn everything we have in examples to integration tests instead? We needed the examples for the last workshop but they are starting to feel more and more difficult to maintain since they are not included in the tests. Maybe now they would be better as integration tests instead?

Especially since I'm working on making a separate repository for documentation which should include tutorials and then the purpose the examples had will be covered by those instead.

@gupichon

gupichon commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

I'm wondering if we should turn everything we have in examples to integration tests instead? We needed the examples for the last workshop but they are starting to feel more and more difficult to maintain since they are not included in the tests. Maybe now they would be better as integration tests instead?

Especially since I'm working on making a separate repository for documentation which should include tutorials and then the purpose the examples had will be covered by those instead.

For now, I'm mainly experimenting with the twin. As for the examples, they are just loaded, nothing is executed. They should be removed if the examples are moved to another repository. The idea here is that as long as they are inside the pyaml repository, a test should check if they are still valid.
But yes, I'm trying to create some tests based on the examples to make sure the twin executes properly and works as intended.

@gubaidulinvadim

Copy link
Copy Markdown
Contributor

I'm wondering if we should turn everything we have in examples to integration tests instead? We needed the examples for the last workshop but they are starting to feel more and more difficult to maintain since they are not included in the tests. Maybe now they would be better as integration tests instead?

Especially since I'm working on making a separate repository for documentation which should include tutorials and then the purpose the examples had will be covered by those instead.

This is mostly the configuration file changes that have broken the examples recently. Everything else is mostly intact and/or very easy and quick to fix.

@JeanLucPons

Copy link
Copy Markdown
Member

I did a a test. The chroma measure seems OK (zero chroma).
image
But I get losts of errors "DeviceNotImported".
image

What do you expect, do you you want we add other tests ? I think the computation of the ORM,CRM,TRM on this small lattice should be fast enough to be computed.

@JeanLucPons

Copy link
Copy Markdown
Member

My prefix in fodo_1gev_6d_pyaml-oa.yaml is well there:

controls:
- type: pyaml_cs_oa.controlsystem
  name: live
  prefix: //ubuntu24acu.esrf.fr:30000/
  catalog: fodo_1gev_6d_pyaml_catalogs-oa.yaml

@gubaidulinvadim

Copy link
Copy Markdown
Contributor

@JeanLucPons, attention: TRM will not work in the present twin version; there's a bug. The rest should be fine.

@gupichon

Copy link
Copy Markdown
Member Author

Hello @gubaidulinvadim, @TeresiaOlsson, @JeanLucPons, and all. I have updated the twin and merged it with the main branch. As the twin project has been significantly updated on Soleil's end, I would recommend merging this PR as soon as possible.

@gubaidulinvadim

Copy link
Copy Markdown
Contributor

It looks good, but I can only review properly next week when you're on vacation @gupichon :)

@gupichon
gupichon marked this pull request as ready for review July 24, 2026 15:58
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.

Integration test improvement

5 participants