From 28202caed6858aaa854868ddfd18a901933024e1 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 11:23:01 +0100 Subject: [PATCH 01/16] =?UTF-8?q?=F0=9F=A6=BA=20Refactor:=20add=20quarto?= =?UTF-8?q?=5Fchecks=20argument?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/__main__.py | 3 +++ src/vuegen/quarto_reportview.py | 10 ++++++++-- src/vuegen/utils.py | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/vuegen/__main__.py b/src/vuegen/__main__.py index 100542f..0631985 100644 --- a/src/vuegen/__main__.py +++ b/src/vuegen/__main__.py @@ -15,6 +15,7 @@ def main(): dir_path = args.directory report_type = args.report_type streamlit_autorun = args.streamlit_autorun + quarto_cheks = args.quarto_checks # Determine the report name for logger suffix if config_path: @@ -38,6 +39,7 @@ def main(): # Initialize logger logger, logfile = get_logger(f"{logger_suffix}") logger.info("logfile: %s", logfile) + # Generate the report _, _ = report_generator.get_report( report_type=report_type, @@ -45,6 +47,7 @@ def main(): config_path=config_path, dir_path=dir_path, streamlit_autorun=streamlit_autorun, + quarto_checks=quarto_cheks, ) # Print completion message diff --git a/src/vuegen/quarto_reportview.py b/src/vuegen/quarto_reportview.py index c7083e1..2e9261e 100644 --- a/src/vuegen/quarto_reportview.py +++ b/src/vuegen/quarto_reportview.py @@ -20,8 +20,14 @@ class QuartoReportView(r.ReportView): BASE_DIR = Path("quarto_report") STATIC_FILES_DIR = BASE_DIR / "static" - def __init__(self, report: r.Report, report_type: r.ReportType): + def __init__( + self, + report: r.Report, + report_type: r.ReportType, + quarto_cheks: bool = False, + ): super().__init__(report=report, report_type=report_type) + self.quarto_cheks = quarto_cheks self.BUNDLED_EXECUTION = False self.quarto_path = "quarto" # self.env_vars = os.environ.copy() @@ -190,7 +196,7 @@ def run_report(self, output_dir: str = BASE_DIR) -> None: r.ReportType.PDF, r.ReportType.DOCX, r.ReportType.ODT, - ]: + ] and self.quarto_cheks: subprocess.run( [self.quarto_path, "install", "tinytex", "--no-prompt"], check=True, diff --git a/src/vuegen/utils.py b/src/vuegen/utils.py index 1af328e..445ccc0 100644 --- a/src/vuegen/utils.py +++ b/src/vuegen/utils.py @@ -232,6 +232,13 @@ def get_parser(prog_name: str, others: dict = {}) -> argparse.Namespace: default=False, help="Automatically run the Streamlit app after report generation.", ) + parser.add_argument( + "-qt_cheks", + "--quarto_cheks", + action="store_true", # Automatically sets True if the flag is passed + default=False, + help="Check if Quarto is installed and available for report generation.", + ) # Parse arguments return parser From 5b4f1c70d7d50053670b18f0b41ac43cb88e6479 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 11:27:12 +0100 Subject: [PATCH 02/16] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20Correct=20validatio?= =?UTF-8?q?n=20for=20revelajs=20and=20jupyter=20notebooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/quarto_reportview.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vuegen/quarto_reportview.py b/src/vuegen/quarto_reportview.py index 2e9261e..a1cfc75 100644 --- a/src/vuegen/quarto_reportview.py +++ b/src/vuegen/quarto_reportview.py @@ -210,11 +210,15 @@ def run_report(self, output_dir: str = BASE_DIR) -> None: args, check=True, ) - out_path = file_path_to_qmd.with_suffix(f".{self.report_type.lower()}") - if self.report_type in [r.ReportType.REVEALJS, r.ReportType.JUPYTER]: - out_path = file_path_to_qmd.with_suffix(".html") + if self.report_type == r.ReportType.REVEALJS: + out_path = file_path_to_qmd.with_name(f"{file_path_to_qmd.stem}_revealjs.html") + elif self.report_type == r.ReportType.JUPYTER: + out_path = file_path_to_qmd.with_suffix(".ipynb") + else: + out_path = file_path_to_qmd.with_suffix(f".{self.report_type.lower()}") if not out_path.exists(): raise FileNotFoundError(f"Report file could not be created: {out_path}") + if self.report_type == r.ReportType.JUPYTER: args = [self.quarto_path, "convert", str(file_path_to_qmd)] subprocess.run( From a53a6f8fb19f48d2e8e96d4993cb770fa383d5d3 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 11:43:23 +0100 Subject: [PATCH 03/16] =?UTF-8?q?=F0=9F=8E=A8=20Format:=20add=20config=5Fp?= =?UTF-8?q?ath=20parameter=20and=20change=20the=20strcuture=20of=20the=20f?= =?UTF-8?q?unction=20to=20print=20completion=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/__main__.py | 5 ++--- src/vuegen/utils.py | 35 ++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/vuegen/__main__.py b/src/vuegen/__main__.py index 0631985..64fd2b2 100644 --- a/src/vuegen/__main__.py +++ b/src/vuegen/__main__.py @@ -2,7 +2,7 @@ from pathlib import Path from vuegen import report_generator -from vuegen.utils import get_logger, get_parser, print_completion_message +from vuegen.utils import get_logger, get_parser, get_completion_message def main(): @@ -52,8 +52,7 @@ def main(): # Print completion message # ! Could use now report_dir and config_path as information - print_completion_message(report_type) - + print(get_completion_message(report_type, config_path)) if __name__ == "__main__": main() diff --git a/src/vuegen/utils.py b/src/vuegen/utils.py index 445ccc0..5415cac 100644 --- a/src/vuegen/utils.py +++ b/src/vuegen/utils.py @@ -737,15 +737,27 @@ def get_logger( return logger, log_file - -def print_completion_message(report_type: str): +def get_completion_message(report_type: str, config_path: str) -> str: """ - Prints a formatted completion message after report generation. + Generate a formatted completion message after report generation. + + Parameters + ---------- + report_type : str + The type of report generated (e.g., "streamlit", "html"). + config_path : str + The path to the configuration file used for generating the report. + + Returns + ------- + str + A formatted string containing the completion message. """ border = "─" * 65 # Creates a separator line + if report_type == "streamlit": - print( - """🚀 Streamlit Report Generated! + message = ( + f"""🚀 Streamlit Report Generated! 📂 All scripts to build the Streamlit app are available at: streamlit_report/sections @@ -757,10 +769,13 @@ def print_completion_message(report_type: str): 🛠️ Advanced users can modify the Python scripts directly in: streamlit_report/sections + +⚙️ Configuration file used: + {config_path} """ ) else: - print( + message = ( f"""🚀 {report_type.capitalize()} Report Generated! 📂 Your {report_type} report is available at: @@ -770,11 +785,13 @@ def print_completion_message(report_type: str): 🛠️ Advanced users can modify the report template directly in: quarto_report/quarto_report.qmd + +⚙️ Configuration file used: + {config_path} """ ) - - print(border) - + + return f"{message}\n{border}" ## REPORT FORMATTING def generate_footer() -> str: From d271f52e0d4e9c89a44a0015b1e2a4dae8b1d170 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 11:45:45 +0100 Subject: [PATCH 04/16] =?UTF-8?q?=F0=9F=8E=A8=20Format:=20add=20black=20fo?= =?UTF-8?q?rmat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/__main__.py | 3 ++- src/vuegen/quarto_reportview.py | 24 +++++++++++++++--------- src/vuegen/utils.py | 14 ++++++-------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/vuegen/__main__.py b/src/vuegen/__main__.py index 64fd2b2..b6cb008 100644 --- a/src/vuegen/__main__.py +++ b/src/vuegen/__main__.py @@ -39,7 +39,7 @@ def main(): # Initialize logger logger, logfile = get_logger(f"{logger_suffix}") logger.info("logfile: %s", logfile) - + # Generate the report _, _ = report_generator.get_report( report_type=report_type, @@ -54,5 +54,6 @@ def main(): # ! Could use now report_dir and config_path as information print(get_completion_message(report_type, config_path)) + if __name__ == "__main__": main() diff --git a/src/vuegen/quarto_reportview.py b/src/vuegen/quarto_reportview.py index a1cfc75..1f828bd 100644 --- a/src/vuegen/quarto_reportview.py +++ b/src/vuegen/quarto_reportview.py @@ -21,8 +21,8 @@ class QuartoReportView(r.ReportView): STATIC_FILES_DIR = BASE_DIR / "static" def __init__( - self, - report: r.Report, + self, + report: r.Report, report_type: r.ReportType, quarto_cheks: bool = False, ): @@ -192,11 +192,15 @@ def run_report(self, output_dir: str = BASE_DIR) -> None: self.report.logger.info( f"Running '{self.report.title}' '{self.report_type}' report with {args!r}" ) - if self.report_type in [ - r.ReportType.PDF, - r.ReportType.DOCX, - r.ReportType.ODT, - ] and self.quarto_cheks: + if ( + self.report_type + in [ + r.ReportType.PDF, + r.ReportType.DOCX, + r.ReportType.ODT, + ] + and self.quarto_cheks + ): subprocess.run( [self.quarto_path, "install", "tinytex", "--no-prompt"], check=True, @@ -211,14 +215,16 @@ def run_report(self, output_dir: str = BASE_DIR) -> None: check=True, ) if self.report_type == r.ReportType.REVEALJS: - out_path = file_path_to_qmd.with_name(f"{file_path_to_qmd.stem}_revealjs.html") + out_path = file_path_to_qmd.with_name( + f"{file_path_to_qmd.stem}_revealjs.html" + ) elif self.report_type == r.ReportType.JUPYTER: out_path = file_path_to_qmd.with_suffix(".ipynb") else: out_path = file_path_to_qmd.with_suffix(f".{self.report_type.lower()}") if not out_path.exists(): raise FileNotFoundError(f"Report file could not be created: {out_path}") - + if self.report_type == r.ReportType.JUPYTER: args = [self.quarto_path, "convert", str(file_path_to_qmd)] subprocess.run( diff --git a/src/vuegen/utils.py b/src/vuegen/utils.py index 5415cac..9d40437 100644 --- a/src/vuegen/utils.py +++ b/src/vuegen/utils.py @@ -737,6 +737,7 @@ def get_logger( return logger, log_file + def get_completion_message(report_type: str, config_path: str) -> str: """ Generate a formatted completion message after report generation. @@ -754,10 +755,9 @@ def get_completion_message(report_type: str, config_path: str) -> str: A formatted string containing the completion message. """ border = "─" * 65 # Creates a separator line - + if report_type == "streamlit": - message = ( - f"""🚀 Streamlit Report Generated! + message = f"""🚀 Streamlit Report Generated! 📂 All scripts to build the Streamlit app are available at: streamlit_report/sections @@ -773,10 +773,8 @@ def get_completion_message(report_type: str, config_path: str) -> str: ⚙️ Configuration file used: {config_path} """ - ) else: - message = ( - f"""🚀 {report_type.capitalize()} Report Generated! + message = f"""🚀 {report_type.capitalize()} Report Generated! 📂 Your {report_type} report is available at: quarto_report @@ -789,10 +787,10 @@ def get_completion_message(report_type: str, config_path: str) -> str: ⚙️ Configuration file used: {config_path} """ - ) - + return f"{message}\n{border}" + ## REPORT FORMATTING def generate_footer() -> str: """ From 49027e1ba7c22a8a462ed3928dcf273675915614 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 11:48:11 +0100 Subject: [PATCH 05/16] =?UTF-8?q?=F0=9F=8E=A8=20Format:=20order=20main=20i?= =?UTF-8?q?mports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vuegen/__main__.py b/src/vuegen/__main__.py index b6cb008..725a734 100644 --- a/src/vuegen/__main__.py +++ b/src/vuegen/__main__.py @@ -2,7 +2,7 @@ from pathlib import Path from vuegen import report_generator -from vuegen.utils import get_logger, get_parser, get_completion_message +from vuegen.utils import get_completion_message, get_logger, get_parser def main(): From 82fbc1ec421a9d360fca95f274379a7478865ed7 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 11:51:44 +0100 Subject: [PATCH 06/16] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20fix=20typo=20for=20?= =?UTF-8?q?quarto=5Fchecks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vuegen/utils.py b/src/vuegen/utils.py index 9d40437..6aff2b4 100644 --- a/src/vuegen/utils.py +++ b/src/vuegen/utils.py @@ -233,8 +233,8 @@ def get_parser(prog_name: str, others: dict = {}) -> argparse.Namespace: help="Automatically run the Streamlit app after report generation.", ) parser.add_argument( - "-qt_cheks", - "--quarto_cheks", + "-qt_checks", + "--quarto_checks", action="store_true", # Automatically sets True if the flag is passed default=False, help="Check if Quarto is installed and available for report generation.", From 4060fa4a4a2141588a23182b0acb5c5d550d67b7 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 11:56:42 +0100 Subject: [PATCH 07/16] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20add=20quarto=5Fchec?= =?UTF-8?q?ks=20into=20the=20report=5Fgenerator=20funcrtion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/report_generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vuegen/report_generator.py b/src/vuegen/report_generator.py index c77d0c8..666487f 100644 --- a/src/vuegen/report_generator.py +++ b/src/vuegen/report_generator.py @@ -16,6 +16,7 @@ def get_report( config_path: str = None, dir_path: str = None, streamlit_autorun: bool = False, + quarto_checks: bool = False, output_dir: Path = None, ) -> tuple[str, str]: """ @@ -97,7 +98,7 @@ def get_report( ) report_dir = output_dir / "quarto_report" static_files_dir = report_dir / "static" - quarto_report = QuartoReportView(report=report, report_type=report_type) + quarto_report = QuartoReportView(report=report, report_type=report_type, checks=quarto_checks) quarto_report.generate_report( output_dir=report_dir, static_dir=static_files_dir ) From 2caacce0010facf0dc03a223596b9b2b6f3fe19c Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 12:35:34 +0100 Subject: [PATCH 08/16] =?UTF-8?q?=F0=9F=8E=A8=20Format:=20apply=20black=20?= =?UTF-8?q?format=20and=20fix=20quarto=5Fchecks=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/report_generator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vuegen/report_generator.py b/src/vuegen/report_generator.py index 666487f..4eedf19 100644 --- a/src/vuegen/report_generator.py +++ b/src/vuegen/report_generator.py @@ -98,7 +98,9 @@ def get_report( ) report_dir = output_dir / "quarto_report" static_files_dir = report_dir / "static" - quarto_report = QuartoReportView(report=report, report_type=report_type, checks=quarto_checks) + quarto_report = QuartoReportView( + report=report, report_type=report_type, quarto_checks=quarto_checks + ) quarto_report.generate_report( output_dir=report_dir, static_dir=static_files_dir ) From b30128baedb71842e04bb7a0fdce17d320a50f65 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 12:38:46 +0100 Subject: [PATCH 09/16] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20fix=20quarto=5Fchec?= =?UTF-8?q?ks=20typo=20in=20quarto=5Freview.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/quarto_reportview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vuegen/quarto_reportview.py b/src/vuegen/quarto_reportview.py index 1f828bd..9d5437b 100644 --- a/src/vuegen/quarto_reportview.py +++ b/src/vuegen/quarto_reportview.py @@ -24,10 +24,10 @@ def __init__( self, report: r.Report, report_type: r.ReportType, - quarto_cheks: bool = False, + quarto_checks: bool = False, ): super().__init__(report=report, report_type=report_type) - self.quarto_cheks = quarto_cheks + self.quarto_checks = quarto_checks self.BUNDLED_EXECUTION = False self.quarto_path = "quarto" # self.env_vars = os.environ.copy() From 97a70bd9c265393369c230613b378fab63e1c58e Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 12:44:53 +0100 Subject: [PATCH 10/16] =?UTF-8?q?=F0=9F=90=9B=20Fix=20quarto=5Fchecks=20ty?= =?UTF-8?q?po?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/quarto_reportview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vuegen/quarto_reportview.py b/src/vuegen/quarto_reportview.py index 9d5437b..a0853be 100644 --- a/src/vuegen/quarto_reportview.py +++ b/src/vuegen/quarto_reportview.py @@ -199,7 +199,7 @@ def run_report(self, output_dir: str = BASE_DIR) -> None: r.ReportType.DOCX, r.ReportType.ODT, ] - and self.quarto_cheks + and self.quarto_checks ): subprocess.run( [self.quarto_path, "install", "tinytex", "--no-prompt"], From b82fae145538971f5f73658d55287d7e6e236f86 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 12:59:15 +0100 Subject: [PATCH 11/16] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20add=20-qt=5Fchecks?= =?UTF-8?q?=20parameter=20into=20the=20CICD=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cdci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index b21d669..4a71280 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -72,7 +72,7 @@ jobs: - name: quarto pdf report run: | cd docs - vuegen -dir example_data/Earth_microbiome_vuegen_demo_notebook -rt pdf + vuegen -dir example_data/Earth_microbiome_vuegen_demo_notebook -rt pdf -qt_checks vuegen -c example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml -rt pdf - name: quarto docx report run: | From d2d2b405e910094414f91d81df06c7316d7828c8 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 13:15:41 +0100 Subject: [PATCH 12/16] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20add=20html=20suffix?= =?UTF-8?q?=20for=20jupyter=20notebook=20for=20initial=20validation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/quarto_reportview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vuegen/quarto_reportview.py b/src/vuegen/quarto_reportview.py index a0853be..a19eb8d 100644 --- a/src/vuegen/quarto_reportview.py +++ b/src/vuegen/quarto_reportview.py @@ -219,7 +219,7 @@ def run_report(self, output_dir: str = BASE_DIR) -> None: f"{file_path_to_qmd.stem}_revealjs.html" ) elif self.report_type == r.ReportType.JUPYTER: - out_path = file_path_to_qmd.with_suffix(".ipynb") + out_path = file_path_to_qmd.with_suffix(".html") else: out_path = file_path_to_qmd.with_suffix(f".{self.report_type.lower()}") if not out_path.exists(): From eb4e62612cf6b899e15eec6577f569fd34ebdedb Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 25 Mar 2025 15:05:04 +0100 Subject: [PATCH 13/16] :bug: fix import and specify that GUI execution checks tinytex and chromium --- gui/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/app.py b/gui/app.py index a9a2d9d..ee993b3 100644 --- a/gui/app.py +++ b/gui/app.py @@ -36,7 +36,7 @@ # from vuegen.__main__ import main from vuegen.report import ReportType -from vuegen.utils import get_logger, print_completion_message +from vuegen.utils import get_completion_message, get_logger customtkinter.set_appearance_mode("system") customtkinter.set_default_color_theme("dark-blue") @@ -159,6 +159,7 @@ def inner(): kwargs["logger"].info("logfile: %s", log_file) kwargs["logger"].debug("sys.path: %s", sys.path) kwargs["logger"].debug("PATH (in app): %s ", os.environ["PATH"]) + kwargs["quarto_checks"] = True # for gui check local quarto installation report_dir, gen_config_path = report_generator.get_report(**kwargs) kwargs["logger"].info("Report generated at %s", report_dir) messagebox.showinfo( @@ -169,7 +170,7 @@ def inner(): f"\n\nConfiguration file at:\n{gen_config_path}", ) global hash_config_app # ! fix this - print_completion_message(report_type.get()) + get_completion_message(report_type.get()) if hash(yaml.dump(config_app)) != hash_config_app: with open(config_file, "w", encoding="utf-8") as f: yaml.dump(config_app, f) From a00746c582e9a705c31a8cf2aab929e3fd33cc48 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 15:55:36 +0100 Subject: [PATCH 14/16] =?UTF-8?q?=E2=9C=A8=20Feat:=20add=20output=5Fdir=20?= =?UTF-8?q?as=20an=20argument?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/__main__.py | 2 ++ src/vuegen/utils.py | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vuegen/__main__.py b/src/vuegen/__main__.py index 725a734..e2f6321 100644 --- a/src/vuegen/__main__.py +++ b/src/vuegen/__main__.py @@ -16,6 +16,7 @@ def main(): report_type = args.report_type streamlit_autorun = args.streamlit_autorun quarto_cheks = args.quarto_checks + output_dir = args.output_dir # Determine the report name for logger suffix if config_path: @@ -46,6 +47,7 @@ def main(): logger=logger, config_path=config_path, dir_path=dir_path, + output_dir=output_dir, streamlit_autorun=streamlit_autorun, quarto_checks=quarto_cheks, ) diff --git a/src/vuegen/utils.py b/src/vuegen/utils.py index 6aff2b4..e028974 100644 --- a/src/vuegen/utils.py +++ b/src/vuegen/utils.py @@ -225,6 +225,13 @@ def get_parser(prog_name: str, others: dict = {}) -> argparse.Namespace: default="streamlit", help="Type of the report to generate (streamlit, html, pdf, docx, odt, revealjs, pptx, or jupyter).", ) + parser.add_argument( + "-output_dir", + "--output_directory", + type=str, + default=None, + help="Path to the output directory for the generated report.", + ) parser.add_argument( "-st_autorun", "--streamlit_autorun", @@ -239,7 +246,6 @@ def get_parser(prog_name: str, others: dict = {}) -> argparse.Namespace: default=False, help="Check if Quarto is installed and available for report generation.", ) - # Parse arguments return parser From 3f233183bf0d29e3d4a5bac8eea1d9530cc71308 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 15:59:19 +0100 Subject: [PATCH 15/16] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20correct=20output=5F?= =?UTF-8?q?dir=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vuegen/__main__.py b/src/vuegen/__main__.py index e2f6321..3027556 100644 --- a/src/vuegen/__main__.py +++ b/src/vuegen/__main__.py @@ -14,9 +14,9 @@ def main(): config_path = args.config dir_path = args.directory report_type = args.report_type + output_dir = args.output_directory streamlit_autorun = args.streamlit_autorun quarto_cheks = args.quarto_checks - output_dir = args.output_dir # Determine the report name for logger suffix if config_path: From 4264171758331c21095325cf303993bc8c440ca8 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 25 Mar 2025 17:39:28 +0100 Subject: [PATCH 16/16] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20add=20-qt=5Fchecks?= =?UTF-8?q?=20parameter=20in=20the=20CICD=20processs=20for=20the=20pdf=20r?= =?UTF-8?q?eport=20using=20a=20config=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cdci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 4a71280..2e67432 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -73,7 +73,7 @@ jobs: run: | cd docs vuegen -dir example_data/Earth_microbiome_vuegen_demo_notebook -rt pdf -qt_checks - vuegen -c example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml -rt pdf + vuegen -c example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml -rt pdf -qt_checks - name: quarto docx report run: | cd docs