DARPA-ASKEM / Model-Representations

Modeling framework representations for ASKEM
https://darpa-askem.github.io/Model-Representations/
8 stars 2 forks source link

Draft contexts and configurations in InterTypes #68

Closed fivegrant closed 5 months ago

fivegrant commented 8 months ago

TODOs before merge:

brandomr commented 7 months ago

@olynch is this something we can merge into your branch? Any thoughts/feedback?

fivegrant commented 7 months ago

note: I'm waiting to make changes to this PR until the example configuration and parameterization artifacts are complete.

fivegrant commented 6 months ago

@jpfairbanks This is still missing quite a bit but it might make sense to go ahead and merge with the main Decapodes branch and continue work there. I've gotten this as far as I can get it personally.

The big thing that's missing are object types/mappings (I'm currently using Vector as a placeholder). For example, how would I make an intertype of this:

{
  "entries": {
    "a": {
      "x": 1,
      "y": 4
    },
    "b": {
      "x": 3,
      "y": 4
    }
  }
}

and declare this in InterTypes like Map{Point}. There does seem to be some Map object but it's unclear how to do call this in it file and I'm not sure if it's what I'm looking for

Possible issues I could open up on ACSets.jl if you'd like

fivegrant commented 6 months ago

@jpfairbanks this fixes the second and third bullets above: https://github.com/AlgebraicJulia/ACSets.jl/pull/95

fivegrant commented 5 months ago

@olynch @jpfairbanks I think this PR is ready to merge into the main Decapodes PR. Pydantic is able to ingest both contexts and configurations.

I didn't include a Project.toml for generate.jl and I also put a few generic components in base.it because I anticipate that we might use it for other frameworks. You should modify anything you want (remove generate.jl, factor base.it into decapodes.it etc) since all I'm doing here is the work of ingesting the example from the hackathon.

LMK if you want me to resolve the merge conflicts although it seems like something you might prefer to do on your own.


@liunelson @mattprintz I made very minimal changes to your examples but they remain almost entirely intact.

fivegrant commented 5 months ago

small note: I added InterTypes so they match the examples exactly. Changes that require modifying the examples should be done in a different PR.

fivegrant commented 5 months ago

@jpfairbanks I've responded to all of your comments. I made all the noninvasive changes I could to the examples. decapodes.it also takes advantage of more sumtypes.

jpfairbanks commented 5 months ago

As long as we can change this as we implement the simulator service that backs accepts this format. I'm ready to merge.