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

feat: add runtime and runtime-async packages #200

Merged
merged 20 commits into from
Jun 11, 2022

Conversation

chrispcampbell
Copy link
Contributor

@chrispcampbell chrispcampbell commented Jun 11, 2022

Fixes #198

This adds the @sdeverywhere/runtime and @sdeverywhere/runtime-async packages. These were originally developed in an internal repo under the names sde-model and sde-model-async. The only changes between the original sources and the ones here are:

  • additional test coverage for ModelRunner and ModelScheduler
  • addition of a terminate function on the ModelRunner interface
  • addition of a gen-docs.js script that uses typedoc and typedoc-plugin-markdown to generate Markdown API docs (that are currently maintained in the repo under the docs directories for ease of access and updating)

These packages have been in use in En-ROADS and C-ROADS for over a year and a half and haven't had many changes in that time, so I consider them to be pretty stable. There may be a few API tweaks required once we start testing other models with them (for example, we'll need to fix the Outputs type to support models that use a "saveper" value other than 1), but I think this is good enough for a 0.1.0 release.

(Regarding the API docs, the internal repo used a different typedoc plugin that generated fancier HTML docs, but I like the simplicity of generating Markdown, and while I normally don't like keeping generated files in a repo, in this case it works pretty well since the Markdown pages are linked and browsable on GitHub, and it's easier than deploying docs to a separate server or GH Pages. We also have the added benefit of being able to see easily when there are API changes by looking at the diffs of the generated docs.)

/cc @ToddFincannon

@chrispcampbell chrispcampbell merged commit fd52822 into main Jun 11, 2022
@chrispcampbell chrispcampbell deleted the chris/198-add-runtime branch June 11, 2022 00:52
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.

Add runtime and runtime-async packages
1 participant