Skip to content

Commit 4ac1971

Browse files
committed
🎨 module string, line length, unused arguments,
1 parent 60afba6 commit 4ac1971

File tree

5 files changed

+29
-14
lines changed

5 files changed

+29
-14
lines changed

src/vuegen/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
"""VueGen automates the creation of reports from bioinformatics outputs,
2+
supporting formats like PDF, HTML, DOCX, ODT, PPTX, Reveal.js, Jupyter notebooks,
3+
and Streamlit web applications. Users simply provide a directory with output files
4+
and VueGen compiles them into a structured report."""
5+
16
__version__ = "1.0.0"

src/vuegen/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Command-line interface for VueGen report generation."""
2+
13
import sys
24
from pathlib import Path
35

src/vuegen/report_generator.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Main API entry point for generating reports using VueGen."""
2+
13
import logging
24
import shutil
35
import sys
@@ -28,23 +30,25 @@ def get_report(
2830
report_type : str
2931
The report type. It should be one of the values of the ReportType Enum.
3032
logger : logging.Logger, optional
31-
A logger object to track warnings, errors, and info messages. If not provided, a default logger will be created.
33+
A logger object to track warnings, errors, and info messages. If not provided,
34+
a default logger will be created.
3235
config_path : str, optional
3336
Path to the YAML configuration file.
3437
dir_path : str, optional
3538
Path to the directory from which to generate the configuration file.
3639
streamlit_autorun : bool, optional
37-
Whether to automatically run the Streamlit report after generation (default is False).
38-
quarto_checks : bool, optional
39-
Whether to perform checks for Quarto report generation for TeX and Chromium installation
40+
Whether to automatically run the Streamlit report after generation
4041
(default is False).
42+
quarto_checks : bool, optional
43+
Whether to perform checks for Quarto report generation for TeX and Chromium
44+
installation (default is False).
4145
output_dir : Path, optional
4246
The directory where the report folder will be generated.
4347
If not provided, the current directory will be used.
4448
max_depth : int, optional
45-
The maximum depth of the directory structure to consider when generating the report.
46-
The default is 2, which means it will include sections and subsections. The parater
47-
is only used when 'dir_path' is used.
49+
The maximum depth of the directory structure to consider when generating the
50+
report. The default is 2, which means it will include sections and subsections.
51+
The parater is only used when 'dir_path' is used.
4852
4953
Raises
5054
------
@@ -80,7 +84,7 @@ def get_report(
8084

8185
if dir_path:
8286
# Generate configuration from the provided directory
83-
yaml_data, base_folder_path = config_manager.create_yamlconfig_fromdir(dir_path)
87+
yaml_data, _ = config_manager.create_yamlconfig_fromdir(dir_path)
8488
# yaml_data has under report a title created based on the directory name
8589
config_path = write_yaml_config(yaml_data, output_dir)
8690
logger.info("Configuration file generated at %s", config_path)
@@ -89,7 +93,7 @@ def get_report(
8993
report_config = load_yaml_config(config_path)
9094

9195
# Load report object and metadata
92-
report, report_metadata = config_manager.initialize_report(report_config)
96+
report, _ = config_manager.initialize_report(report_config)
9397

9498
# Validate and convert the report type to its enum value
9599
report_type = assert_enum_value(ReportType, report_type, logger)
@@ -112,12 +116,12 @@ def get_report(
112116
if shutil.which("quarto") is None and not hasattr(
113117
sys, "_MEIPASS"
114118
): # ? and not getattr(sys, "frozen", False)
115-
logger.error(
116-
"Quarto is not installed. Please install Quarto before generating this report type."
117-
)
118-
raise RuntimeError(
119-
"Quarto is not installed. Please install Quarto before generating this report type."
119+
msg = (
120+
"Quarto is not installed. Please install Quarto before generating this "
121+
"report type."
120122
)
123+
logger.error(msg)
124+
raise RuntimeError(msg)
121125
report_dir = output_dir / "quarto_report"
122126
static_files_dir = report_dir / "static"
123127
quarto_report = QuartoReportView(

src/vuegen/table_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Reading tabular data using pandas."""
2+
13
import pandas as pd
24

35
from . import report as r

src/vuegen/utils/variables.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Create valid variable names for Python identifiers."""
2+
13
import re
24

35

0 commit comments

Comments
 (0)