ml_switcheroo.utils.readme_editor ================================= .. py:module:: ml_switcheroo.utils.readme_editor Classes ------- .. autoapisummary:: ml_switcheroo.utils.readme_editor.ReadmeEditor Module Contents --------------- .. py:class:: ReadmeEditor(semantics: ml_switcheroo.semantics.manager.SemanticsManager, readme_path: pathlib.Path) Utility to programmatically update the README.md with verification results. It regenerates the "Compatibility Matrix" table based on the current state of the Knowledge Base and the results of the latest CI run, then splices it into the README content using regex markers. .. attribute:: semantics Source of Truth for API definitions. :type: SemanticsManager .. attribute:: readme_path Path to the README file. :type: Path .. py:attribute:: semantics .. py:attribute:: readme_path .. py:method:: update_matrix(validation_results: Dict[str, bool]) -> bool Regenerates the Markdown table and injects it into the README. It looks for the section starting with `## ✅ Compatibility Matrix` and replaces the content up to the next `## Header` or End of File. :param validation_results: Dictionary mapping op_name -> boolean pass status. :returns: True if the update was successful, False otherwise. :rtype: bool