()
| 149 | |
| 150 | |
| 151 | def main() -> None: |
| 152 | is_windows = platform.system() == "Windows" |
| 153 | # is_macos = platform.system() == "Darwin" |
| 154 | _, commit_msg = get_git_info() |
| 155 | |
| 156 | if is_windows: |
| 157 | doxygen_bin = install_doxygen_windows() |
| 158 | # add to path C:\Program Files\Graphviz\bin\ |
| 159 | os.environ["PATH"] += os.pathsep + r"C:\Program Files\Graphviz\bin" |
| 160 | else: |
| 161 | doxygen_bin = install_doxygen_unix() |
| 162 | |
| 163 | # install_theme() |
| 164 | |
| 165 | # install_graphviz() # Work in progress |
| 166 | |
| 167 | # Verify Graphviz installation |
| 168 | try: |
| 169 | dot_version = run("dot -V", check=False) |
| 170 | print(f"Graphviz detected: {dot_version}") |
| 171 | except KeyboardInterrupt as ki: |
| 172 | handle_keyboard_interrupt(ki) |
| 173 | raise |
| 174 | except Exception: |
| 175 | warnings.warn( |
| 176 | "Graphviz (dot) not found in PATH. Diagrams may not be generated." |
| 177 | ) |
| 178 | |
| 179 | # Check it graphviz is installed |
| 180 | # if linux |
| 181 | if not is_windows: |
| 182 | run("dot -Tsvg -Kneato -Grankdir=LR", check=True) |
| 183 | |
| 184 | generate_docs(doxygen_bin=doxygen_bin) |
| 185 | |
| 186 | print(f"\n✅ Docs generated in: {HTML_OUTPUT_DIR}") |
| 187 | print(f"📄 Commit message: {commit_msg}") |
| 188 | print("✨ You can now manually deploy to GitHub Pages or automate this step.") |
| 189 | |
| 190 | |
| 191 | if __name__ == "__main__": |
no test coverage detected