🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

builder2ibek

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder2ibek

Conversion tool for DLS XML builder IOC instances to ibek ioc.yaml

1.0.2
Maintainers
0

CI Coverage PyPI License

builder2ibek

A tool suite for converting DLS XML builder projects to epics-containers ibek.

Sourcehttps://github.com/epics-containers/builder2ibek
PyPIpip install builder2ibek
Releaseshttps://github.com/epics-containers/builder2ibek/releases
╭─ Commands ───────────────────────────────────────────────────────────────────╮
xml2yaml        Convert a builder XML IOC instance definition file into an   │
                ibek YAML file                                               │
beamline2yaml   Convert all IOCs in a BLXXI-SUPPORT project into a set of    │
                ibek services folders (TODO)                                 │
autosave        Convert DLS autosave DB template comments into autosave req  │
                files                                                        │
db-compare      Compare two DB files and output the differences              │
╰──────────────────────────────────────────────────────────────────────────────╯

How to use the devcontainer

This repo includes a devcontainer for testing and developing converters.

To use this re-open in container.

  • First make sure you have the submodules
    • git submodule update --init
  • This adds ibek-support and ibek-support-dls meaning that we can validate converted projects against a global ibek schema that include all support modules currently defined in ibek-support*.
  • To add a new IOC to the tests simply copy its XML definition into tests/samples. Then run ./tests/samples/make_samples.sh to convert the XML to YAML and create a test for it.
  • important: this will re-convert all of the sample XML files in the samples folder. Always check the diff before committing.

Once you have done this you can iterate on converting your XML:

  • make changes to the ibek support yaml in ibek-support-dls and ibek-support
  • make changes/additions to src/builder2ibek/converters/*.py
  • re-convert your XML with ./tests/samples/make_samples.sh
  • rebuild the global ioc yaml schema with ./update-schema
  • Inspect your generated YAML in tests/samples and look for schema validation issues (make sure you have the RedHat YAML extension installed in VSCode)
  • NOTE: sometimes the YAML extension does not notice changes to the schema. If you are seeing errors that you think are incorrect, opening the exttension settings and toggling the Yaml: Validate off and on again can help - it's the last option.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts