Skip to content

Commit a555260

Browse files
committed
Change metadata_manager.py name to config_manager.py and also the class name to make clear the purpose of this script
1 parent f518170 commit a555260

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

report_config_micw2graph.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ sections:
2020
- title: "Top 5 species by biome (plotly)"
2121
component_type: "plot"
2222
plot_type: "plotly"
23-
file_path: "https://raw.githubusercontent.com/JosefineTM/DemProt_report/main/example_data/MicW2Graph/top_species_plot_biome.json"
23+
file_path: "https://raw.githubusercontent.com/sayalaruano/report_generator_st_cloud_test/main/example_data/MicW2Graph/top_species_plot_biome.json"
2424
caption: "Optional caption"
2525
- title: "Multiline plot (altair)"
2626
component_type: "plot"
2727
plot_type: "altair"
2828
file_path: "example_data/altair_multilineplot.json"
2929
- title: "Abundance data for all studies (csv)"
3030
component_type: "dataframe"
31-
file_path: "https://raw.githubusercontent.com/JosefineTM/DemProt_report/main/example_data/MicW2Graph/abundance_data_allbiomes.csv"
31+
file_path: "https://raw.githubusercontent.com/sayalaruano/report_generator_st_cloud_test/main/example_data/MicW2Graph/abundance_data_allbiomes.csv"
3232
file_format: "csv"
3333
delimiter: ","
3434
- title: "Abundance data for all studies (xls)"
@@ -58,7 +58,7 @@ sections:
5858
components:
5959
- title: "Markdown example"
6060
component_type: "markdown"
61-
file_path: "https://raw.githubusercontent.com/JosefineTM/DemProt_report/main/example_data/test_md.md"
61+
file_path: "https://raw.githubusercontent.com/sayalaruano/report_generator_st_cloud_test/main/example_data/test_md.md"
6262
- title: "Microbial Association Networks"
6363
subsections:
6464
- title: "Network Visualization1"
@@ -79,7 +79,7 @@ sections:
7979
- title: "Network3 (remote html)"
8080
component_type: "plot"
8181
plot_type: "interactive_network"
82-
file_path: "https://rawcdn.githack.com/JosefineTM/DemProt_report/3fca83b18e8b0666dff8b03fcdcf3d05d0d2541a/example_data/network1.html"
82+
file_path: "https://rawcdn.githack.com/sayalaruano/report_generator_st_cloud_test/62a9ceec2281c54b55e99017f2bddc954e7db311/example_data/network1.html"
8383
- title: "Network Visualization4"
8484
components:
8585
- title: "Network4 (html)"

vuegen/metadata_manager.py renamed to vuegen/config_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import report as r
22
from utils import get_logger, assert_enum_value
33

4-
class MetadataManager:
4+
class ConfigManager:
55
"""
6-
Class for handling metadata of reports from YAML files and creating report objects.
6+
Class for handling metadata of reports from YAML config file and creating report objects.
77
"""
88
def __init__(self, logger=None):
99
"""
10-
Initializes the MetadataManager with a logger.
10+
Initializes the ConfigManager with a logger.
1111
1212
Parameters
1313
----------

vuegen/report_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from streamlit_reportview import StreamlitReportView
22
from quarto_reportview import QuartoReportView
3-
from metadata_manager import MetadataManager
3+
from config_manager import ConfigManager
44
from utils import assert_enum_value
55
from report import ReportType
66
import logging
@@ -23,8 +23,8 @@ def get_report(config: dict, report_type: str, logger: logging.Logger) -> None:
2323
ValueError
2424
If an unsupported report engine, report type, or report format are provided.
2525
"""
26-
# Load report object and metadata from the YAML file
27-
yaml_manager = MetadataManager(logger)
26+
# Load report object and metadata from the YAML config file
27+
yaml_manager = ConfigManager(logger)
2828
report, report_metadata = yaml_manager.initialize_report(config)
2929

3030
# Validate and convert the report type to its enum value

0 commit comments

Comments
 (0)