Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions vuegen/config_manager.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
import report as r
from pathlib import Path
from typing import Dict, List, Union, Tuple
from utils import get_logger, assert_enum_value

from . import report as r
from .utils import assert_enum_value, get_logger


class ConfigManager:
"""
Expand Down
5 changes: 3 additions & 2 deletions vuegen/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import report_generator
from pathlib import Path
from utils import get_logger, get_args

from vuegen import report_generator
from vuegen.utils import get_args, get_logger

if __name__ == '__main__':
# Parse command-line arguments
Expand Down
14 changes: 8 additions & 6 deletions vuegen/report_generator.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from streamlit_reportview import StreamlitReportView
from quarto_reportview import QuartoReportView
from config_manager import ConfigManager
from utils import assert_enum_value, load_yaml_config, write_yaml_config
from report import ReportType
import logging

from .config_manager import ConfigManager
from .quarto_reportview import QuartoReportView
from .report import ReportType
from .streamlit_reportview import StreamlitReportView
from .utils import assert_enum_value, load_yaml_config, write_yaml_config


def get_report(report_type: str, logger: logging.Logger, config_path: str = None, dir_path: str = None) -> None:
"""
Generate and run a report based on the specified engine.
Expand All @@ -15,7 +17,7 @@ def get_report(report_type: str, logger: logging.Logger, config_path: str = None
The report type. It should be one of the values of the ReportType Enum.
logger : logging.Logger
A logger object to track warnings, errors, and info messages.
config : str, optional
config_path : str, optional
Path to the YAML configuration file.
dir_path : str, optional
Path to the directory from which to generate the configuration file.
Expand Down
9 changes: 4 additions & 5 deletions vuegen/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@

from io import StringIO
from typing import Type
from bs4 import BeautifulSoup
from pathlib import Path
from urllib.parse import urlparse
from pathlib import Path

import networkx as nx
import requests
Expand Down Expand Up @@ -193,9 +192,9 @@ def get_args(prog_name: str, others: dict = {}) -> argparse.Namespace:
parser.add_argument(
"-rt",
"--report_type",
type = str,
default = None,
help = "Type of the report to generate (streamlit, html, pdf, docx, odt, revealjs, pptx, or jupyter)."
type=str,
default='streamlit', # this is not a valid default
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to delete the comment

help="Type of the report to generate (streamlit, html, pdf, docx, odt, revealjs, pptx, or jupyter)."
)

# Parse arguments
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.