Skip to content

29 adding a field for catalog name for the control system and a catalog registration method new impl#30

Merged
JeanLucPons merged 14 commits into
mainfrom
29-adding-a-field-for-catalog-name-for-the-control-system-and-a-catalog-registration-method-new-impl
Jun 12, 2026
Merged

29 adding a field for catalog name for the control system and a catalog registration method new impl#30
JeanLucPons merged 14 commits into
mainfrom
29-adding-a-field-for-catalog-name-for-the-control-system-and-a-catalog-registration-method-new-impl

Conversation

@gupichon

Copy link
Copy Markdown
Contributor

Summary

This PR adds catalog support to the Tango PyAML bridge.

  • TangoControlSystem configuration now accepts a catalog field.
  • A new TangoCatalog resolves direct Tango attribute references, with support for both connected and disconnected modes.
  • A new StaticCatalog and StaticCatalogEntry provide explicit key-to-device mappings.
  • Indexed access to SPECTRUM attributes is now supported through Attribute(index=...), replacing the separate indexed attribute classes.
  • The test suite was extended to cover catalog resolution, static catalogs, and indexed attribute behavior.

Closes #29

Note

The corresponding pyaml developments are available in branch 187-adding-catalogs-section-in-the-pyaml-configuration-file-new-implementation (PR #234).

… support (tango.pyaml.attribute_indexed). TangoCatalog handles the attr@index syntax with SPECTRUM validation in connected mode.
…e attribute_indexed.py and attribute_indexed_read_only.py, update catalog and tests.
@gupichon

Copy link
Copy Markdown
Contributor Author

Tests are failing due to the wrong PyAML version. It is not using the correct branch.

- Use the attached TangoControlSystem tango_host when resolving Tango metadata
- Keep shared TangoCatalog instances isolated through per-control-system resolvers
- Add public accessors to avoid cross-object private config access
- Validate attached control system type explicitly
- Add tests for shared catalogs with different Tango databases and metadata ranges
Move public device reference resolution into TangoControlSystem.get_device().
Resolve string refs through the runtime catalog, construct supported Tango
DeviceAccess objects from backend config models, and expose get_catalog_config().

Remove the runtime dependency on PyAML CatalogResolver by making TangoCatalog
resolve keys with an explicit TangoControlSystem context. Keep Tango key parsing,
indexed SPECTRUM handling, and per-control-system catalog caches in the backend.

Add distinct read-only config models and cover static catalog, Tango catalog,
indexed lookup, config-model construction, missing catalog, and unknown key
errors in tests.
…-catalog-name-for-the-control-system-and-a-catalog-registration-method-new-impl

# Conflicts:
#	tango/pyaml/controlsystem.py
@gupichon

Copy link
Copy Markdown
Contributor Author

@JeanLucPons, it's ready for review

@JeanLucPons

Copy link
Copy Markdown
Contributor

Did you remove name from the catalog ?
image

@gupichon

Copy link
Copy Markdown
Contributor Author

Did you remove name from the catalog ?

Actually, you did. It was in the Catalog class in pyaml. There is no “name” field in pyaml-cs-oa, so I tried to make them as close as possible.

@JeanLucPons

Copy link
Copy Markdown
Contributor

OK so i will have to update catalog in pyaml test suite as i use this to check on ESRF VA.

@JeanLucPons

Copy link
Copy Markdown
Contributor

I removed the name field:
Next issue:
image

@gupichon

Copy link
Copy Markdown
Contributor Author

Yes, I need to update it regarding the last merge. I'm on it.

@JeanLucPons

Copy link
Copy Markdown
Contributor

Ok.
This is done for pyaml-cs-oa in the PR:
python-accelerator-middle-layer/pyaml-cs-oa#22
If you could merge it ?
Thx

@gupichon

Copy link
Copy Markdown
Contributor Author

It should be good now for tango-pyaml too.

@JeanLucPons

Copy link
Copy Markdown
Contributor

Next:
may be in pyaml.
I have meeting at 11h.

image

@JeanLucPons

Copy link
Copy Markdown
Contributor

DeviceAccessList is imutable:
You have to use _items i guess

super().extend(devices)

@gupichon

Copy link
Copy Markdown
Contributor Author

Corrected

@JeanLucPons

Copy link
Copy Markdown
Contributor

Seems OK to me

@JeanLucPons JeanLucPons merged commit 8f5f342 into main Jun 12, 2026
2 checks passed
@JeanLucPons JeanLucPons deleted the 29-adding-a-field-for-catalog-name-for-the-control-system-and-a-catalog-registration-method-new-impl branch June 12, 2026 11:46
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.

Adding a field for catalog name for the control system and a catalog registration method

3 participants