From 8df4f8f84332e06bbc650507757ea25757f4024d Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Fri, 17 Jan 2025 15:24:46 +0100 Subject: [PATCH 1/7] :fire: remove old code in setup.py --- setup.py | 54 ++---------------------------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/setup.py b/setup.py index d06acb2..b24d6d2 100644 --- a/setup.py +++ b/setup.py @@ -1,54 +1,4 @@ # builtin -import setuptools +from setuptools import setup -def get_long_description(): - with open("README.md", "r") as readme_file: - long_description = readme_file.read() - return long_description - - -def get_requirements(): - with open('requirements.txt') as f: - required = f.read().splitlines() - return required - - -def create_pip_wheel(): - requirements = get_requirements() - setuptools.setup( - name="report_generator", - version="0.1.0", - license="MIT", - description="An open-source Python package for generating reports for Omics datasets", - long_description=get_long_description(), - long_description_content_type="text/markdown", - author="Multi-omics Network Analytics lab", - author_email="albsad@dtu.dk", - url="", - project_urls={ - "Multi-omics Network Analytics": "", - "GitHub": "", - "ReadTheDocs": "", - "PyPi": "", - "Scientific paper": "https://www.nature.com/articles/s41587-021-01145-6", - }, - keywords=["dashboard", "bioinformatics", "multi-omics",], - classifiers=[ - "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Topic :: Scientific :: Bioinformatics", - ], - packages=[ - "report", - ], - include_package_data=True, - entry_points={}, - install_requires=requirements, - python_requires=">=3.9,<4", - ) - - -if __name__ == "__main__": - create_pip_wheel() +setup() From 85e677a821f84033ab63f27b194e774a9df974dd Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Fri, 17 Jan 2025 15:35:00 +0100 Subject: [PATCH 2/7] :art: src package layout --- {vuegen => src/vuegen}/__init__.py | 0 {vuegen => src/vuegen}/__main__.py | 0 {vuegen => src/vuegen}/config_manager.py | 0 {vuegen => src/vuegen}/quarto_reportview.py | 0 {vuegen => src/vuegen}/report.py | 0 {vuegen => src/vuegen}/report_generator.py | 0 {vuegen => src/vuegen}/streamlit_reportview.py | 0 {vuegen => src/vuegen}/utils.py | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename {vuegen => src/vuegen}/__init__.py (100%) rename {vuegen => src/vuegen}/__main__.py (100%) rename {vuegen => src/vuegen}/config_manager.py (100%) rename {vuegen => src/vuegen}/quarto_reportview.py (100%) rename {vuegen => src/vuegen}/report.py (100%) rename {vuegen => src/vuegen}/report_generator.py (100%) rename {vuegen => src/vuegen}/streamlit_reportview.py (100%) rename {vuegen => src/vuegen}/utils.py (100%) diff --git a/vuegen/__init__.py b/src/vuegen/__init__.py similarity index 100% rename from vuegen/__init__.py rename to src/vuegen/__init__.py diff --git a/vuegen/__main__.py b/src/vuegen/__main__.py similarity index 100% rename from vuegen/__main__.py rename to src/vuegen/__main__.py diff --git a/vuegen/config_manager.py b/src/vuegen/config_manager.py similarity index 100% rename from vuegen/config_manager.py rename to src/vuegen/config_manager.py diff --git a/vuegen/quarto_reportview.py b/src/vuegen/quarto_reportview.py similarity index 100% rename from vuegen/quarto_reportview.py rename to src/vuegen/quarto_reportview.py diff --git a/vuegen/report.py b/src/vuegen/report.py similarity index 100% rename from vuegen/report.py rename to src/vuegen/report.py diff --git a/vuegen/report_generator.py b/src/vuegen/report_generator.py similarity index 100% rename from vuegen/report_generator.py rename to src/vuegen/report_generator.py diff --git a/vuegen/streamlit_reportview.py b/src/vuegen/streamlit_reportview.py similarity index 100% rename from vuegen/streamlit_reportview.py rename to src/vuegen/streamlit_reportview.py diff --git a/vuegen/utils.py b/src/vuegen/utils.py similarity index 100% rename from vuegen/utils.py rename to src/vuegen/utils.py From 3cf0dfd694a9eb10bdb70f239b06e1a886a18173 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Fri, 17 Jan 2025 15:48:59 +0100 Subject: [PATCH 3/7] :bug: specify path correctly for module --- .github/workflows/docs.yml | 2 +- docs/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3136fca..0a89251 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: - name: Build references run: | cd docs - sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../vuegen + sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../src/vuegen - name: Build documentation run: | cd docs diff --git a/docs/README.md b/docs/README.md index edf0ca2..eb898f6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -26,7 +26,7 @@ Options: ```bash # pwd: docs # apidoc -sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../vuegen +sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../src/vuegen # build docs sphinx-build -n -W --keep-going -b html ./ ./_build/ ``` From 88a2e4c328d04c75e1b75ae3c4b2d204106f16c0 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 21 Jan 2025 10:58:33 +0100 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=90=9B=20Fix(report=5Fconfig=5Fmicw2g?= =?UTF-8?q?raph.yaml):=20Modify=20the=20component=20paths=20by=20adding=20?= =?UTF-8?q?"docs"=20to=20run=20vuegen=20from=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MicW2Graph/report_config_micw2graph.yaml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/example_data/MicW2Graph/report_config_micw2graph.yaml b/docs/example_data/MicW2Graph/report_config_micw2graph.yaml index 84ccf19..1afd93d 100644 --- a/docs/example_data/MicW2Graph/report_config_micw2graph.yaml +++ b/docs/example_data/MicW2Graph/report_config_micw2graph.yaml @@ -9,7 +9,7 @@ report: infer potential interactions among microorganisms through microbial association networks (MANs). MicW2Graph enables the investigation of research questions related to WWT, focusing on aspects such as microbial connections, community memberships, and potential ecological functions. - graphical_abstract: example_data/MicW2Graph/Methods_MicW2Graph.png + graphical_abstract: docs/example_data/MicW2Graph/Methods_MicW2Graph.png logo: docs/images/vuegen_logo.png sections: - title: Exploratory Data Analysis @@ -25,7 +25,7 @@ sections: - title: Multiline plot (altair) component_type: plot plot_type: altair - file_path: example_data/MicW2Graph/1_Exploratory_Data_Analysis/1_Abundance_data/2_multilineplot_altair.json + file_path: docs/example_data/MicW2Graph/1_Exploratory_Data_Analysis/1_Abundance_data/2_multilineplot_altair.json - title: Abundance data for all studies (csv) component_type: dataframe file_path: https://raw.githubusercontent.com/sayalaruano/report_generator_st_cloud_test/main/example_data/MicW2Graph/abundance_data_allbiomes.csv @@ -33,7 +33,7 @@ sections: delimiter: ',' - title: Abundance data for all studies (xls) component_type: dataframe - file_path: example_data/MicW2Graph/1_Exploratory_Data_Analysis/1_Abundance_data/4_abundance_data_allbiomes.xls + file_path: docs/example_data/MicW2Graph/1_Exploratory_Data_Analysis/1_Abundance_data/4_abundance_data_allbiomes.xls file_format: xls delimiter: ',' - title: Sample data @@ -41,18 +41,18 @@ sections: - title: Number of samples per study (png) component_type: plot plot_type: static - file_path: example_data/MicW2Graph/1_Exploratory_Data_Analysis/2_Sample_data/3_number_samples_per_study.png + file_path: docs/example_data/MicW2Graph/1_Exploratory_Data_Analysis/2_Sample_data/3_number_samples_per_study.png - title: Sampling countries for all studies (plotly) component_type: plot plot_type: plotly - file_path: example_data/MicW2Graph/1_Exploratory_Data_Analysis/2_Sample_data/1_pie_plot_countries_plotly.json + file_path: docs/example_data/MicW2Graph/1_Exploratory_Data_Analysis/2_Sample_data/1_pie_plot_countries_plotly.json - title: Sample data for all studies (parquet) component_type: dataframe - file_path: example_data/MicW2Graph/1_Exploratory_Data_Analysis/2_Sample_data/4_sample_info_allbiomes.parquet + file_path: docs/example_data/MicW2Graph/1_Exploratory_Data_Analysis/2_Sample_data/4_sample_info_allbiomes.parquet file_format: parquet - title: Sample data for all studies (txt) component_type: dataframe - file_path: example_data/MicW2Graph/1_Exploratory_Data_Analysis/2_Sample_data/5_sample_info_allbiomes.txt + file_path: docs/example_data/MicW2Graph/1_Exploratory_Data_Analysis/2_Sample_data/5_sample_info_allbiomes.txt file_format: txt - title: Extra information components: @@ -66,17 +66,17 @@ sections: - title: Network1 (graphml) component_type: plot plot_type: interactive_network - file_path: example_data/MicW2Graph/2_Microbial_Association_Networks/1_Network_visualization1/1_man_example.graphml + file_path: docs/example_data/MicW2Graph/2_Microbial_Association_Networks/1_Network_visualization1/1_man_example.graphml - title: Network Visualization2 components: - title: Network2 (edge list csv) component_type: plot plot_type: interactive_network csv_network_format: edgelist - file_path: example_data/MicW2Graph/2_Microbial_Association_Networks/2_Network_visualization2/1_man_example_edgelist.csv + file_path: docs/example_data/MicW2Graph/2_Microbial_Association_Networks/2_Network_visualization2/1_man_example_edgelist.csv - title: Edge list (csv) component_type: dataframe - file_path: example_data/MicW2Graph/2_Microbial_Association_Networks/2_Network_visualization2/1_man_example_edgelist.csv + file_path: docs/example_data/MicW2Graph/2_Microbial_Association_Networks/2_Network_visualization2/1_man_example_edgelist.csv file_format: csv delimiter: ',' caption: This is the edge list of the network @@ -85,13 +85,13 @@ sections: - title: Network3 (cyjs) component_type: plot plot_type: interactive_network - file_path: example_data/MicW2Graph/2_Microbial_Association_Networks/3_Network_visualization3/1_man_example.cyjs + file_path: docs/example_data/MicW2Graph/2_Microbial_Association_Networks/3_Network_visualization3/1_man_example.cyjs - title: Network Visualization4 components: - title: Network4 (html) component_type: plot plot_type: interactive_network - file_path: example_data/MicW2Graph/2_Microbial_Association_Networks/4_Network_visualization4/1_ckg_network.html + file_path: docs/example_data/MicW2Graph/2_Microbial_Association_Networks/4_Network_visualization4/1_ckg_network.html - title: Network Visualization5 components: - title: Network5 (remote html) From 7910543b0df7c4cf3bd6805a9bd3896308432cd2 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 21 Jan 2025 11:08:50 +0100 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=90=9B=20Fix(cdci.yml):=20Remove=20cd?= =?UTF-8?q?=20docs=20fro=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cdci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 3801537..4577237 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -32,7 +32,6 @@ jobs: run: python -m pytest tests - name: Execute streamlit report run: | - cd docs vuegen --config example_data/MicW2Graph/report_config_micw2graph.yaml other-reports: @@ -55,34 +54,26 @@ jobs: pip install -e ".[quarto]" - name: Execute streamlit report (to check) run: | - cd docs vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml # repeat for easier inspection on GitHub: - name: quarto html report run: | - cd docs vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt html - name: quarto pdf report run: | - cd docs vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt pdf - name: quarto docx report run: | - cd docs vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt docx - name: quarto odt report run: | - cd docs vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt odt - name: quarto revealjs report run: | - cd docs vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt revealjs - name: quarto pptx report run: | - cd docs vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt pptx - name: quarto jupyter report run: | - cd docs vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt jupyter From 3665bf11c53768f542a43498e3ec3c45ae368e0f Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Tue, 21 Jan 2025 11:14:08 +0100 Subject: [PATCH 6/7] =?UTF-8?q?=F0=9F=90=9B=20Fix(cdci.yml):=20Add=20docs?= =?UTF-8?q?=20to=20the=20config=20paths?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cdci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 4577237..8bb042e 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -32,7 +32,7 @@ jobs: run: python -m pytest tests - name: Execute streamlit report run: | - vuegen --config example_data/MicW2Graph/report_config_micw2graph.yaml + vuegen --config docs/example_data/MicW2Graph/report_config_micw2graph.yaml other-reports: name: Integration tests @@ -54,26 +54,26 @@ jobs: pip install -e ".[quarto]" - name: Execute streamlit report (to check) run: | - vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml + vuegen -c docs/example_data/MicW2Graph/report_config_micw2graph.yaml # repeat for easier inspection on GitHub: - name: quarto html report run: | - vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt html + vuegen -c docs/example_data/MicW2Graph/report_config_micw2graph.yaml -rt html - name: quarto pdf report run: | - vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt pdf + vuegen -c docs/example_data/MicW2Graph/report_config_micw2graph.yaml -rt pdf - name: quarto docx report run: | - vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt docx + vuegen -c docs/example_data/MicW2Graph/report_config_micw2graph.yaml -rt docx - name: quarto odt report run: | - vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt odt + vuegen -c docs/example_data/MicW2Graph/report_config_micw2graph.yaml -rt odt - name: quarto revealjs report run: | - vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt revealjs + vuegen -c docs/example_data/MicW2Graph/report_config_micw2graph.yaml -rt revealjs - name: quarto pptx report run: | - vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt pptx + vuegen -c docs/example_data/MicW2Graph/report_config_micw2graph.yaml -rt pptx - name: quarto jupyter report run: | - vuegen -c example_data/MicW2Graph/report_config_micw2graph.yaml -rt jupyter + vuegen -c docs/example_data/MicW2Graph/report_config_micw2graph.yaml -rt jupyter From 169a8b1a95f5ee38b04319438b34f3283b636054 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 21 Jan 2025 15:38:48 +0100 Subject: [PATCH 7/7] :art: change to directory based execution --- docs/vuegen_demo.ipynb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/vuegen_demo.ipynb b/docs/vuegen_demo.ipynb index a87f724..559b7cb 100644 --- a/docs/vuegen_demo.ipynb +++ b/docs/vuegen_demo.ipynb @@ -52,9 +52,7 @@ "outputs": [], "source": [ "# Load the YAML configuration file with the report metadata\n", - "config_path = \"example_data/MicW2Graph/report_config_micw2graph.yaml\"\n", - "report_config = load_yaml_config(config_path)\n", - "report_config" + "dir_path = \"example_data/MicW2Graph/\"" ] }, { @@ -65,19 +63,19 @@ "source": [ "# Define logger suffix based on report engine, type and name\n", "report_type = \"html\"\n", - "report_name = report_config['report'].get('name')\n", + "report_name = \"example_report\"\n", "\n", "# Initialize logger\n", "logger = get_logger(f\"{report_type}_report_{report_name}\")\n", "\n", "# Generate the report\n", - "report_generator.get_report(config_path = config_path, report_type = report_type, logger = logger)" + "report_generator.get_report(dir_path=dir_path, report_type=report_type, logger=logger)" ] } ], "metadata": { "kernelspec": { - "display_name": "vuegen", + "display_name": "Python 3", "language": "python", "name": "python3" },