Skip to content

Conversation

@jacob720
Copy link
Collaborator

@jacob720 jacob720 commented Dec 5, 2025

Fixes #134

Splits converters and models into their own modules based on the type of config file they deal with. Also adds a public API so that all models can be imported with from daq_config_server.models import SomeModel

@jacob720 jacob720 force-pushed the 134_improve_module_structure branch from b6ff40d to 822a173 Compare December 5, 2025 16:01
@jacob720 jacob720 force-pushed the 134_improve_module_structure branch 4 times, most recently from 7722937 to 3a792c5 Compare December 8, 2025 14:30
@jacob720 jacob720 force-pushed the 134_improve_module_structure branch from 3a792c5 to ecb1889 Compare December 8, 2025 14:31
Copy link
Collaborator

@olliesilvester olliesilvester left a comment

Choose a reason for hiding this comment

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

Thanks, the structure is nicer here. We just need to make sure we're consistent with making private classes/modules and exposing the right bits in the __init__.pys. Ophyd-async is a good example of how it should look, eg see https://github.com/bluesky/ophyd-async/blob/main/src/ophyd_async/epics/adcore/__init__.py

@jacob720 jacob720 force-pushed the 134_improve_module_structure branch from 5c26426 to b929a6a Compare December 9, 2025 16:48
@jacob720 jacob720 force-pushed the 134_improve_module_structure branch from b929a6a to ec2409c Compare December 9, 2025 16:50
@jacob720 jacob720 force-pushed the 134_improve_module_structure branch from 47eaf30 to cc0f1c4 Compare December 10, 2025 09:44
Copy link
Collaborator

@olliesilvester olliesilvester left a comment

Choose a reason for hiding this comment

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

Looks much neater thanks, just a couple of things, but feel free to disagree


__all__ = [
"GenericLookupTable",
"parse_lut",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might have missed something but I don't think we need to exposeparse_lut - I think we only use it in the tests right? I think tests should be able to import from private modules, we can probably add a typing rule so that files in the test folder can do this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a good point, I'll remove it

from pydantic import BaseModel


class ConfigModel(BaseModel): ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not relevant to this PR really but can we add a comment just to say it should be the parent class to all other config models

Copy link
Collaborator

@olliesilvester olliesilvester left a comment

Choose a reason for hiding this comment

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

Thanks, looks neat

@olliesilvester olliesilvester merged commit fe41594 into main Dec 11, 2025
26 checks passed
@olliesilvester olliesilvester deleted the 134_improve_module_structure branch December 11, 2025 10:49
@olliesilvester olliesilvester changed the title 134 improve module structure Improve module structure Dec 11, 2025
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.

Improve converters file structure

3 participants