Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working with a local schema #62

Open
gilesknap opened this issue Nov 24, 2023 · 1 comment
Open

working with a local schema #62

gilesknap opened this issue Nov 24, 2023 · 1 comment

Comments

@gilesknap
Copy link
Member

Notes on some things to add in future.

In the section on working with support modules we need to enable the ability to generate the schema for a generic IOC locally.

To do this we would just need to (for example pmac support):

  • make your changes as needed to /epics/ioc-pmac/ibek-support/pmac/pmac.ibek.support.yaml
  • perhaps do that automatically with something like:
    • ../../ibek/builder2ibek.support.py /dls_sw/prod/R3.14.12.7/support/pmac/2-5-23beta1/ pmac/pmac.ibek.support.yaml -o '14:A+B 474:A+B 801:1 805:1.0 804:1.0'
  • update the symlinks (only the first time)
    • ibek support generate-links pmac
  • regenerate the schema
    • ibek ioc generate-schema --output /tmp/pmac.ibek.ioc.schema.json
  • change the top of the ioc.yaml instance you are working with to
    • # yaml-language-server: $schema=/tmp/pmac.ibek.ioc.schema.json

Having done the above once you can now:

  • edit pmac.ibek.support.yaml
  • run ibek ioc generate-schema --output /tmp/pmac.ibek.ioc.schema.json
  • continue editing your ioc.yaml which will now see the new schema
@gilesknap
Copy link
Member Author

ALSO to document, the yaml plugin does not always see changes to schema files. If this fails you can untick and retick the last option in the extension settings (enable schema validation)

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

No branches or pull requests

1 participant