Skip to content

Commit a6632b6

Browse files
authored
Merge branch 'main' into test_all_os
2 parents 86ab368 + 33ffc65 commit a6632b6

File tree

7 files changed

+57
-7
lines changed

7 files changed

+57
-7
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
An extended version of the class diagram with attributes and methods is available [here][vuegen-class-diag-att].
38+
3739
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.
3840

3941
## Installation
@@ -68,7 +70,7 @@ If you prefer not to install VueGen on your system, a pre-configured Docker cont
6870
Run VueGen using a directory with the following command:
6971

7072
```bash
71-
vuegen --directory example_data/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
73+
vuegen --directory docs/example_data/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
7274
```
7375

7476
> [!NOTE]
@@ -77,7 +79,7 @@ vuegen --directory example_data/Earth_microbiome_vuegen_demo_notebook --report_t
7779
It's also possible to provide a configuration file instead of a directory:
7880

7981
```bash
80-
vuegen --config example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml --report_type streamlit
82+
vuegen --config docs/example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml --report_type streamlit
8183
```
8284

8385
The current report types supported by VueGen are:
@@ -95,7 +97,7 @@ Instead of installing VueGen locally, you can run it directly from a Docker cont
9597

9698
```bash
9799
docker run --rm \
98-
-v "$(pwd)/Earth_microbiome_vuegen_demo_notebook:/home/appuser/Earth_microbiome_vuegen_demo_notebook" \
100+
-v "$(pwd)docs/example_data/Earth_microbiome_vuegen_demo_notebook:/home/appuser/Earth_microbiome_vuegen_demo_notebook" \
99101
-v "$(pwd)/output_docker:/home/appuser/quarto_report" \
100102
quay.io/dtu_biosustain_dsp/vuegen:docker --directory /home/appuser/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
101103
```
@@ -138,6 +140,7 @@ We appreciate your feedback! If you have any comments, suggestions, or run into
138140
[streamlit]: https://streamlit.io/
139141
[vuegen-pypi]: https://pypi.org/project/vuegen/
140142
[vuegen-docker-quay]: https://quay.io/repository/dtu_biosustain_dsp/vuegen
143+
[vuegen-class-diag-att]: https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_classdiagram_withattmeth.pdf
141144
[vuegen-docs]: https://vuegen.readthedocs.io/
142145
[ci-gh-action]: https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml
143146
[ci-docs]: https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml
26.8 KB
Loading
115 KB
Binary file not shown.

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)