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 .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
run: |
find docs/streamlit_report/sections -type f -name "*.py" -exec sed -i 's|/home/runner/work/vuegen/vuegen/docs/||g' {} +
- name: Publish Streamlit report to streamlit-example branch
if: startsWith(github.ref, 'refs/tags')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
nb_execution_raise_on_error = True
# Rendering
nb_merge_streams = True
# maximum execution time per cell in seconds
nb_execution_timeout = 120

# https://myst-nb.readthedocs.io/en/latest/authoring/custom-formats.html#write-custom-formats
# ! if you use it, then you cannot directly execute the notebook in the browser in colab
Expand Down
2 changes: 1 addition & 1 deletion src/vuegen/quarto_reportview.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ def _show_dataframe(
static_dir, f"{dataframe.title.replace(' ', '_')}.png"
)
dataframe_content.append(
f"dfi.export(df, '{os.path.abspath(df_image)}', max_rows=10, max_cols=5)\n```\n"
f"df.dfi.export('{os.path.abspath(df_image)}', max_rows=10, max_cols=5)\n```\n"
)
# Use helper method to add centered image content
dataframe_content.append(self._generate_image_content(df_image))
Expand Down
9 changes: 9 additions & 0 deletions src/vuegen/report_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import shutil

from .config_manager import ConfigManager
from .quarto_reportview import QuartoReportView
Expand Down Expand Up @@ -61,6 +62,14 @@ def get_report(
st_report.run_report()

else:
# Check if Quarto is installed
if shutil.which("quarto") is None:
logger.error(
"Quarto is not installed. Please install Quarto before generating this report type."
)
raise RuntimeError(
"Quarto is not installed. Please install Quarto before generating this report type."
)
quarto_report = QuartoReportView(report=report, report_type=report_type)
quarto_report.generate_report()
quarto_report.run_report()