You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That would be good as well, but I think having examples in the docs without having to read through the code would be helpful for setting up new environments.
changed the title [-] examples in the docs without having to read through the code would be helpful for setting up new environments.[/-][+] examples in the docs[/+]on Jul 1, 2024
I still think there needs to be something prominent in the docs/ getting started that details what should go in the config file. It currently says use blueapi --config path/to/file.yaml to pass configuration but not what should go in the file, only that "An example of this yaml file is found in config/defaults.yaml" which no longer exists.
...true, reading your original comment, I think the title of this issue may just be wrong. @stan-dot could you rename it to be about the blueapi config, rather than ophyd-async devices?
That would be a useful start. Do the docstrings end up on the docs site somewhere? It would be good if there was detail about what the various kinds were as well as where it is looking for modules etc. It would be good to add a link to the cli as well so that blueapi --help will direct users to something useful
@stan-dot A complete example would be good but it would be ideal if we didn't have to rely on a human to remember to keep it up-to-date. I.e. we should make an example in code, generate some yaml for the docs from it, and that way it should fail if we ever change the config model and cause a validation error.
I would accept that, although I would personally prefer the other way around (generate the yml string from hard-coded python), but for no other reason than it seems neater.
Activity
[-] examples in the docs without having to read through the code would be helpful for setting up new environments.[/-][+] examples in the docs[/+]callumforrester commentedon Jul 1, 2024
@stan-dot could you add more description/context to this issue please?
[-] examples in the docs[/-][+] examples of the ophyd-async device creation process and reasoning[/+]callumforrester commentedon Sep 5, 2024
This has been done in the dodal and ophyd-async documentation. I think we should close this issue, or at most just include links in the blueapi docs.
stan-dot commentedon Sep 9, 2024
what do you think @tpoliaw ?
tpoliaw commentedon Sep 9, 2024
I still think there needs to be something prominent in the docs/ getting started that details what should go in the config file. It currently says use
blueapi --config path/to/file.yamlto pass configuration but not what should go in the file, only that "An example of this yaml file is found inconfig/defaults.yaml" which no longer exists.callumforrester commentedon Sep 9, 2024
...true, reading your original comment, I think the title of this issue may just be wrong. @stan-dot could you rename it to be about the blueapi config, rather than ophyd-async devices?
[-] examples of the ophyd-async device creation process and reasoning[/-][+]Docs on config setup[/+]stan-dot commentedon Sep 9, 2024
I think to add
to
blueapi.config.ConfigLoaderas docstring. What do you think @tpoliaw , @callumforrester ?tpoliaw commentedon Sep 9, 2024
That would be a useful start. Do the docstrings end up on the docs site somewhere? It would be good if there was detail about what the various kinds were as well as where it is looking for modules etc. It would be good to add a link to the cli as well so that
blueapi --helpwill direct users to something usefulcallumforrester commentedon Sep 9, 2024
Yeah, it would be good to have a reference here: https://diamondlightsource.github.io/blueapi/main/reference.html
@stan-dot A complete example would be good but it would be ideal if we didn't have to rely on a human to remember to keep it up-to-date. I.e. we should make an example in code, generate some yaml for the docs from it, and that way it should fail if we ever change the config model and cause a validation error.
stan-dot commentedon Sep 9, 2024
@callumforrester would a test with a hard-coded yml string asserting a correct read be ok?
callumforrester commentedon Sep 9, 2024
I would accept that, although I would personally prefer the other way around (generate the yml string from hard-coded python), but for no other reason than it seems neater.
stan-dot commentedon Sep 9, 2024
getting the raw yml string is more similar to parsing a raw
.ymlfile contents from the filesystem (the previous setup). I'll make the new test sooncallumforrester commentedon Oct 31, 2024
I'm not sure if the acceptance criteria have been met since @tpoliaw asked for examples in the docs, not the tests
abbiemery commentedon Feb 25, 2026
Closing in favour of #1416