Skip to content

Commit 6fe5165

Browse files
authored
Merge branch 'main' into os_installers
2 parents c65ce37 + a2bec94 commit 6fe5165

File tree

5 files changed

+73
-11
lines changed

5 files changed

+73
-11
lines changed

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
| Information | Links |
88
| :--- | :--- |
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]|
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] [![Docker Repository on Quay](https://quay.io/repository/dtu_biosustain_dsp/vuegen/status "Docker Repository on Quay")][vuegen-docker-quay] ![License](https://img.shields.io/github/license/Multiomics-Analytics-Group/vuegen)|
1010
| **Documentation** | [![Docs](https://readthedocs.org/projects/vuegen/badge/?style=flat)][vuegen-docs]|
1111
| **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]|
1212
| **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]|
@@ -19,7 +19,7 @@
1919
- [Case studies](#case-studies)
2020
- [Web application deployment](#web-application-deployment)
2121
- [Credits and acknowledgements](#credits-and-acknowledgements)
22-
- [Contact](#contact)
22+
- [Contact and feedback](#contact-and-feedback)
2323

2424
## About the project
2525
VueGen automates the creation of reports based on a directory with plots, dataframes, and other files in different formats. A YAML configuration file is generated from the directory to define the structure of the report. Users can customize the report by modifying the configuration file, or they can create their own configuration file instead of passing a directory as input.
@@ -34,6 +34,8 @@ Also, the class diagram for the project is presented below to illustrate the arc
3434

3535
![VueGen Class Diagram](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_classdiagram_noattmeth.png)
3636

37+
The VueGen documentation is available at [vuegen.readthedocs.io][vuegen-docs], where you can find detailed information of the package’s classes and functions, installation and execution instructions, and case studies to demonstrate its functionality.
38+
3739
## Installation
3840
Vuegen is available on [PyPI][vuegen-pypi] and can be installed using pip:
3941

@@ -51,7 +53,6 @@ pip install -e . # in case your pwd is in the vuegen directory
5153
> [!TIP]
5254
> 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`.
5355
54-
### Quarto installation
5556
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:
5657

5758
```bash
@@ -61,6 +62,8 @@ quarto check
6162
> [!TIP]
6263
> If quarto is not installed, you can download the command-line interface from the [Quarto website][quarto-cli] for your operating system.
6364
65+
If you prefer not to install VueGen on your system, a pre-configured Docker container is available. It includes all dependencies, ensuring a fully reproducible execution environment. See the [Execution section](#execution) for details on running VueGen with Docker. The official Docker image is available at [quay.io/dtu_biosustain_dsp/vuegen][vuegen-docker-quay].
66+
6467
## Execution
6568
Run VueGen using a directory with the following command:
6669

@@ -87,6 +90,16 @@ The current report types supported by VueGen are:
8790
* PPTX
8891
* Jupyter
8992

93+
### Running VueGen with Docker
94+
Instead of installing VueGen locally, you can run it directly from a Docker container with the following command:
95+
96+
```bash
97+
docker run --rm \
98+
-v "$(pwd)/Earth_microbiome_vuegen_demo_notebook:/home/appuser/Earth_microbiome_vuegen_demo_notebook" \
99+
-v "$(pwd)/output_docker:/home/appuser/quarto_report" \
100+
quay.io/dtu_biosustain_dsp/vuegen:docker --directory /home/appuser/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
101+
```
102+
90103
## Case studies
91104
VueGen’s functionality is demonstrated through two case studies:
92105

@@ -103,26 +116,28 @@ This advanced case study demonstrates the application of VueGen in a real-world
103116
🔗 [![Open in Colab][colab_badge]][colab_link_emp_demo]
104117

105118
> [!NOTE]
106-
> An HTML report example of the current vuegen release is available [here][emp-html-demo].
119+
> The EMP case study is available online as [HTML][emp-html-demo] and [Streamlit][emp-st-demo] reports.
107120
108121
## Web application deployment
109122
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:
110123

111124
* **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.
112125
* **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.
126+
* **Stlite**: Run Streamlit apps directly in the browser with [stlite][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.
114127

115128
These options provide flexibility depending on whether the goal is online accessibility, lightweight execution, or local application distribution.
116129

117130
## Credits and acknowledgements
118131
- Vuegen was developed by the [Multiomics Network Analytics Group (MoNA)][Mona] at the [Novo Nordisk Foundation Center for Biosustainability (DTU Biosustain)][Biosustain].
132+
- VueGen relies on the work of numerous open-source projects like [Streamlit](streamlit), [Quarto][quarto], and others. A big thank you to their authors for making this possible!
119133
- 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].
120134

121-
## Contact
122-
If you have comments or suggestions about this project, you can [open an issue][issues] in this repository.
135+
## Contact and feedback
136+
We appreciate your feedback! If you have any comments, suggestions, or run into issues while using VueGen, feel free to [open an issue][new-issue] in this repository. Your input helps us make VueGen better for everyone.
123137

124138
[streamlit]: https://streamlit.io/
125139
[vuegen-pypi]: https://pypi.org/project/vuegen/
140+
[vuegen-docker-quay]: https://quay.io/repository/dtu_biosustain_dsp/vuegen
126141
[vuegen-docs]: https://vuegen.readthedocs.io/
127142
[ci-gh-action]: https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml
128143
[ci-docs]: https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "vuegen"
33
dynamic = ["version"]
44

55
[tool.poetry]
6-
description = "Module to generate automatic web interface reports with visualizations"
6+
description = "VueGen automates the creation of reports from bioinformatics outputs, supporting formats like PDF, HTML, DOCX, ODT, PPTX, Reveal.js, Jupyter notebooks, and Streamlit web applications. Users simply provide a directory with output files and VueGen compiles them into a structured report."
77
authors = ["MoNA group"]
88
license = "MIT"
99
readme = "README.md"

src/vuegen/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33

44
from vuegen import report_generator
5-
from vuegen.utils import get_logger, get_parser
5+
from vuegen.utils import get_logger, get_parser, print_completion_message
66

77

88
def main():
@@ -47,6 +47,9 @@ def main():
4747
streamlit_autorun=streamlit_autorun,
4848
)
4949

50+
# Print completion message
51+
print_completion_message(report_type)
52+
5053

5154
if __name__ == "__main__":
5255
main()

src/vuegen/report_generator.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def get_report(
1212
report_type: str,
13-
logger: logging.Logger = get_logger("report"),
13+
logger: logging.Logger = None,
1414
config_path: str = None,
1515
dir_path: str = None,
1616
streamlit_autorun: bool = False,
@@ -36,7 +36,11 @@ def get_report(
3636
ValueError
3737
If neither 'config_path' nor 'directory' is provided.
3838
"""
39-
# Initialize the config manager object
39+
# Initialize logger only if it's not provided
40+
if logger is None:
41+
logger = get_logger("report")
42+
43+
# Create the config manager object
4044
config_manager = ConfigManager(logger)
4145

4246
if dir_path:

src/vuegen/utils.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,46 @@ def get_logger(log_suffix):
744744
return logger
745745

746746

747+
def print_completion_message(report_type: str):
748+
"""
749+
Prints a formatted completion message after report generation.
750+
"""
751+
border = "─" * 65 # Creates a separator line
752+
print(f"\n{border}\n🎉 Pipeline Execution Complete! 🎉\n")
753+
754+
if report_type == "streamlit":
755+
print(
756+
"""🚀 Streamlit Report Generated!
757+
758+
📂 All scripts to build the Streamlit app are available at:
759+
nf_container_results/streamlit_report/sections
760+
761+
▶️ To run the Streamlit app, use the following command:
762+
streamlit run nf_container_results/streamlit_report/sections/report_manager.py
763+
764+
✨ You can extend the report by adding new files to the input directory or updating the config file.
765+
766+
🛠️ Advanced users can modify the Python scripts directly in:
767+
nf_container_results/streamlit_report/sections
768+
"""
769+
)
770+
else:
771+
print(
772+
f"""🚀 {report_type.capitalize()} Report Generated!
773+
774+
📂 Your {report_type} report is available at:
775+
nf_container_results/quarto_report
776+
777+
✨ You can extend the report by adding new files to the input directory or updating the config file.
778+
779+
🛠️ Advanced users can modify the report template directly in:
780+
nf_container_results/quarto_report/quarto_report.qmd
781+
"""
782+
)
783+
784+
print(border)
785+
786+
747787
## REPORT FORMATTING
748788
def generate_footer() -> str:
749789
"""

0 commit comments

Comments
 (0)