Skip to content

Commit 2f955cc

Browse files
authored
👷 CI: Add CI steps to create streamlit example branch and deploy EMP case study
* 👷 CI: Add CI steps to create streamlit example branch and deploy EMP report * 💚 CI: Fix streamlit example publication github action * 🚚 Docs: move requirements.txt to docs folder * 🎨 CI: change streamlit report example branch name * 🐛 Fix: replace absolute paths of Python scripts from EMP streamlit report example and add aggrid as requirement * 🐛 Fix: correct code to replace absolute paths in streamlit EMP python files * ✏️ Fix: fix typo on command to correct absolute paths * 📝 Docs: update logo files and README with case studies and web app deployment sections
1 parent b25b402 commit 2f955cc

File tree

6 files changed

+108
-622
lines changed

6 files changed

+108
-622
lines changed

.github/workflows/docs.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ jobs:
3535
run: |
3636
cd docs
3737
sphinx-build -n --keep-going -b html ./ ./_build/
38+
# --- HTML example deployment ---
3839
- name: Rename entry point of report to index.html
3940
run: |
4041
mv docs/quarto_report/quarto_report.html docs/quarto_report/index.html
41-
- name: Publish html report to github pages
42+
- name: Publish HTML report to GitHub Pages (gh-pages branch)
4243
# Only publish a new static report upon a new release -> can be changed.
4344
if: startsWith(github.ref, 'refs/tags')
4445
uses: peaceiris/actions-gh-pages@v4
@@ -50,3 +51,14 @@ jobs:
5051
# with:
5152
# name: Sphinx_${{ matrix.python-version }}
5253
# path: docs/_build/
54+
55+
# --- Streamlit example deployment ---
56+
- name: Fix Absolute Paths in Streamlit Scripts
57+
run: |
58+
find docs/streamlit_report/sections -type f -name "*.py" -exec sed -i 's|/home/runner/work/vuegen/vuegen/docs/||g' {} +
59+
- name: Publish Streamlit report to streamlit-example branch
60+
uses: peaceiris/actions-gh-pages@v4
61+
with:
62+
github_token: ${{ secrets.GITHUB_TOKEN }}
63+
publish_dir: docs/
64+
publish_branch: streamlit-report-example

README.md

Lines changed: 58 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
<!-- <div align="center">
2-
<img width="300px" src="images/vuegen_logo.svg">
3-
</div> -->
41
![VueGen Logo](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg)
52
-----------------
63
<p align="center">
7-
VueGen is a Python library that automates the creation of scientific reports.
4+
VueGen is a Python package that automates the creation of scientific reports.
85
</p>
96

107
| Information | Links |
118
| :--- | :--- |
12-
| **Package** |[ ![PyPI Latest Release](https://img.shields.io/pypi/v/vuegen.svg)](https://pypi.org/project/vuegen/) [![Supported versions](https://img.shields.io/pypi/pyversions/vuegen.svg)](https://pypi.org/project/vuegen/)|
13-
| **Documentation** | [![Docs](https://readthedocs.org/projects/vuegen/badge/?style=flat)](https://vuegen.readthedocs.io/)|
14-
| **Build** | [![CI](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml/badge.svg)](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml) [![Docs](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml/badge.svg)](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml)|
15-
| **Examples** | [![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)](https://multiomics-analytics-group.github.io/vuegen/) [![Streamlit](https://img.shields.io/badge/Streamlit-%23FE4B4B.svg?style=for-the-badge&logo=streamlit&logoColor=white)](https://multiomics-analytics-group.github.io/vuegen/)|
16-
| **Discuss on GitHub** | [![GitHub issues](https://img.shields.io/github/issues/Multiomics-Analytics-Group/vuegen)](https://github.com/Multiomics-Analytics-Group/vuegen/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/Multiomics-Analytics-Group/vuegen)](https://github.com/Multiomics-Analytics-Group/vuegen/pulls) |
9+
| **Package** |[ ![PyPI Latest Release](https://img.shields.io/pypi/v/vuegen.svg)][vuegen-pypi] [![Supported versions](https://img.shields.io/pypi/pyversions/vuegen.svg)][vuegen-pypi]|
10+
| **Documentation** | [![Docs](https://readthedocs.org/projects/vuegen/badge/?style=flat)][vuegen-docs]|
11+
| **Build** | [![CI](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml/badge.svg)][ci-gh-action] [![Docs](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml/badge.svg)][ci-docs]|
12+
| **Examples** | [![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)][emp-html-demo] [![Streamlit](https://img.shields.io/badge/Streamlit-%23FE4B4B.svg?style=for-the-badge&logo=streamlit&logoColor=white)][emp-st-demo]|
13+
| **Discuss on GitHub** | [![GitHub issues](https://img.shields.io/github/issues/Multiomics-Analytics-Group/vuegen)][issues] [![GitHub pull requests](https://img.shields.io/github/issues-pr/Multiomics-Analytics-Group/vuegen)][pulls]|
1714

1815
## Table of contents:
1916
- [About the project](#about-the-project)
2017
- [Installation](#installation)
2118
- [Execution](#execution)
22-
- [Acknowledgements](#acknowledgements)
19+
- [Case studies](#case-studies)
20+
- [Web application deployment](#web-application-deployment)
21+
- [Credits and acknowledgements](#credits-and-acknowledgements)
2322
- [Contact](#contact)
2423

2524
## About the project
@@ -29,25 +28,13 @@ The configuration file specifies the structure of the report, including sections
2928

3029
An overview of the VueGen workflow is shown in the figure below:
3130

32-
<!-- <p align="center">
33-
<figure>
34-
<img width="650px" src="images/vuegen_graph_abstract.png" alt="VueGen overview"/>
35-
</figure>
36-
</p> -->
3731
![VueGen Abstract](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_graph_abstract.png)
3832

3933
Also, the class diagram for the project is presented below to illustrate the architecture and relationships between classes:
4034

41-
<!-- <p align="center">
42-
<figure>
43-
<img width="650px" src="images/vuegen_classdiagram_noattmeth.png" alt="VueGen class diagram"/>
44-
</figure>
45-
</p> -->
46-
4735
![VueGen Class Diagram](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_classdiagram_noattmeth.png)
4836

4937
## Installation
50-
5138
Vuegen is available on [PyPI][vuegen-pypi] and can be installed using pip:
5239

5340
```bash
@@ -61,28 +48,28 @@ pip install -e path/to/vuegen # specify location
6148
pip install -e . # in case your pwd is in the vuegen directory
6249
```
6350

64-
### Quarto installation
51+
> [!TIP]
52+
> It is recommended to install VueGen inside a virtual environment to manage depenendencies and avoid conflicts with existing packages. You can use the virtual environment manager of your choice, such as `poetry`, `conda`, or `pipenv`.
6553
54+
### Quarto installation
6655
Vuegen uses [Quarto][quarto] to generate various report types. The pip insallation includes quarto using the [quarto-cli Python library][quarto-cli-pypi]. To test if quarto is installed in your computer, run the following command:
6756

6857
```bash
6958
quarto check
7059
```
7160

72-
If quarto is not installed, you can download the command-line interface from the [Quarto website][quarto-cli] for your operating system.
61+
> [!TIP]
62+
> If quarto is not installed, you can download the command-line interface from the [Quarto website][quarto-cli] for your operating system.
7363
7464
## Execution
75-
7665
Run VueGen using a directory with the following command:
7766

7867
```bash
79-
cd docs
8068
vuegen --directory example_data/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
8169
```
8270

83-
> 💡 If `vuegen` does not work, try `python -m vuegen` instead.
84-
85-
By default, the `streamlit_autorun` argument is set to False, but you can use it in case you want to automatically run the streamlit app.
71+
> [!NOTE]
72+
> By default, the `streamlit_autorun` argument is set to False, but you can use it in case you want to automatically run the streamlit app.
8673
8774
It's also possible to provide a configuration file instead of a directory:
8875

@@ -100,8 +87,34 @@ The current report types supported by VueGen are:
10087
* PPTX
10188
* Jupyter
10289

103-
## Acknowledgements
90+
## Case studies
91+
VueGen’s functionality is demonstrated through two case studies:
92+
93+
**1. Predefined Directory**
94+
95+
This introductory case study uses a predefined directory with plots, dataframes, Markdown, and HTML components. Users can generate reports in different formats and modify the configuration file to customize the report structure.
96+
97+
🔗 [![Open in Colab][colab_badge]][colab_link_intro_demo]
98+
99+
**2. Earth Microbiome Project Data**
100+
101+
This advanced case study demonstrates the application of VueGen in a real-world scenario using data from the [Earth Microbiome Project (EMP)][emp]. The EMP is an initiative to characterize global microbial taxonomic and functional diversity. The notebook process the EMP data, create plots, dataframes, and other components, and organize outputs within a directory to produce reports. Report content and structure can be adapted by modifying the configuration file. Each report consists of sections on exploratory data analysis, metagenomics, and network analysis.
102+
103+
🔗 [![Open in Colab][colab_badge]][colab_link_emp_demo]
104+
105+
> [!NOTE]
106+
> An HTML report example of the current vuegen release is available [here][emp-html-demo].
107+
108+
## Web application deployment
109+
Once a Streamlit report is generated, it can be deployed as a web application to make it accessible online. There are multiple ways to achieve this:
110+
111+
* **Streamlit Community Cloud**: Deploy your report easily using [Streamlit Cloud][st-cloud], as demonstrated in the [EMP VueGen Demo][emp-st-demo]. The process involves moving the necessary scripts, data, and a requirements.txt file into a GitHub repository. Then, the app can be deployed via the Streamlit Cloud interface. The deployment example is available in the `streamlit-report-example` branch.
112+
* **Standalone Executables**: Convert your Streamlit application into a desktop app by packaging it as an executable file for different operating systems. A detailed explanation of this process can be found in this [Streamlit forum post][st-forum-exe].
113+
* [Stlite][stlite]: Run Streamlit apps directly in the browser with stlite, a WebAssembly port of Streamlit powered by Pyodide, eliminating the need for a server. It also allows packaging apps as standalone desktop executables using stlite desktop.
114+
115+
These options provide flexibility depending on whether the goal is online accessibility, lightweight execution, or local application distribution.
104116

117+
## Credits and acknowledgements
105118
- Vuegen was developed by the [Multiomics Network Analytics Group (MoNA)][Mona] at the [Novo Nordisk Foundation Center for Biosustainability (DTU Biosustain)][Biosustain].
106119
- The vuegen logo was designed based on an image created by [Scriberia][scriberia] for The [Turing Way Community][turingway], which is shared under a CC-BY licence. The original image can be found at [Zenodo][zenodo-turingway].
107120

@@ -110,14 +123,28 @@ If you have comments or suggestions about this project, you can [open an issue][
110123

111124
[streamlit]: https://streamlit.io/
112125
[vuegen-pypi]: https://pypi.org/project/vuegen/
126+
[vuegen-docs]: https://vuegen.readthedocs.io/
127+
[ci-gh-action]: https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml
128+
[ci-docs]: https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml
129+
[emp-html-demo]: https://multiomics-analytics-group.github.io/vuegen/
130+
[emp-st-demo]: https://earth-microbiome-vuegen-demo.streamlit.app/
131+
[issues]: https://github.com/Multiomics-Analytics-Group/vuegen/issues
132+
[pulls]: https://github.com/Multiomics-Analytics-Group/vuegen/pulls
113133
[quarto]: https://quarto.org/
114134
[quarto-cli-pypi]: https://pypi.org/project/quarto-cli/
115135
[quarto-cli]: https://quarto.org/docs/get-started/
136+
[colab_badge]: https://colab.research.google.com/assets/colab-badge.svg
137+
[colab_link_intro_demo]: https://colab.research.google.com/github/Multiomics-Analytics-Group/vuegen/blob/main/docs/vuegen_basic_case_study.ipynb
138+
[colab_link_emp_demo]: https://colab.research.google.com/github/Multiomics-Analytics-Group/vuegen/blob/main/docs/vuegen_case_study_earth_microbiome.ipynb
139+
[emp]: https://earthmicrobiome.org/
140+
[st-cloud]: https://streamlit.io/cloud
141+
[stlite]: https://github.com/whitphx/stlite
142+
[st-forum-exe]: https://discuss.streamlit.io/t/streamlit-deployment-as-an-executable-file-exe-for-windows-macos-and-android/6812
116143
[Mona]: https://multiomics-analytics-group.github.io/
117144
[Biosustain]: https://www.biosustain.dtu.dk/
118145
[scriberia]: https://www.scriberia.co.uk/
119146
[turingway]: https://github.com/the-turing-way/the-turing-way
120147
[zenodo-turingway]: https://zenodo.org/records/3695300
121-
[issues]: https://github.com/Multiomics-Analytics-Group/vuegen/issues/new
148+
[new-issue]: https://github.com/Multiomics-Analytics-Group/vuegen/issues/new
122149

123150

docs/images/vuegen_logo.png

83.2 KB
Loading

0 commit comments

Comments
 (0)