Skip to content

Conversation

@ahouseholder
Copy link
Contributor

@ahouseholder ahouseholder commented Aug 18, 2025

This PR adds tools to generate a mermaid diagram from a DecisionTable object.
It also adds a method that lets us generate the markdown table format directly from the DecisionTable object instead
of loading a .csv file.

The main changes can be found in src/ssvc/decision_tables/helpers.py. Everything else is incidental.

Note

mermaid has a default limit of 500 edges per diagram to prevent unreasonably long browser load times. In this implementation, we first attempt to generate a single diagram. If the edge count exceeds the limit, we split it across the first decision point values (each one gets its own diagram). So far this is sufficient for all the decisions we currently have models for. If we need a more robust solution later, we can address this in a future PR.

Incidental changes

  • Update the COORDINATE decision point to better reflect existing documentation.
  • Update existing decision model docs to leverage new features available from DecisionTable implementation.
Screenshot 2025-08-18 at 2 59 03 PM Screenshot 2025-08-18 at 2 59 10 PM

Copilot Summary

This pull request updates the SSVC "Decline, Track, Coordinate" outcome group to version 1.0.1 and ensures that all relevant references in the coordinator_triage_1_0_0.json decision table use the new version. The new version provides more descriptive explanations for each outcome, improving clarity and consistency across the data.

Key changes:

Outcome group update and improved descriptions:

  • Added a new file decline_track_coordinate_1_0_1.json defining the "Decline, Track, Coordinate" group with detailed descriptions for each value, clarifying what each outcome means.
  • Updated the outcome group reference in coordinator_triage_1_0_0.json from version 1.0.0 to 1.0.1, and replaced the brief descriptions with the improved ones from the new version.

Decision table consistency:

@ahouseholder ahouseholder added this to the 2025-09 milestone Aug 18, 2025
@ahouseholder ahouseholder self-assigned this Aug 18, 2025
@ahouseholder ahouseholder added enhancement New feature or request python Pull requests that update Python code content/representation Formatting, page layout, syntax, etc. tech/backend Back-end tools, code, infrastructure labels Aug 18, 2025
Copy link
Collaborator

@j--- j--- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with the mermaid implementation, so I can't really review the code, but given that the test works, it LGTM

@ahouseholder ahouseholder merged commit 9d0c264 into main Aug 19, 2025
5 checks passed
@ahouseholder ahouseholder deleted the feature/dt_to_mermaid branch August 19, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content/representation Formatting, page layout, syntax, etc. enhancement New feature or request python Pull requests that update Python code tech/backend Back-end tools, code, infrastructure

Projects

None yet

4 participants