Skip to content

Commit 98335dc

Browse files
committed
🐛 Fix: solve issue of the dfi library to export a dataframe as an image for static reports. Also, publish a new streamlit report upon a new release
1 parent 2f955cc commit 98335dc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
run: |
5858
find docs/streamlit_report/sections -type f -name "*.py" -exec sed -i 's|/home/runner/work/vuegen/vuegen/docs/||g' {} +
5959
- name: Publish Streamlit report to streamlit-example branch
60+
if: startsWith(github.ref, 'refs/tags')
6061
uses: peaceiris/actions-gh-pages@v4
6162
with:
6263
github_token: ${{ secrets.GITHUB_TOKEN }}

src/vuegen/quarto_reportview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ def _show_dataframe(self, dataframe, is_report_static, static_dir: str = STATIC_
641641
if is_report_static:
642642
# Generate path for the DataFrame image
643643
df_image = os.path.join(static_dir, f"{dataframe.title.replace(' ', '_')}.png")
644-
dataframe_content.append(f"dfi.export(df, '{os.path.abspath(df_image)}', max_rows=10, max_cols=5)\n```\n")
644+
dataframe_content.append(f"df.dfi.export('{os.path.abspath(df_image)}', max_rows=10, max_cols=5)\n```\n")
645645
# Use helper method to add centered image content
646646
dataframe_content.append(self._generate_image_content(df_image))
647647
else:

0 commit comments

Comments
 (0)