Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/655.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
change logging info to error in quarto build
12 changes: 10 additions & 2 deletions src/ansys_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,15 +419,23 @@ def convert_pdf_to_png(pdf_path: pathlib.Path, output_dir: pathlib.Path, output_


def run_quarto_command(command, cwd):
"""Run quarto command and logs its output."""
"""Run quarto command and logs its output.

Parameters
----------
command : list
List of command arguments.
cwd : str
Current working directory.
"""
Comment on lines 421 to +430
Copy link
Member

Choose a reason for hiding this comment

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

If you know the type hints, why not adding them to the method signature?

Copy link
Member

Choose a reason for hiding this comment

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

My bad - shouldn't have approved that quickly 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no problem, i will add that in my coming PR, which is also related to some code refactoring

command = ["quarto"] + command
try:
result = subprocess.run(command, cwd=cwd, check=True, capture_output=True, text=True)
if result.stdout:
logger.info(result.stdout)

if result.stderr:
logger.info(result.stderr)
logger.error(result.stderr)

except subprocess.CalledProcessError as e:
raise RuntimeError(f"Failed to run the command: {e}")
Expand Down
Loading