csdms / babelizer

Transform BMI-wrapped models into Python packages
https://babelizer.readthedocs.io
MIT License
4 stars 3 forks source link

Add bmi-render command #5

Closed mcflugen closed 5 years ago

mcflugen commented 5 years ago

This pull request adds a bmi-render command that renders a repository that wraps one or more BMI components into components (or plugins) that are pymt-compatible. Usage looks something like,

bmi-render plugin.yaml .

where plugin.yaml provides metadata about the component(s) to be wrapped. An example plugin.yaml file that wraps four C components,

build:
  define_macros: []
  extra_compile_args: []
  include_dirs: []
  libraries:
  - bmi_sedflux3d
  - bmi_avulsion
  - bmi_plume
  - bmi_subside
  library_dirs: []
  undef_macros: []
info:
  github_username: mcflugen
  plugin_author: Eric Hutton
  plugin_license: MIT
  summary: PyMT plugin for sedflux
library:
  entry_point:
  - Sedflux3D=sedflux:register_bmi_sedflux3d
  - Avulsion=sedflux:register_bmi_avulsion
  - Plume=sedflux:register_bmi_plume
  - Subside=sedflux:register_bmi_subside
  language: c
plugin:
  name: sedflux
  requirements:
  - sedflux