Skip to content

Changes to remove config models. - #29

Draft
TeresiaOlsson wants to merge 1 commit into
mainfrom
remove-configmodels
Draft

Changes to remove config models.#29
TeresiaOlsson wants to merge 1 commit into
mainfrom
remove-configmodels

Conversation

@TeresiaOlsson

Copy link
Copy Markdown
Member

I have started a PR to remove the config models and include the changes for the schema registry to work for this packages.

It should maybe not be merged until a new release of pyaml has been done since it needs the validation model of pyaml.

@gupichon I have one problem with the static catalog where I'm not sure about the best solution. It includes:

    def resolve(self, key: str) -> BaseModel:
        try:
            return self._refs[key]._cfg  # --> What is supposed to be returned here?
        except KeyError as exc:
            raise PyAMLException(f"StaticCatalog cannot resolve key '{key}'") from exc

As I understand it self._refs[key] returns a DeviceAccess object which doesn't have an interface for returning the configuration of it. I guess it only has worked so far because DeviceAccess has been inherited and the subclasses have all implemented a _cfg attribute despite that it's not part of the defined interface. So now when there is no _cfg anymore, what should actually be returned here? And maybe that should be included in the DeviceAccess interface to make sure all future subclasses implement it?

@TeresiaOlsson TeresiaOlsson changed the title Initial changes to remove config models. Changes to remove config models. Aug 27, 2026
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.

1 participant