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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "vuegen"
dynamic = ["version"]

[tool.poetry]
description = "Module to generate automatic web interface reports with visualizations"
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."
authors = ["MoNA group"]
license = "MIT"
readme = "README.md"
Expand Down
5 changes: 4 additions & 1 deletion src/vuegen/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathlib import Path

from vuegen import report_generator
from vuegen.utils import get_logger, get_parser
from vuegen.utils import get_logger, get_parser, print_completion_message


def main():
Expand Down Expand Up @@ -47,6 +47,9 @@ def main():
streamlit_autorun=streamlit_autorun,
)

# Print completion message
print_completion_message(report_type)


if __name__ == "__main__":
main()
8 changes: 6 additions & 2 deletions src/vuegen/report_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def get_report(
report_type: str,
logger: logging.Logger = get_logger("report"),
logger: logging.Logger = None,
config_path: str = None,
dir_path: str = None,
streamlit_autorun: bool = False,
Expand All @@ -36,7 +36,11 @@ def get_report(
ValueError
If neither 'config_path' nor 'directory' is provided.
"""
# Initialize the config manager object
# Initialize logger only if it's not provided
if logger is None:
logger = get_logger("report")

# Create the config manager object
config_manager = ConfigManager(logger)

if dir_path:
Expand Down
40 changes: 40 additions & 0 deletions src/vuegen/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,46 @@ def get_logger(log_suffix):
return logger


def print_completion_message(report_type: str):
"""
Prints a formatted completion message after report generation.
"""
border = "─" * 65 # Creates a separator line
print(f"\n{border}\n🎉 Pipeline Execution Complete! 🎉\n")

if report_type == "streamlit":
print(
"""🚀 Streamlit Report Generated!

📂 All scripts to build the Streamlit app are available at:
nf_container_results/streamlit_report/sections

▶️ To run the Streamlit app, use the following command:
streamlit run nf_container_results/streamlit_report/sections/report_manager.py

✨ You can extend the report by adding new files to the input directory or updating the config file.

🛠️ Advanced users can modify the Python scripts directly in:
nf_container_results/streamlit_report/sections
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it now always called nf_container_results ?

"""
)
else:
print(
f"""🚀 {report_type.capitalize()} Report Generated!

📂 Your {report_type} report is available at:
nf_container_results/quarto_report

✨ You can extend the report by adding new files to the input directory or updating the config file.

🛠️ Advanced users can modify the report template directly in:
nf_container_results/quarto_report/quarto_report.qmd
"""
)

print(border)


## REPORT FORMATTING
def generate_footer() -> str:
"""
Expand Down
Loading