From 0cb877bb8721253352f6cec63d8d8c7356fd8f7f Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Mon, 16 Dec 2024 07:27:06 -0500 Subject: [PATCH 01/13] Spec tree --- pyproject.toml | 2 +- src/math_spec_mapping/Reports/html.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b90d2ff1..834bff40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project] name = "math-spec-mapping" -version = "0.3.18" +version = "0.3.19" authors = [ { name="Sean McOwen", email="Sean@Block.Science" }, ] diff --git a/src/math_spec_mapping/Reports/html.py b/src/math_spec_mapping/Reports/html.py index 572f1d46..8583e30f 100644 --- a/src/math_spec_mapping/Reports/html.py +++ b/src/math_spec_mapping/Reports/html.py @@ -169,6 +169,13 @@ def write_spec_tree( else: out += symbol3 + "{}".format(var.name) + "\n" + out += symbol1 + "**Metrics**\n" + for name in ms.metrics.keys(): + if linking: + out += symbol2 + "[[{}]]".format(name) + "\n" + else: + out += symbol2 + "{}".format(name) + "\n" + out += symbol1 + "**Types**\n" for name in ms.types.keys(): if linking: @@ -221,6 +228,12 @@ def write_spec_tree( out += symbol2 + "[[{}]]".format(name) + "\n" else: out += symbol2 + name + "\n" + out += symbol1 + "**Wirings**\n" + for name in ms.wiring.keys(): + if linking: + out += symbol2 + "[[{}]]".format(name) + "\n" + else: + out += symbol2 + name + "\n" if add_tabbing: out = out.split("\n") From e16611c72bf173c6743f437b32dc0799a28d57ad Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Mon, 16 Dec 2024 09:12:56 -0500 Subject: [PATCH 02/13] Issue 500 --- .../Load/action_transmission_channel.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/math_spec_mapping/Load/action_transmission_channel.py b/src/math_spec_mapping/Load/action_transmission_channel.py index 568180cd..a30eb9ae 100644 --- a/src/math_spec_mapping/Load/action_transmission_channel.py +++ b/src/math_spec_mapping/Load/action_transmission_channel.py @@ -50,8 +50,14 @@ def convert_action_transmission_channel( data["target"] = ms["Mechanisms"][target] # Add in called by and called here with origin and target - data["origin"].calls.append((data["target"], data["optional"], data["space"])) - data["target"].called_by.append((data["origin"], data["optional"], data["space"])) + if (data["target"], data["optional"], data["space"]) not in data["origin"].calls: + data["origin"].calls.append((data["target"], data["optional"], data["space"])) + if (data["origin"], data["optional"], data["space"]) not in data[ + "target" + ].called_by: + data["target"].called_by.append( + (data["origin"], data["optional"], data["space"]) + ) # Build the action transmission channel object return ActionTransmissionChannel(data) From 6aa8236cf3b3a0022e64565101f6f622cc241b0d Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 10:34:20 -0500 Subject: [PATCH 03/13] Issue 521 --- src/math_spec_mapping/Classes/MathSpec.py | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/math_spec_mapping/Classes/MathSpec.py b/src/math_spec_mapping/Classes/MathSpec.py index 241ac70f..b0f19a77 100644 --- a/src/math_spec_mapping/Classes/MathSpec.py +++ b/src/math_spec_mapping/Classes/MathSpec.py @@ -1010,6 +1010,14 @@ def load_control_actions(self): ) else: control_actions[ca.name] = opt.implementations["python"] + + for opt_i in [x for x in ca.control_action_options if x != opt]: + if "python" not in opt_i.implementations: + print( + "No python implementation for {} / {}. To fix this, go to Implementations/Python/ControlActions and add {}".format( + ca.name, opt_i.name, opt_i.name + ) + ) return control_actions def load_boundary_actions(self): @@ -1041,6 +1049,14 @@ def load_boundary_actions(self): ) else: boundary_actions[ba.name] = opt.implementations["python"] + + for opt_i in [x for x in ba.boundary_action_options if x != opt]: + if "python" not in opt_i.implementations: + print( + "No python implementation for {} / {}. To fix this, go to Implementations/Python/BoundaryActions and add {}".format( + ba.name, opt_i.name, opt_i.name + ) + ) return boundary_actions def load_mechanisms(self): @@ -1137,6 +1153,14 @@ def load_policies(self): ) else: policies[p.name] = opt.implementations["python"] + for opt_i in [x for x in p.policy_options if x != opt]: + if "python" not in opt_i.implementations: + print( + "No python implementation for {} / {}. To fix this, go to Implementations/Python/Policies and add {}".format( + p.name, opt_i.name, opt_i.name + ) + ) + return policies def load_stateful_metrics(self): From 96e442b4cd578267524413d2b300807b3c1cb6ec Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 10:43:27 -0500 Subject: [PATCH 04/13] Begin report creation plan --- research_notes/WIP Report Creation Plan.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 research_notes/WIP Report Creation Plan.md diff --git a/research_notes/WIP Report Creation Plan.md b/research_notes/WIP Report Creation Plan.md new file mode 100644 index 00000000..c68ce282 --- /dev/null +++ b/research_notes/WIP Report Creation Plan.md @@ -0,0 +1,22 @@ +# Report Creation Plan + +## Current Reporting Architecture + +## Desired Future Reporting Architecture + +- Switching to atomized functions +- Plug and play capabilities +- Style dictionaries for determining +- Multiple output avenues including PDF +- Create a mermaid chart to visualize what the future architecure will look like + + +## Outputs + +- Current and future outputs of the reporting modules +- Will be the primary goals for iteration + +## Issue Log + +- Putting together the issues of reporting from github +- Potentially can begin sorting them into larger milestones such as V0.5, V0.6, etc \ No newline at end of file From cd9808c2313f01ea68a9fc957cb5e13fa9bf39e0 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 22:12:41 -0500 Subject: [PATCH 05/13] Issue 446 --- src/math_spec_mapping/Load/boundary_actions.py | 4 +++- src/math_spec_mapping/Load/control_actions.py | 4 +++- src/math_spec_mapping/Load/general.py | 9 +++++++++ src/math_spec_mapping/Load/mechanism.py | 4 +++- src/math_spec_mapping/Load/policy.py | 3 ++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/math_spec_mapping/Load/boundary_actions.py b/src/math_spec_mapping/Load/boundary_actions.py index cef09506..014eb2b4 100644 --- a/src/math_spec_mapping/Load/boundary_actions.py +++ b/src/math_spec_mapping/Load/boundary_actions.py @@ -1,6 +1,6 @@ from typing import Dict from ..Classes import BoundaryAction, BoundaryActionOption -from .general import check_json_keys +from .general import check_json_keys, check_domain_codomain_spaces def convert_boundary_action(data: Dict, ms: Dict) -> BoundaryAction: @@ -24,6 +24,8 @@ def convert_boundary_action(data: Dict, ms: Dict) -> BoundaryAction: data["name"] ) + check_domain_codomain_spaces(data, ms) + if len(data["codomain"]) == 0: data["codomain"] = ("Empty Space",) diff --git a/src/math_spec_mapping/Load/control_actions.py b/src/math_spec_mapping/Load/control_actions.py index 3a63d4af..09393dfc 100644 --- a/src/math_spec_mapping/Load/control_actions.py +++ b/src/math_spec_mapping/Load/control_actions.py @@ -1,6 +1,6 @@ from typing import Dict from ..Classes import ControlAction, ControlActionOption -from .general import check_json_keys +from .general import check_json_keys, check_domain_codomain_spaces def convert_control_action(data: Dict, ms: Dict) -> ControlAction: @@ -25,6 +25,8 @@ def convert_control_action(data: Dict, ms: Dict) -> ControlAction: data["name"] ) + check_domain_codomain_spaces(data, ms) + if len(data["codomain"]) == 0: data["codomain"] = ("Empty Space",) diff --git a/src/math_spec_mapping/Load/general.py b/src/math_spec_mapping/Load/general.py index 13f8b67c..5dca9580 100644 --- a/src/math_spec_mapping/Load/general.py +++ b/src/math_spec_mapping/Load/general.py @@ -159,3 +159,12 @@ def check_json_keys(json: Dict, check_set_key: str) -> None: def validate_json_schema(json): validate(json, schema) + + +def check_domain_codomain_spaces(json: Dict, ms) -> None: + if "domain" in json: + for key in json["domain"]: + assert key in ms["Spaces"], "{} not in spaces".format(key) + if "codomain" in json: + for key in json["codomain"]: + assert key in ms["Spaces"], "{} not in spaces".format(key) diff --git a/src/math_spec_mapping/Load/mechanism.py b/src/math_spec_mapping/Load/mechanism.py index bd7d51b1..cf83afc2 100644 --- a/src/math_spec_mapping/Load/mechanism.py +++ b/src/math_spec_mapping/Load/mechanism.py @@ -1,6 +1,6 @@ from typing import Dict from ..Classes import Mechanism -from .general import check_json_keys +from .general import check_json_keys, check_domain_codomain_spaces def convert_mechanism(data: Dict, ms: Dict) -> Mechanism: @@ -26,6 +26,8 @@ def convert_mechanism(data: Dict, ms: Dict) -> Mechanism: if len(data["domain"]) == 0: data["domain"] = ("Empty Space",) + check_domain_codomain_spaces(data, ms) + # Copy data = data.copy() diff --git a/src/math_spec_mapping/Load/policy.py b/src/math_spec_mapping/Load/policy.py index 51ecbf7b..c5deeb6c 100644 --- a/src/math_spec_mapping/Load/policy.py +++ b/src/math_spec_mapping/Load/policy.py @@ -2,7 +2,7 @@ from ..Classes import Policy, PolicyOption -from .general import check_json_keys +from .general import check_json_keys, check_domain_codomain_spaces def convert_policy_options(data: Dict, ms) -> PolicyOption: @@ -58,6 +58,7 @@ def convert_policy(data: Dict, ms: Dict) -> Policy: assert type(data["domain"]) == tuple, "{} domain is not a tuple".format( data["name"] ) + check_domain_codomain_spaces(data, ms) if len(data["codomain"]) == 0: data["codomain"] = ("Empty Space",) From 7051c7896bda193db46302dae0145baea765ea82 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 22:16:44 -0500 Subject: [PATCH 06/13] Quick add --- src/math_spec_mapping/Classes/MathSpec.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/math_spec_mapping/Classes/MathSpec.py b/src/math_spec_mapping/Classes/MathSpec.py index b0f19a77..2e833cfe 100644 --- a/src/math_spec_mapping/Classes/MathSpec.py +++ b/src/math_spec_mapping/Classes/MathSpec.py @@ -439,7 +439,14 @@ def _crawl_spaces(self): self._used_spaces = list(set().union(*self._used_spaces)) us_names = [y.name for y in self._used_spaces] - self._unused_spaces = [self.spaces[x] for x in self.spaces if x not in us_names] + self._unused_spaces = [ + self.spaces[x] + for x in self.spaces + if x not in us_names and x not in ["Terminating Space", "Empty Space"] + ] + + if len(self._unused_spaces) > 0: + print("The following spaces are not used: {}".format(self._unused_spaces)) def _add_spec_tree(self, tree): self.tree = tree From 35890cfb955c5fec1789558e4a587146e4b8429b Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 22:21:59 -0500 Subject: [PATCH 07/13] Add components representation --- src/math_spec_mapping/Classes/Block.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/math_spec_mapping/Classes/Block.py b/src/math_spec_mapping/Classes/Block.py index eeffd248..3baef7e3 100644 --- a/src/math_spec_mapping/Classes/Block.py +++ b/src/math_spec_mapping/Classes/Block.py @@ -172,6 +172,9 @@ def components_full(self): out = list(set(out)) return out + def __repr__(self): + return "<{}>".format(self.name) + class ParallelBlock(Block): def __init__(self, data: Dict): From 00945c4024343becf738db6427cf56264238a486 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 22:37:22 -0500 Subject: [PATCH 08/13] Progress on report creation --- research_notes/WIP Report Creation Plan.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/research_notes/WIP Report Creation Plan.md b/research_notes/WIP Report Creation Plan.md index c68ce282..cf73278f 100644 --- a/research_notes/WIP Report Creation Plan.md +++ b/research_notes/WIP Report Creation Plan.md @@ -2,15 +2,19 @@ ## Current Reporting Architecture +- There are a handful of files such as mechanisms.py, policies.py, etc. that have mostly depcreated functions from the HTML writer version. +- All of the main abilities are housed in the markdown.py file that has each markdown file type broken down as functions, for example one for mechanisms, one for policies, etc. +- All the writer functions create markdown files which when opened in Obsidian create a nicely linked documentation system. + ## Desired Future Reporting Architecture -- Switching to atomized functions -- Plug and play capabilities +- [Switching to atomized functions](https://github.com/BlockScience/MSML/issues/165) will help to improve the ongoing maintenance of code +- There is an aim to have a "plug and play" feel to the reporting modules that allow for flexibility and choosing exactly how you want reports + - Creating [style dictionaries](https://github.com/BlockScience/MSML/issues/251) is one way that reports can become flexible - Style dictionaries for determining - Multiple output avenues including PDF - Create a mermaid chart to visualize what the future architecure will look like - ## Outputs - Current and future outputs of the reporting modules @@ -19,4 +23,8 @@ ## Issue Log - Putting together the issues of reporting from github -- Potentially can begin sorting them into larger milestones such as V0.5, V0.6, etc \ No newline at end of file +- Potentially can begin sorting them into larger milestones such as V0.5, V0.6, etc + +## Oustanding Questions + +1. How urgent is the style dictionary kind of customizability to people? \ No newline at end of file From cd221a484de421acbe7d16c3f213f0f6121463b5 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 22:53:20 -0500 Subject: [PATCH 09/13] More updates to report creation note --- research_notes/WIP Report Creation Plan.md | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/research_notes/WIP Report Creation Plan.md b/research_notes/WIP Report Creation Plan.md index cf73278f..00e4e1b6 100644 --- a/research_notes/WIP Report Creation Plan.md +++ b/research_notes/WIP Report Creation Plan.md @@ -11,14 +11,19 @@ - [Switching to atomized functions](https://github.com/BlockScience/MSML/issues/165) will help to improve the ongoing maintenance of code - There is an aim to have a "plug and play" feel to the reporting modules that allow for flexibility and choosing exactly how you want reports - Creating [style dictionaries](https://github.com/BlockScience/MSML/issues/251) is one way that reports can become flexible -- Style dictionaries for determining -- Multiple output avenues including PDF -- Create a mermaid chart to visualize what the future architecure will look like +- There will be a desire to have multiple output avenues + - Standard markdown + - Markdown with wikilinks for use in Obsidian + - [PDFs of markdown](https://github.com/BlockScience/MSML/issues/600) +- I want to also [create a mermaid graph](https://github.com/BlockScience/MSML/issues/601) or similar of the reporting architecture for both developer documentation as well as organizing thoughts on the best way to structure the codebase ## Outputs -- Current and future outputs of the reporting modules -- Will be the primary goals for iteration +1. Obsidian vault of markdown files (currently implemented) +2. [Individual markdown reports](https://github.com/BlockScience/MSML/issues/602) of components based on style dictionary (for things such as how deep to go in terms of just saying what domain is versus actually listing out the domain objects such as {"name": "Space 1", "schema": {....}} for giving stakeholders the entire picture) + - And the option to PDF it +3. [Specialized reports](https://github.com/BlockScience/MSML/issues/603) such as the parameter effects style whereby you can see every single block that is impacted downstream by parameters +4. Potential for future engine extensions to support things such as stock & flow diagrams (although it can be shifted in terms of the priority) ## Issue Log @@ -27,4 +32,12 @@ ## Oustanding Questions -1. How urgent is the style dictionary kind of customizability to people? \ No newline at end of file +1. How urgent is the style dictionary kind of customizability to people? +2. Are there any other formats besides markdown and PDF that people are interested in having? +3. What other kinds of reports would be desired? + +## An Aside on Stock & Flow +- I think stock & flow would add even more requirements on the JSON spec to have things such as a field for state variables used in the block +- This, however, could also be kept as an optional field +- And if code is bound to the component, then there might even be automation to actually read that data in automatically or create a specialized function for imputing it when you are feeling lazy but have the code bindings defined out already +- It seems like a quite often used chart so I am curious to hear if others believe it is worth it to invest the time into this as it would also be a somewhat decent lift \ No newline at end of file From 9f7e23cb26a3a12ec73deba1584e5587eadde554 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 23:04:02 -0500 Subject: [PATCH 10/13] Almost done with reporting creation plan --- dev/Issue Matrix.ipynb | 239 +++++++++++++-------- research_notes/WIP Report Creation Plan.md | 46 +++- 2 files changed, 190 insertions(+), 95 deletions(-) diff --git a/dev/Issue Matrix.ipynb b/dev/Issue Matrix.ipynb index 660f5e0e..d1d44bb8 100644 --- a/dev/Issue Matrix.ipynb +++ b/dev/Issue Matrix.ipynb @@ -44,38 +44,36 @@ "name": "stdout", "output_type": "stream", "text": [ - "| | V0.3.18 | V0.3.19 | V0.3.20 | V0.3.21 | V0.4.0 |\n", - "|:----------------|:-------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|\n", - "| Bug | [Re-running obsidian notebook can update wirings without actual changes](https://github.com/BlockScience/MSML/issues/579) | [There is not checking being done to make sure the type of stateful metrics actually is implemented](https://github.com/BlockScience/MSML/issues/553) | | | |\n", - "| | | [No Implementation Flag does not work if one of the implementations is filled in](https://github.com/BlockScience/MSML/issues/521) | | | |\n", - "| | | [Repeated Called By bug](https://github.com/BlockScience/MSML/issues/500) | | | |\n", - "| | | [Bug: MSML does not catch missing spaces if it is referenced in codomain](https://github.com/BlockScience/MSML/issues/446) | | | |\n", - "| Communications | | [Report Creation Plan](https://github.com/BlockScience/MSML/issues/530) | | | [V0.4 Update Note](https://github.com/BlockScience/MSML/issues/582) |\n", - "| | | | | | [V0.5 Project Plan](https://github.com/BlockScience/MSML/issues/512) |\n", - "| | | | | | [Add README sentences on MSML as showing the back-end to non-devs](https://github.com/BlockScience/MSML/issues/497) |\n", - "| | | | | | [Add Gov Pod presentation + walk through to presentation links](https://github.com/BlockScience/MSML/issues/484) |\n", - "| DevOps | | | | | |\n", - "| Discussions | | | | | [Github Pages for user documentation](https://github.com/BlockScience/MSML/issues/395) |\n", - "| Documentation | | | | | [Update MSML Canonical Example Comparison Table](https://github.com/BlockScience/MSML/issues/544) |\n", - "| | | | | | [Github Pages for user documentation](https://github.com/BlockScience/MSML/issues/395) |\n", - "| | | | | | [FAQ Section](https://github.com/BlockScience/MSML/issues/386) |\n", - "| | | | | | [Add a Getting Started Guide](https://github.com/BlockScience/MSML/issues/199) |\n", - "| Engine | [Add the code linking and source code stuff for metrics and stateful metrics](https://github.com/BlockScience/MSML/issues/576) | [Add __repr__ for components](https://github.com/BlockScience/MSML/issues/514) | [Allow outputs of spaces in metrics in addition to types](https://github.com/BlockScience/MSML/issues/554) | [Add a check that the functional parameter given is indeed one of the valid control/boundary action options](https://github.com/BlockScience/MSML/issues/411) | |\n", - "| | [Add links to the spec definition code in Obsidian output](https://github.com/BlockScience/MSML/issues/575) | | [Add __repr__ for types](https://github.com/BlockScience/MSML/issues/515) | [Change lines data[\"codomain\"] = tuple(ms[\"Spaces\"][x] for x in data[\"codomain\"]) to have assertions to check spaces exist](https://github.com/BlockScience/MSML/issues/397) | |\n", - "| | [Update Remove Starter Repo Functionality](https://github.com/BlockScience/MSML/issues/524) | | [Add descriptions to spaces as an attribute](https://github.com/BlockScience/MSML/issues/424) | | |\n", - "| | | | [Add domain and codomain checking for the executable blocks](https://github.com/BlockScience/MSML/issues/418) | | |\n", - "| Examples | [Add Removing of Implementations to remove dummy repo stuff](https://github.com/BlockScience/MSML/issues/472) | | | | |\n", - "| Improvements | | | | [Change lines data[\"codomain\"] = tuple(ms[\"Spaces\"][x] for x in data[\"codomain\"]) to have assertions to check spaces exist](https://github.com/BlockScience/MSML/issues/397) | |\n", - "| Metaprogramming | | | | | |\n", - "| Reporting | [Re-running obsidian notebook can update wirings without actual changes](https://github.com/BlockScience/MSML/issues/579) | | [Add specific line location for source code links](https://github.com/BlockScience/MSML/issues/574) | [Add a link back from state variables to the state in obsidian reporting](https://github.com/BlockScience/MSML/issues/578) | |\n", - "| | [Add the code linking and source code stuff for metrics and stateful metrics](https://github.com/BlockScience/MSML/issues/576) | | [Add in state variables linking for the mechanism markdown report](https://github.com/BlockScience/MSML/issues/209) | [Update state updates wiring diagram to make it super clear that state variables are not a wiring](https://github.com/BlockScience/MSML/issues/506) | |\n", - "| | [Add links to the spec definition code in Obsidian output](https://github.com/BlockScience/MSML/issues/575) | | | | |\n", - "| | [Add obsidian linking for spaces in mermaid graphic](https://github.com/BlockScience/MSML/issues/573) | | | | |\n", - "| | [Add parameters used to boundary action markdown](https://github.com/BlockScience/MSML/issues/505) | | | | |\n", - "| Research | | | | | |\n", - "| Simulation | | | | [Add mapping function that maps parameter modification to metadata columns](https://github.com/BlockScience/MSML/issues/467) | |\n", - "| Testing | | | | | |\n", - "| UI | | | | | |\n" + "| | V0.3.19 | V0.3.20 | V0.3.21 | V0.4.0 |\n", + "|:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|\n", + "| Blocked | | | | |\n", + "| Bug | [There is not checking being done to make sure the type of stateful metrics actually is implemented](https://github.com/BlockScience/MSML/issues/553) | | | |\n", + "| | [No Implementation Flag does not work if one of the implementations is filled in](https://github.com/BlockScience/MSML/issues/521) | | | |\n", + "| | [Repeated Called By bug](https://github.com/BlockScience/MSML/issues/500) | | | |\n", + "| | [Bug: MSML does not catch missing spaces if it is referenced in codomain](https://github.com/BlockScience/MSML/issues/446) | | | |\n", + "| Communications | [Report Creation Plan](https://github.com/BlockScience/MSML/issues/530) | | | [V0.4 Update Note](https://github.com/BlockScience/MSML/issues/582) |\n", + "| | | | | [V0.5 Project Plan](https://github.com/BlockScience/MSML/issues/512) |\n", + "| | | | | [Add README sentences on MSML as showing the back-end to non-devs](https://github.com/BlockScience/MSML/issues/497) |\n", + "| | | | | [Add Gov Pod presentation + walk through to presentation links](https://github.com/BlockScience/MSML/issues/484) |\n", + "| DevOps | | | | |\n", + "| Discussions | | | | [Github Pages for user documentation](https://github.com/BlockScience/MSML/issues/395) |\n", + "| Documentation | | | | [Update MSML Canonical Example Comparison Table](https://github.com/BlockScience/MSML/issues/544) |\n", + "| | | | | [Github Pages for user documentation](https://github.com/BlockScience/MSML/issues/395) |\n", + "| | | | | [FAQ Section](https://github.com/BlockScience/MSML/issues/386) |\n", + "| | | | | [Add a Getting Started Guide](https://github.com/BlockScience/MSML/issues/199) |\n", + "| Engine | [Add __repr__ for components](https://github.com/BlockScience/MSML/issues/514) | [Allow outputs of spaces in metrics in addition to types](https://github.com/BlockScience/MSML/issues/554) | [Add a check that the functional parameter given is indeed one of the valid control/boundary action options](https://github.com/BlockScience/MSML/issues/411) | |\n", + "| | | [Add __repr__ for types](https://github.com/BlockScience/MSML/issues/515) | [Change lines data[\"codomain\"] = tuple(ms[\"Spaces\"][x] for x in data[\"codomain\"]) to have assertions to check spaces exist](https://github.com/BlockScience/MSML/issues/397) | |\n", + "| | | [Add descriptions to spaces as an attribute](https://github.com/BlockScience/MSML/issues/424) | | |\n", + "| | | [Add domain and codomain checking for the executable blocks](https://github.com/BlockScience/MSML/issues/418) | | |\n", + "| Examples | | | | |\n", + "| Improvements | [Add Wirings and Metrics to Spec Tree](https://github.com/BlockScience/MSML/issues/598) | | [Change lines data[\"codomain\"] = tuple(ms[\"Spaces\"][x] for x in data[\"codomain\"]) to have assertions to check spaces exist](https://github.com/BlockScience/MSML/issues/397) | |\n", + "| Metaprogramming | | | | |\n", + "| Reporting | [Add Wirings and Metrics to Spec Tree](https://github.com/BlockScience/MSML/issues/598) | [Add specific line location for source code links](https://github.com/BlockScience/MSML/issues/574) | [Add a link back from state variables to the state in obsidian reporting](https://github.com/BlockScience/MSML/issues/578) | |\n", + "| | [Make source code linking work for displays](https://github.com/BlockScience/MSML/issues/593) | [Add in state variables linking for the mechanism markdown report](https://github.com/BlockScience/MSML/issues/209) | [Update state updates wiring diagram to make it super clear that state variables are not a wiring](https://github.com/BlockScience/MSML/issues/506) | |\n", + "| Research | | | | |\n", + "| Simulation | | | [Add mapping function that maps parameter modification to metadata columns](https://github.com/BlockScience/MSML/issues/467) | |\n", + "| Testing | | | | |\n", + "| UI | | | | |\n" ] } ], @@ -83,6 +81,56 @@ "print(table2.to_markdown())" ] }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "| | Reporting |\n", + "|:----------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n", + "| High Priority | [Create plan for specialized reports](https://github.com/BlockScience/MSML/issues/603) |\n", + "| | [Create plan for individual markdown reports](https://github.com/BlockScience/MSML/issues/602) |\n", + "| | [Create a mermaid graph or similar of the reporting architecture](https://github.com/BlockScience/MSML/issues/601) |\n", + "| | [Revive PDF Writing Abilities for Reporting](https://github.com/BlockScience/MSML/issues/600) |\n", + "| | [Add something for displaying source code for wiring](https://github.com/BlockScience/MSML/issues/570) |\n", + "| | [For policies/mechanisms/etc add in a section for markdown reporting that says wirings that it is involved in](https://github.com/BlockScience/MSML/issues/258) |\n", + "| | [Switch legacy reporting to be using mermaid + markdown](https://github.com/BlockScience/MSML/issues/155) |\n", + "| | [Add Table comparing policy options, boundary options, etc](https://github.com/BlockScience/MSML/issues/148) |\n", + "| Medium Priority | [Obsidian Canvas Creator for Wirings](https://github.com/BlockScience/MSML/issues/541) |\n", + "| | [Add Metrics and Stateful Metrics used to Mermaid Charts](https://github.com/BlockScience/MSML/issues/540) |\n", + "| | [Stock and Flow generator](https://github.com/BlockScience/MSML/issues/498) |\n", + "| | [Idea: Auto-displays](https://github.com/BlockScience/MSML/issues/280) |\n", + "| | [Convert action chain report to markdown](https://github.com/BlockScience/MSML/issues/254) |\n", + "| | [Convert entity report to markdown](https://github.com/BlockScience/MSML/issues/253) |\n", + "| | [Make write basic report markdown](https://github.com/BlockScience/MSML/issues/252) |\n", + "| | [Atomize Writing Functions](https://github.com/BlockScience/MSML/issues/165) |\n", + "| | [Add Policy Report](https://github.com/BlockScience/MSML/issues/159) |\n", + "| | [Add parameters impacting to policy, behaviors, etc. in report write out](https://github.com/BlockScience/MSML/issues/89) |\n", + "| | [Make a type of report that is a parameter report](https://github.com/BlockScience/MSML/issues/74) |\n", + "| | [Replicate Something like write_full_state_section from the alpha version](https://github.com/BlockScience/MSML/issues/58) |\n", + "| Low Priority | [Add obsidian plugins to starter repos and have a function that also can populate them](https://github.com/BlockScience/MSML/issues/387) |\n", + "| | [Add ability to de-emphasize certain wirings by marking them with a flag that puts their reports into an \"extra\" wiring](https://github.com/BlockScience/MSML/issues/381) |\n", + "| | [Figure out how to force CSS snippets used](https://github.com/BlockScience/MSML/issues/322) |\n", + "| | [Idea: Top level tag for wirings](https://github.com/BlockScience/MSML/issues/281) |\n", + "| | [Add images assets functionality](https://github.com/BlockScience/MSML/issues/260) |\n", + "| | [Mermaid graph assets functionality](https://github.com/BlockScience/MSML/issues/259) |\n", + "| | [Style Dictionary options](https://github.com/BlockScience/MSML/issues/251) |\n", + "| | [Consider a format dictionary for MSML that allows you to override certain formatting options](https://github.com/BlockScience/MSML/issues/246) |\n", + "| | [Add metric linkages to the reporting for components](https://github.com/BlockScience/MSML/issues/233) |\n", + "| | [Metric report](https://github.com/BlockScience/MSML/issues/231) |\n", + "| | [Exclude Dictionary Feature](https://github.com/BlockScience/MSML/issues/79) |\n", + "| | [Add Parameters to Graph Option](https://github.com/BlockScience/MSML/issues/53) |\n" + ] + } + ], + "source": [ + "print(table1.loc['Reporting'].to_markdown())" + ] + }, { "cell_type": "code", "execution_count": 3, @@ -94,6 +142,7 @@ "text": [ "| | High Priority | Medium Priority | Low Priority |\n", "|:----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n", + "| Blocked | [Documentation on types of Reports](https://github.com/BlockScience/MSML/issues/597) | | |\n", "| Bug | [Boundary Actions Metaprogramming needs to change dashes to underscores](https://github.com/BlockScience/MSML/issues/526) | [Fix Julia Type Mappings Not Loading](https://github.com/BlockScience/MSML/issues/525) | |\n", "| Communications | [Rosetta stone research note](https://github.com/BlockScience/MSML/issues/360) | [Stateful metric v metric comparison](https://github.com/BlockScience/MSML/issues/434) | [Add sub-tags to issues](https://github.com/BlockScience/MSML/issues/584) |\n", "| | | [Create documentation on the creation of research notes](https://github.com/BlockScience/MSML/issues/391) | [Consider creating an MSML organization to host all of the canonical examples and extra stuff](https://github.com/BlockScience/MSML/issues/375) |\n", @@ -116,10 +165,11 @@ "| | | [Idea: Remote State](https://github.com/BlockScience/MSML/issues/247) | [Sensor](https://github.com/BlockScience/MSML/issues/63) |\n", "| | | | [Should control actions have the ability to say what kinds of state effects the thing happening](https://github.com/BlockScience/MSML/issues/62) |\n", "| | | | [Discuss if constraints should be strings, actual blocks, or a combination](https://github.com/BlockScience/MSML/issues/46) |\n", - "| Documentation | [Finish JSON Spec documentation](https://github.com/BlockScience/MSML/issues/298) | [Improve the semantics of pre and post processing functions](https://github.com/BlockScience/MSML/issues/532) | [Add documentation to describe the different types of reports](https://github.com/BlockScience/MSML/issues/305) |\n", - "| | | [Add a json schema for implementations](https://github.com/BlockScience/MSML/issues/440) | |\n", - "| | | [Stateful metric v metric comparison](https://github.com/BlockScience/MSML/issues/434) | |\n", - "| | | [Create gameplan for docstrings / documentation](https://github.com/BlockScience/MSML/issues/157) | |\n", + "| Documentation | [Documentation on types of Reports](https://github.com/BlockScience/MSML/issues/597) | [Improve the semantics of pre and post processing functions](https://github.com/BlockScience/MSML/issues/532) | [Add documentation to describe the different types of reports](https://github.com/BlockScience/MSML/issues/305) |\n", + "| | [Documentation on MSML vs. cadCAD](https://github.com/BlockScience/MSML/issues/596) | [Add a json schema for implementations](https://github.com/BlockScience/MSML/issues/440) | |\n", + "| | [MSML Deliverable Listing](https://github.com/BlockScience/MSML/issues/595) | [Stateful metric v metric comparison](https://github.com/BlockScience/MSML/issues/434) | |\n", + "| | [MSML Capabilities Listing](https://github.com/BlockScience/MSML/issues/594) | [Create gameplan for docstrings / documentation](https://github.com/BlockScience/MSML/issues/157) | |\n", + "| | [Finish JSON Spec documentation](https://github.com/BlockScience/MSML/issues/298) | | |\n", "| Engine | [Add something for displaying source code for wiring](https://github.com/BlockScience/MSML/issues/570) | [Should there be a way to have parameters + parameters used from metrics/stateful metrics for blocks?](https://github.com/BlockScience/MSML/issues/581) | [Add an assertion that implementations is not holding any extra keys](https://github.com/BlockScience/MSML/issues/421) |\n", "| | [Wiring Variable Updates](https://github.com/BlockScience/MSML/issues/563) | [Add performance monitoring timer](https://github.com/BlockScience/MSML/issues/529) | [Idea: allow domain/codomain matching to be relaxed for earlier creation stuff as an optional mode](https://github.com/BlockScience/MSML/issues/414) |\n", "| | [Add checking for local state](https://github.com/BlockScience/MSML/issues/549) | [Block Execution Cache](https://github.com/BlockScience/MSML/issues/528) | [Change the functional parameter type from strings to a literal of the actual options](https://github.com/BlockScience/MSML/issues/346) |\n", @@ -164,14 +214,14 @@ "| | [Python Metaprogramming Wiring](https://github.com/BlockScience/MSML/issues/334) | | |\n", "| | [Python Metaprogramming Control Action](https://github.com/BlockScience/MSML/issues/333) | | |\n", "| | [Python Metaprogramming Boundary Action](https://github.com/BlockScience/MSML/issues/332) | | |\n", - "| Reporting | [Add something for displaying source code for wiring](https://github.com/BlockScience/MSML/issues/570) | [Obsidian Canvas Creator for Wirings](https://github.com/BlockScience/MSML/issues/541) | [Add obsidian plugins to starter repos and have a function that also can populate them](https://github.com/BlockScience/MSML/issues/387) |\n", - "| | [For policies/mechanisms/etc add in a section for markdown reporting that says wirings that it is involved in](https://github.com/BlockScience/MSML/issues/258) | [Add Metrics and Stateful Metrics used to Mermaid Charts](https://github.com/BlockScience/MSML/issues/540) | [Add ability to de-emphasize certain wirings by marking them with a flag that puts their reports into an \"extra\" wiring](https://github.com/BlockScience/MSML/issues/381) |\n", - "| | [Switch legacy reporting to be using mermaid + markdown](https://github.com/BlockScience/MSML/issues/155) | [Stock and Flow generator](https://github.com/BlockScience/MSML/issues/498) | [Figure out how to force CSS snippets used](https://github.com/BlockScience/MSML/issues/322) |\n", - "| | [Add Table comparing policy options, boundary options, etc](https://github.com/BlockScience/MSML/issues/148) | [Idea: Auto-displays](https://github.com/BlockScience/MSML/issues/280) | [Idea: Top level tag for wirings](https://github.com/BlockScience/MSML/issues/281) |\n", - "| | | [Convert action chain report to markdown](https://github.com/BlockScience/MSML/issues/254) | [Add images assets functionality](https://github.com/BlockScience/MSML/issues/260) |\n", - "| | | [Convert entity report to markdown](https://github.com/BlockScience/MSML/issues/253) | [Mermaid graph assets functionality](https://github.com/BlockScience/MSML/issues/259) |\n", - "| | | [Make write basic report markdown](https://github.com/BlockScience/MSML/issues/252) | [Style Dictionary options](https://github.com/BlockScience/MSML/issues/251) |\n", - "| | | [Atomize Writing Functions](https://github.com/BlockScience/MSML/issues/165) | [Consider a format dictionary for MSML that allows you to override certain formatting options](https://github.com/BlockScience/MSML/issues/246) |\n", + "| Reporting | [Create plan for specialized reports](https://github.com/BlockScience/MSML/issues/603) | [Obsidian Canvas Creator for Wirings](https://github.com/BlockScience/MSML/issues/541) | [Add obsidian plugins to starter repos and have a function that also can populate them](https://github.com/BlockScience/MSML/issues/387) |\n", + "| | [Create plan for individual markdown reports](https://github.com/BlockScience/MSML/issues/602) | [Add Metrics and Stateful Metrics used to Mermaid Charts](https://github.com/BlockScience/MSML/issues/540) | [Add ability to de-emphasize certain wirings by marking them with a flag that puts their reports into an \"extra\" wiring](https://github.com/BlockScience/MSML/issues/381) |\n", + "| | [Create a mermaid graph or similar of the reporting architecture](https://github.com/BlockScience/MSML/issues/601) | [Stock and Flow generator](https://github.com/BlockScience/MSML/issues/498) | [Figure out how to force CSS snippets used](https://github.com/BlockScience/MSML/issues/322) |\n", + "| | [Revive PDF Writing Abilities for Reporting](https://github.com/BlockScience/MSML/issues/600) | [Idea: Auto-displays](https://github.com/BlockScience/MSML/issues/280) | [Idea: Top level tag for wirings](https://github.com/BlockScience/MSML/issues/281) |\n", + "| | [Add something for displaying source code for wiring](https://github.com/BlockScience/MSML/issues/570) | [Convert action chain report to markdown](https://github.com/BlockScience/MSML/issues/254) | [Add images assets functionality](https://github.com/BlockScience/MSML/issues/260) |\n", + "| | [For policies/mechanisms/etc add in a section for markdown reporting that says wirings that it is involved in](https://github.com/BlockScience/MSML/issues/258) | [Convert entity report to markdown](https://github.com/BlockScience/MSML/issues/253) | [Mermaid graph assets functionality](https://github.com/BlockScience/MSML/issues/259) |\n", + "| | [Switch legacy reporting to be using mermaid + markdown](https://github.com/BlockScience/MSML/issues/155) | [Make write basic report markdown](https://github.com/BlockScience/MSML/issues/252) | [Style Dictionary options](https://github.com/BlockScience/MSML/issues/251) |\n", + "| | [Add Table comparing policy options, boundary options, etc](https://github.com/BlockScience/MSML/issues/148) | [Atomize Writing Functions](https://github.com/BlockScience/MSML/issues/165) | [Consider a format dictionary for MSML that allows you to override certain formatting options](https://github.com/BlockScience/MSML/issues/246) |\n", "| | | [Add Policy Report](https://github.com/BlockScience/MSML/issues/159) | [Add metric linkages to the reporting for components](https://github.com/BlockScience/MSML/issues/233) |\n", "| | | [Add parameters impacting to policy, behaviors, etc. in report write out](https://github.com/BlockScience/MSML/issues/89) | [Metric report](https://github.com/BlockScience/MSML/issues/231) |\n", "| | | [Make a type of report that is a parameter report](https://github.com/BlockScience/MSML/issues/74) | [Exclude Dictionary Feature](https://github.com/BlockScience/MSML/issues/79) |\n", @@ -202,7 +252,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -210,6 +260,7 @@ "text/markdown": [ "| | High Priority | Medium Priority | Low Priority |\n", "|:----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n", + "| Blocked | [Documentation on types of Reports](https://github.com/BlockScience/MSML/issues/597) | | |\n", "| Bug | [Boundary Actions Metaprogramming needs to change dashes to underscores](https://github.com/BlockScience/MSML/issues/526) | [Fix Julia Type Mappings Not Loading](https://github.com/BlockScience/MSML/issues/525) | |\n", "| Communications | [Rosetta stone research note](https://github.com/BlockScience/MSML/issues/360) | [Stateful metric v metric comparison](https://github.com/BlockScience/MSML/issues/434) | [Add sub-tags to issues](https://github.com/BlockScience/MSML/issues/584) |\n", "| | | [Create documentation on the creation of research notes](https://github.com/BlockScience/MSML/issues/391) | [Consider creating an MSML organization to host all of the canonical examples and extra stuff](https://github.com/BlockScience/MSML/issues/375) |\n", @@ -232,10 +283,11 @@ "| | | [Idea: Remote State](https://github.com/BlockScience/MSML/issues/247) | [Sensor](https://github.com/BlockScience/MSML/issues/63) |\n", "| | | | [Should control actions have the ability to say what kinds of state effects the thing happening](https://github.com/BlockScience/MSML/issues/62) |\n", "| | | | [Discuss if constraints should be strings, actual blocks, or a combination](https://github.com/BlockScience/MSML/issues/46) |\n", - "| Documentation | [Finish JSON Spec documentation](https://github.com/BlockScience/MSML/issues/298) | [Improve the semantics of pre and post processing functions](https://github.com/BlockScience/MSML/issues/532) | [Add documentation to describe the different types of reports](https://github.com/BlockScience/MSML/issues/305) |\n", - "| | | [Add a json schema for implementations](https://github.com/BlockScience/MSML/issues/440) | |\n", - "| | | [Stateful metric v metric comparison](https://github.com/BlockScience/MSML/issues/434) | |\n", - "| | | [Create gameplan for docstrings / documentation](https://github.com/BlockScience/MSML/issues/157) | |\n", + "| Documentation | [Documentation on types of Reports](https://github.com/BlockScience/MSML/issues/597) | [Improve the semantics of pre and post processing functions](https://github.com/BlockScience/MSML/issues/532) | [Add documentation to describe the different types of reports](https://github.com/BlockScience/MSML/issues/305) |\n", + "| | [Documentation on MSML vs. cadCAD](https://github.com/BlockScience/MSML/issues/596) | [Add a json schema for implementations](https://github.com/BlockScience/MSML/issues/440) | |\n", + "| | [MSML Deliverable Listing](https://github.com/BlockScience/MSML/issues/595) | [Stateful metric v metric comparison](https://github.com/BlockScience/MSML/issues/434) | |\n", + "| | [MSML Capabilities Listing](https://github.com/BlockScience/MSML/issues/594) | [Create gameplan for docstrings / documentation](https://github.com/BlockScience/MSML/issues/157) | |\n", + "| | [Finish JSON Spec documentation](https://github.com/BlockScience/MSML/issues/298) | | |\n", "| Engine | [Add something for displaying source code for wiring](https://github.com/BlockScience/MSML/issues/570) | [Should there be a way to have parameters + parameters used from metrics/stateful metrics for blocks?](https://github.com/BlockScience/MSML/issues/581) | [Add an assertion that implementations is not holding any extra keys](https://github.com/BlockScience/MSML/issues/421) |\n", "| | [Wiring Variable Updates](https://github.com/BlockScience/MSML/issues/563) | [Add performance monitoring timer](https://github.com/BlockScience/MSML/issues/529) | [Idea: allow domain/codomain matching to be relaxed for earlier creation stuff as an optional mode](https://github.com/BlockScience/MSML/issues/414) |\n", "| | [Add checking for local state](https://github.com/BlockScience/MSML/issues/549) | [Block Execution Cache](https://github.com/BlockScience/MSML/issues/528) | [Change the functional parameter type from strings to a literal of the actual options](https://github.com/BlockScience/MSML/issues/346) |\n", @@ -280,14 +332,14 @@ "| | [Python Metaprogramming Wiring](https://github.com/BlockScience/MSML/issues/334) | | |\n", "| | [Python Metaprogramming Control Action](https://github.com/BlockScience/MSML/issues/333) | | |\n", "| | [Python Metaprogramming Boundary Action](https://github.com/BlockScience/MSML/issues/332) | | |\n", - "| Reporting | [Add something for displaying source code for wiring](https://github.com/BlockScience/MSML/issues/570) | [Obsidian Canvas Creator for Wirings](https://github.com/BlockScience/MSML/issues/541) | [Add obsidian plugins to starter repos and have a function that also can populate them](https://github.com/BlockScience/MSML/issues/387) |\n", - "| | [For policies/mechanisms/etc add in a section for markdown reporting that says wirings that it is involved in](https://github.com/BlockScience/MSML/issues/258) | [Add Metrics and Stateful Metrics used to Mermaid Charts](https://github.com/BlockScience/MSML/issues/540) | [Add ability to de-emphasize certain wirings by marking them with a flag that puts their reports into an \"extra\" wiring](https://github.com/BlockScience/MSML/issues/381) |\n", - "| | [Switch legacy reporting to be using mermaid + markdown](https://github.com/BlockScience/MSML/issues/155) | [Stock and Flow generator](https://github.com/BlockScience/MSML/issues/498) | [Figure out how to force CSS snippets used](https://github.com/BlockScience/MSML/issues/322) |\n", - "| | [Add Table comparing policy options, boundary options, etc](https://github.com/BlockScience/MSML/issues/148) | [Idea: Auto-displays](https://github.com/BlockScience/MSML/issues/280) | [Idea: Top level tag for wirings](https://github.com/BlockScience/MSML/issues/281) |\n", - "| | | [Convert action chain report to markdown](https://github.com/BlockScience/MSML/issues/254) | [Add images assets functionality](https://github.com/BlockScience/MSML/issues/260) |\n", - "| | | [Convert entity report to markdown](https://github.com/BlockScience/MSML/issues/253) | [Mermaid graph assets functionality](https://github.com/BlockScience/MSML/issues/259) |\n", - "| | | [Make write basic report markdown](https://github.com/BlockScience/MSML/issues/252) | [Style Dictionary options](https://github.com/BlockScience/MSML/issues/251) |\n", - "| | | [Atomize Writing Functions](https://github.com/BlockScience/MSML/issues/165) | [Consider a format dictionary for MSML that allows you to override certain formatting options](https://github.com/BlockScience/MSML/issues/246) |\n", + "| Reporting | [Create plan for specialized reports](https://github.com/BlockScience/MSML/issues/603) | [Obsidian Canvas Creator for Wirings](https://github.com/BlockScience/MSML/issues/541) | [Add obsidian plugins to starter repos and have a function that also can populate them](https://github.com/BlockScience/MSML/issues/387) |\n", + "| | [Create plan for individual markdown reports](https://github.com/BlockScience/MSML/issues/602) | [Add Metrics and Stateful Metrics used to Mermaid Charts](https://github.com/BlockScience/MSML/issues/540) | [Add ability to de-emphasize certain wirings by marking them with a flag that puts their reports into an \"extra\" wiring](https://github.com/BlockScience/MSML/issues/381) |\n", + "| | [Create a mermaid graph or similar of the reporting architecture](https://github.com/BlockScience/MSML/issues/601) | [Stock and Flow generator](https://github.com/BlockScience/MSML/issues/498) | [Figure out how to force CSS snippets used](https://github.com/BlockScience/MSML/issues/322) |\n", + "| | [Revive PDF Writing Abilities for Reporting](https://github.com/BlockScience/MSML/issues/600) | [Idea: Auto-displays](https://github.com/BlockScience/MSML/issues/280) | [Idea: Top level tag for wirings](https://github.com/BlockScience/MSML/issues/281) |\n", + "| | [Add something for displaying source code for wiring](https://github.com/BlockScience/MSML/issues/570) | [Convert action chain report to markdown](https://github.com/BlockScience/MSML/issues/254) | [Add images assets functionality](https://github.com/BlockScience/MSML/issues/260) |\n", + "| | [For policies/mechanisms/etc add in a section for markdown reporting that says wirings that it is involved in](https://github.com/BlockScience/MSML/issues/258) | [Convert entity report to markdown](https://github.com/BlockScience/MSML/issues/253) | [Mermaid graph assets functionality](https://github.com/BlockScience/MSML/issues/259) |\n", + "| | [Switch legacy reporting to be using mermaid + markdown](https://github.com/BlockScience/MSML/issues/155) | [Make write basic report markdown](https://github.com/BlockScience/MSML/issues/252) | [Style Dictionary options](https://github.com/BlockScience/MSML/issues/251) |\n", + "| | [Add Table comparing policy options, boundary options, etc](https://github.com/BlockScience/MSML/issues/148) | [Atomize Writing Functions](https://github.com/BlockScience/MSML/issues/165) | [Consider a format dictionary for MSML that allows you to override certain formatting options](https://github.com/BlockScience/MSML/issues/246) |\n", "| | | [Add Policy Report](https://github.com/BlockScience/MSML/issues/159) | [Add metric linkages to the reporting for components](https://github.com/BlockScience/MSML/issues/233) |\n", "| | | [Add parameters impacting to policy, behaviors, etc. in report write out](https://github.com/BlockScience/MSML/issues/89) | [Metric report](https://github.com/BlockScience/MSML/issues/231) |\n", "| | | [Make a type of report that is a parameter report](https://github.com/BlockScience/MSML/issues/74) | [Exclude Dictionary Feature](https://github.com/BlockScience/MSML/issues/79) |\n", @@ -301,10 +353,13 @@ "| | | [Compare with SysML](https://github.com/BlockScience/MSML/issues/273) | [Figure out impact of python 3.12 typing](https://github.com/BlockScience/MSML/issues/238) |\n", "| | | [Explore connections with canvases](https://github.com/BlockScience/MSML/issues/270) | [Consider Using Feature Folder Structure](https://github.com/BlockScience/MSML/issues/35) |\n", "| | | [Explore DRAKON for inspiration on representation of processes](https://github.com/BlockScience/MSML/issues/143) | [Explore the use of SQLAlchemy](https://github.com/BlockScience/MSML/issues/16) |\n", - "| Simulation | [For MSI, make it possible to have the python types mapped out automatically](https://github.com/BlockScience/MSML/issues/535) | [MSML to Git Issues for cadCAD Functionality](https://github.com/BlockScience/MSML/issues/542) | |\n", - "| | [Simulations as Blocks](https://github.com/BlockScience/MSML/issues/534) | [JSON Spec for Experiment + Loading Functionality and Validation of It](https://github.com/BlockScience/MSML/issues/459) | |\n", + "| Simulation | [POC of multiprocessing with dask](https://github.com/BlockScience/MSML/issues/589) | [MSML to Git Issues for cadCAD Functionality](https://github.com/BlockScience/MSML/issues/542) | |\n", + "| | [POC of multiprocessing with ray](https://github.com/BlockScience/MSML/issues/588) | [JSON Spec for Experiment + Loading Functionality and Validation of It](https://github.com/BlockScience/MSML/issues/459) | |\n", + "| | [POC of multiprocessing with multiprocessing library](https://github.com/BlockScience/MSML/issues/587) | | |\n", + "| | [For MSI, make it possible to have the python types mapped out automatically](https://github.com/BlockScience/MSML/issues/535) | | |\n", + "| | [Simulations as Blocks](https://github.com/BlockScience/MSML/issues/534) | | |\n", "| | [Create \"Experiment Groups\" that let you do things like cartesian sweeps or something to create a whole bunch of experiments](https://github.com/BlockScience/MSML/issues/463) | | |\n", - "| Testing | | [Begin Building Tests](https://github.com/BlockScience/MSML/issues/1) | |\n", + "| Testing | [Create Automated Testing Framework Plan](https://github.com/BlockScience/MSML/issues/590) | [Begin Building Tests](https://github.com/BlockScience/MSML/issues/1) | |\n", "| UI | | [Consider using obsidian as input GUI](https://github.com/BlockScience/MSML/issues/536) | |" ] }, @@ -319,44 +374,42 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ - "| | V0.3.18 | V0.3.19 | V0.3.20 | V0.3.21 | V0.4.0 |\n", - "|:----------------|:-------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|\n", - "| Bug | [Re-running obsidian notebook can update wirings without actual changes](https://github.com/BlockScience/MSML/issues/579) | [There is not checking being done to make sure the type of stateful metrics actually is implemented](https://github.com/BlockScience/MSML/issues/553) | | | |\n", - "| | | [No Implementation Flag does not work if one of the implementations is filled in](https://github.com/BlockScience/MSML/issues/521) | | | |\n", - "| | | [Repeated Called By bug](https://github.com/BlockScience/MSML/issues/500) | | | |\n", - "| | | [Bug: MSML does not catch missing spaces if it is referenced in codomain](https://github.com/BlockScience/MSML/issues/446) | | | |\n", - "| Communications | | [Report Creation Plan](https://github.com/BlockScience/MSML/issues/530) | | | [V0.4 Update Note](https://github.com/BlockScience/MSML/issues/582) |\n", - "| | | | | | [V0.5 Project Plan](https://github.com/BlockScience/MSML/issues/512) |\n", - "| | | | | | [Add README sentences on MSML as showing the back-end to non-devs](https://github.com/BlockScience/MSML/issues/497) |\n", - "| | | | | | [Add Gov Pod presentation + walk through to presentation links](https://github.com/BlockScience/MSML/issues/484) |\n", - "| DevOps | | | | | |\n", - "| Discussions | | | | | [Github Pages for user documentation](https://github.com/BlockScience/MSML/issues/395) |\n", - "| Documentation | | | | | [Update MSML Canonical Example Comparison Table](https://github.com/BlockScience/MSML/issues/544) |\n", - "| | | | | | [Github Pages for user documentation](https://github.com/BlockScience/MSML/issues/395) |\n", - "| | | | | | [FAQ Section](https://github.com/BlockScience/MSML/issues/386) |\n", - "| | | | | | [Add a Getting Started Guide](https://github.com/BlockScience/MSML/issues/199) |\n", - "| Engine | [Add the code linking and source code stuff for metrics and stateful metrics](https://github.com/BlockScience/MSML/issues/576) | [Add __repr__ for components](https://github.com/BlockScience/MSML/issues/514) | [Allow outputs of spaces in metrics in addition to types](https://github.com/BlockScience/MSML/issues/554) | [Add a check that the functional parameter given is indeed one of the valid control/boundary action options](https://github.com/BlockScience/MSML/issues/411) | |\n", - "| | [Add links to the spec definition code in Obsidian output](https://github.com/BlockScience/MSML/issues/575) | | [Add __repr__ for types](https://github.com/BlockScience/MSML/issues/515) | [Change lines data[\"codomain\"] = tuple(ms[\"Spaces\"][x] for x in data[\"codomain\"]) to have assertions to check spaces exist](https://github.com/BlockScience/MSML/issues/397) | |\n", - "| | [Update Remove Starter Repo Functionality](https://github.com/BlockScience/MSML/issues/524) | | [Add descriptions to spaces as an attribute](https://github.com/BlockScience/MSML/issues/424) | | |\n", - "| | | | [Add domain and codomain checking for the executable blocks](https://github.com/BlockScience/MSML/issues/418) | | |\n", - "| Examples | [Add Removing of Implementations to remove dummy repo stuff](https://github.com/BlockScience/MSML/issues/472) | | | | |\n", - "| Improvements | | | | [Change lines data[\"codomain\"] = tuple(ms[\"Spaces\"][x] for x in data[\"codomain\"]) to have assertions to check spaces exist](https://github.com/BlockScience/MSML/issues/397) | |\n", - "| Metaprogramming | | | | | |\n", - "| Reporting | [Re-running obsidian notebook can update wirings without actual changes](https://github.com/BlockScience/MSML/issues/579) | | [Add specific line location for source code links](https://github.com/BlockScience/MSML/issues/574) | [Add a link back from state variables to the state in obsidian reporting](https://github.com/BlockScience/MSML/issues/578) | |\n", - "| | [Add the code linking and source code stuff for metrics and stateful metrics](https://github.com/BlockScience/MSML/issues/576) | | [Add in state variables linking for the mechanism markdown report](https://github.com/BlockScience/MSML/issues/209) | [Update state updates wiring diagram to make it super clear that state variables are not a wiring](https://github.com/BlockScience/MSML/issues/506) | |\n", - "| | [Add links to the spec definition code in Obsidian output](https://github.com/BlockScience/MSML/issues/575) | | | | |\n", - "| | [Add obsidian linking for spaces in mermaid graphic](https://github.com/BlockScience/MSML/issues/573) | | | | |\n", - "| | [Add parameters used to boundary action markdown](https://github.com/BlockScience/MSML/issues/505) | | | | |\n", - "| Research | | | | | |\n", - "| Simulation | | | | [Add mapping function that maps parameter modification to metadata columns](https://github.com/BlockScience/MSML/issues/467) | |\n", - "| Testing | | | | | |\n", - "| UI | | | | | |" + "| | V0.3.19 | V0.3.20 | V0.3.21 | V0.4.0 |\n", + "|:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|\n", + "| Blocked | | | | |\n", + "| Bug | [There is not checking being done to make sure the type of stateful metrics actually is implemented](https://github.com/BlockScience/MSML/issues/553) | | | |\n", + "| | [No Implementation Flag does not work if one of the implementations is filled in](https://github.com/BlockScience/MSML/issues/521) | | | |\n", + "| | [Repeated Called By bug](https://github.com/BlockScience/MSML/issues/500) | | | |\n", + "| | [Bug: MSML does not catch missing spaces if it is referenced in codomain](https://github.com/BlockScience/MSML/issues/446) | | | |\n", + "| Communications | [Report Creation Plan](https://github.com/BlockScience/MSML/issues/530) | | | [V0.4 Update Note](https://github.com/BlockScience/MSML/issues/582) |\n", + "| | | | | [V0.5 Project Plan](https://github.com/BlockScience/MSML/issues/512) |\n", + "| | | | | [Add README sentences on MSML as showing the back-end to non-devs](https://github.com/BlockScience/MSML/issues/497) |\n", + "| | | | | [Add Gov Pod presentation + walk through to presentation links](https://github.com/BlockScience/MSML/issues/484) |\n", + "| DevOps | | | | |\n", + "| Discussions | | | | [Github Pages for user documentation](https://github.com/BlockScience/MSML/issues/395) |\n", + "| Documentation | | | | [Update MSML Canonical Example Comparison Table](https://github.com/BlockScience/MSML/issues/544) |\n", + "| | | | | [Github Pages for user documentation](https://github.com/BlockScience/MSML/issues/395) |\n", + "| | | | | [FAQ Section](https://github.com/BlockScience/MSML/issues/386) |\n", + "| | | | | [Add a Getting Started Guide](https://github.com/BlockScience/MSML/issues/199) |\n", + "| Engine | [Add __repr__ for components](https://github.com/BlockScience/MSML/issues/514) | [Allow outputs of spaces in metrics in addition to types](https://github.com/BlockScience/MSML/issues/554) | [Add a check that the functional parameter given is indeed one of the valid control/boundary action options](https://github.com/BlockScience/MSML/issues/411) | |\n", + "| | | [Add __repr__ for types](https://github.com/BlockScience/MSML/issues/515) | [Change lines data[\"codomain\"] = tuple(ms[\"Spaces\"][x] for x in data[\"codomain\"]) to have assertions to check spaces exist](https://github.com/BlockScience/MSML/issues/397) | |\n", + "| | | [Add descriptions to spaces as an attribute](https://github.com/BlockScience/MSML/issues/424) | | |\n", + "| | | [Add domain and codomain checking for the executable blocks](https://github.com/BlockScience/MSML/issues/418) | | |\n", + "| Examples | | | | |\n", + "| Improvements | [Add Wirings and Metrics to Spec Tree](https://github.com/BlockScience/MSML/issues/598) | | [Change lines data[\"codomain\"] = tuple(ms[\"Spaces\"][x] for x in data[\"codomain\"]) to have assertions to check spaces exist](https://github.com/BlockScience/MSML/issues/397) | |\n", + "| Metaprogramming | | | | |\n", + "| Reporting | [Add Wirings and Metrics to Spec Tree](https://github.com/BlockScience/MSML/issues/598) | [Add specific line location for source code links](https://github.com/BlockScience/MSML/issues/574) | [Add a link back from state variables to the state in obsidian reporting](https://github.com/BlockScience/MSML/issues/578) | |\n", + "| | [Make source code linking work for displays](https://github.com/BlockScience/MSML/issues/593) | [Add in state variables linking for the mechanism markdown report](https://github.com/BlockScience/MSML/issues/209) | [Update state updates wiring diagram to make it super clear that state variables are not a wiring](https://github.com/BlockScience/MSML/issues/506) | |\n", + "| Research | | | | |\n", + "| Simulation | | | [Add mapping function that maps parameter modification to metadata columns](https://github.com/BlockScience/MSML/issues/467) | |\n", + "| Testing | | | | |\n", + "| UI | | | | |" ] }, "metadata": {}, diff --git a/research_notes/WIP Report Creation Plan.md b/research_notes/WIP Report Creation Plan.md index 00e4e1b6..fbc9b1bc 100644 --- a/research_notes/WIP Report Creation Plan.md +++ b/research_notes/WIP Report Creation Plan.md @@ -1,5 +1,10 @@ # Report Creation Plan +## Executive Summary + +- The report plan below details the current and desired future state of reporting in MSML +- Feedback from users is encouraged as all plans are only loosely defined and meant to potentially be changed to be more useful + ## Current Reporting Architecture - There are a handful of files such as mechanisms.py, policies.py, etc. that have mostly depcreated functions from the HTML writer version. @@ -27,14 +32,51 @@ ## Issue Log -- Putting together the issues of reporting from github -- Potentially can begin sorting them into larger milestones such as V0.5, V0.6, etc +- The table below are all the open issues that can be prioritized in the upcoming milestones +- I will plan to begin moving the issues to broad milestones such as V0.5, V0.6, V0.7, etc. to give rough estimates of when things will be implemented +- There are quite a few improvement style issues which are good to also consider such as whether or not it is important that a user can add metrics and stateful metrics to the mermaid graphs + +| | Reporting | +|:----------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| High Priority | [Create plan for specialized reports](https://github.com/BlockScience/MSML/issues/603) | +| | [Create plan for individual markdown reports](https://github.com/BlockScience/MSML/issues/602) | +| | [Create a mermaid graph or similar of the reporting architecture](https://github.com/BlockScience/MSML/issues/601) | +| | [Revive PDF Writing Abilities for Reporting](https://github.com/BlockScience/MSML/issues/600) | +| | [Add something for displaying source code for wiring](https://github.com/BlockScience/MSML/issues/570) | +| | [For policies/mechanisms/etc add in a section for markdown reporting that says wirings that it is involved in](https://github.com/BlockScience/MSML/issues/258) | +| | [Switch legacy reporting to be using mermaid + markdown](https://github.com/BlockScience/MSML/issues/155) | +| | [Add Table comparing policy options, boundary options, etc](https://github.com/BlockScience/MSML/issues/148) | +| Medium Priority | [Obsidian Canvas Creator for Wirings](https://github.com/BlockScience/MSML/issues/541) | +| | [Add Metrics and Stateful Metrics used to Mermaid Charts](https://github.com/BlockScience/MSML/issues/540) | +| | [Stock and Flow generator](https://github.com/BlockScience/MSML/issues/498) | +| | [Idea: Auto-displays](https://github.com/BlockScience/MSML/issues/280) | +| | [Convert action chain report to markdown](https://github.com/BlockScience/MSML/issues/254) | +| | [Convert entity report to markdown](https://github.com/BlockScience/MSML/issues/253) | +| | [Make write basic report markdown](https://github.com/BlockScience/MSML/issues/252) | +| | [Atomize Writing Functions](https://github.com/BlockScience/MSML/issues/165) | +| | [Add Policy Report](https://github.com/BlockScience/MSML/issues/159) | +| | [Add parameters impacting to policy, behaviors, etc. in report write out](https://github.com/BlockScience/MSML/issues/89) | +| | [Make a type of report that is a parameter report](https://github.com/BlockScience/MSML/issues/74) | +| | [Replicate Something like write_full_state_section from the alpha version](https://github.com/BlockScience/MSML/issues/58) | +| Low Priority | [Add obsidian plugins to starter repos and have a function that also can populate them](https://github.com/BlockScience/MSML/issues/387) | +| | [Add ability to de-emphasize certain wirings by marking them with a flag that puts their reports into an "extra" wiring](https://github.com/BlockScience/MSML/issues/381) | +| | [Figure out how to force CSS snippets used](https://github.com/BlockScience/MSML/issues/322) | +| | [Idea: Top level tag for wirings](https://github.com/BlockScience/MSML/issues/281) | +| | [Add images assets functionality](https://github.com/BlockScience/MSML/issues/260) | +| | [Mermaid graph assets functionality](https://github.com/BlockScience/MSML/issues/259) | +| | [Style Dictionary options](https://github.com/BlockScience/MSML/issues/251) | +| | [Consider a format dictionary for MSML that allows you to override certain formatting options](https://github.com/BlockScience/MSML/issues/246) | +| | [Add metric linkages to the reporting for components](https://github.com/BlockScience/MSML/issues/233) | +| | [Metric report](https://github.com/BlockScience/MSML/issues/231) | +| | [Exclude Dictionary Feature](https://github.com/BlockScience/MSML/issues/79) | +| | [Add Parameters to Graph Option](https://github.com/BlockScience/MSML/issues/53) | ## Oustanding Questions 1. How urgent is the style dictionary kind of customizability to people? 2. Are there any other formats besides markdown and PDF that people are interested in having? 3. What other kinds of reports would be desired? +4. Are there any improvements to the current reporting that would be nice? ## An Aside on Stock & Flow - I think stock & flow would add even more requirements on the JSON spec to have things such as a field for state variables used in the block From d565b6bbf54fa76d6e5d749154ff94dfb124b138 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Wed, 18 Dec 2024 09:01:44 -0500 Subject: [PATCH 11/13] Issue 553 --- .../{WIP Report Creation Plan.md => 2024-12-17.md} | 0 src/math_spec_mapping/Load/stateful_metrics.py | 6 ++++++ 2 files changed, 6 insertions(+) rename research_notes/{WIP Report Creation Plan.md => 2024-12-17.md} (100%) diff --git a/research_notes/WIP Report Creation Plan.md b/research_notes/2024-12-17.md similarity index 100% rename from research_notes/WIP Report Creation Plan.md rename to research_notes/2024-12-17.md diff --git a/src/math_spec_mapping/Load/stateful_metrics.py b/src/math_spec_mapping/Load/stateful_metrics.py index afe4d2a7..4d705731 100644 --- a/src/math_spec_mapping/Load/stateful_metrics.py +++ b/src/math_spec_mapping/Load/stateful_metrics.py @@ -40,6 +40,12 @@ def convert_stateful_metric(ms, data: Dict) -> StatefulMetricSet: x[1] ) + assert ( + var["type"] in ms["Types"] + ), "{} type referenced by {} is not present in math spec".format( + var["type"], var["name"] + ) + var["implementations"] = {} if "python" in ms["Implementations"]: if "stateful_metrics" in ms["Implementations"]["python"]: From 7a13073ed7b4677b56d45da3d7e314fc782989ea Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Wed, 18 Dec 2024 09:19:02 -0500 Subject: [PATCH 12/13] Link source code location --- src/math_spec_mapping/Classes/MathSpec.py | 13 +++++++++++-- src/math_spec_mapping/Reports/markdown.py | 5 ++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/math_spec_mapping/Classes/MathSpec.py b/src/math_spec_mapping/Classes/MathSpec.py index 2e833cfe..0a8609b0 100644 --- a/src/math_spec_mapping/Classes/MathSpec.py +++ b/src/math_spec_mapping/Classes/MathSpec.py @@ -542,8 +542,17 @@ def _add_spec_tree(self, tree): component ] elif folder == "Displays": - print("Displays not implemented") - # keys = [x["name"] for x in ms.displays["Wiring"]] + + for component in self.displays["Wiring"]: + if component["name"] not in tree: + print( + "Can't find component code source in {} for {}".format( + folder, component["name"] + ) + ) + component["Source Code Location"] = None + else: + component["Source Code Location"] = tree[component["name"]] elif folder == "Spaces": for component in self.spaces: if component in ["Terminating Space", "Empty Space"]: diff --git a/src/math_spec_mapping/Reports/markdown.py b/src/math_spec_mapping/Reports/markdown.py index 55fae6f1..a8ff1cc7 100644 --- a/src/math_spec_mapping/Reports/markdown.py +++ b/src/math_spec_mapping/Reports/markdown.py @@ -939,7 +939,10 @@ def write_wiring_display_markdown_report(ms, path, wiring, add_metadata=True): out += "\n" out += "\n" - with open("{}/Displays/Wiring/{}.md".format(path, wiring["name"]), "w") as f: + path = "{}/Displays/Wiring/{}.md".format(path, wiring["name"]) + out = write_source_code_block(wiring, out, path) + + with open(path, "w") as f: f.write(out) From a25663d75e585699a154e50f3b1c49b01ae6d742 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Wed, 18 Dec 2024 09:20:55 -0500 Subject: [PATCH 13/13] Finish wiring source code update --- src/math_spec_mapping/Reports/markdown.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/math_spec_mapping/Reports/markdown.py b/src/math_spec_mapping/Reports/markdown.py index a8ff1cc7..b627a0fc 100644 --- a/src/math_spec_mapping/Reports/markdown.py +++ b/src/math_spec_mapping/Reports/markdown.py @@ -67,7 +67,10 @@ def write_entity_markdown_report(ms, path, entity, add_metadata=True): def write_source_code_block(component, text, path): - file_path = component.source_code_location + if hasattr(component, "source_code_location"): + file_path = component.source_code_location + else: + file_path = component["Source Code Location"] if file_path: file_path = os.path.relpath(file_path, path) text += "## Spec Source Code Location\n\n"