Skip to content

Commit

Permalink
ci: Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jul 13, 2024
1 parent d4337c5 commit cf0cf29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ jobs:
run: git fetch --depth=1 --tags

- name: Set up Graphviz
uses: ts-graphviz/setup-graphviz@v1
uses: ts-graphviz/setup-graphviz@v2

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Reproduce issue
run: python -c 'import subprocess; print(subprocess.check_output(["dot", "-Tsvg"], input="digraph D {\n A -> B\n}", text=True))'

- name: Install uv
run: pip install uv

Expand Down
5 changes: 4 additions & 1 deletion scripts/gen_structure_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
def _render_call_graph(module: Path) -> None:
buffer = StringIO()
code2flow(str(module), buffer)
svg = subprocess.check_output(["dot", "-Tsvg"], input=buffer.getvalue(), text=True) # noqa: S603, S607
try:
svg = subprocess.check_output(["dot", "-Tsvg"], input=buffer.getvalue(), stderr=subprocess.STDOUT, text=True) # noqa: S603, S607
except subprocess.CalledProcessError as process:
raise RuntimeError(process.output + process.stdout) from process
if 'class="node"' not in svg:
print("")
else:
Expand Down

0 comments on commit cf0cf29

Please sign in to comment.