Closed adityasharad closed 4 years ago
This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/covid19-scenarios/covid19-scenarios/hvd94f70m ✅ Preview: https://covid19-scenarios-git-fork-adityasharad-unified-ui-cli.covid19-scenarios.now.sh
Code Climate has analyzed commit 8040a3d0 and detected 0 issues on this pull request.
View more on Code Climate.
Thanks! As you said, this is not exactly implementing a proper CLI and, honestly, not doing what I would expect, but I guess it does not hurt to have it around.
Would you be interested in continuing working in this direction? My main focus is still the application, but I can help here and there.
I will add a TODO list in the linked issue #663
Wouldn't it be more convenient for aggregators like "covid-modeling" to have a programmatic API instead of a CLI?
Related issues and PRs
Description
This PR adds a simple CLI entry point that:
ScenarioData
) from a specified input pathrun.ts
AlgorithmResult
) into the specified output pathThis allows the model to be run in a unified model UI, such as the one we are maintaining at https://github.com/covid-modeling on the GitHub side. We are already using a version of this at https://github.com/covid-modeling/model-runner to run this model, but are currently tied to my fork that has the CLI entry point and an older version of your model. Having this code as part of the model repo enables the unified interface to keep up with model changes, and so better represent the latest state of your model.
@ivan-aksamentov @nnoll I would be grateful for a review, and hope this will minimally impact your existing work. Let me know if you have questions.
Impacted Areas in the application
No changes to existing code, introduces new entry point that calls
run
.Testing
yarn schema:clean && yarn schema:totypes
.ScenarioData
in a file, sayinput-file.json
. One of the existing objects inscenarios.json
will work.path/to/output-file.json
, which is assumed to not already exist.