Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 10 additions & 8 deletions .github/workflows/cdci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]
release:
types: [published]

jobs:
test:
name: Unittests+streamlit
Expand All @@ -17,14 +17,16 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
- uses: psf/black@stable
# with:
# jupyter: true
- uses: isort/isort-action@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
cache-dependency-path: '**/pyproject.toml'
cache: "pip" # caching pip dependencies
cache-dependency-path: "**/pyproject.toml"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -37,7 +39,7 @@ jobs:
cd docs
vuegen --directory example_data/Earth_microbiome_vuegen_demo_notebook
vuegen --config example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml

other-reports:
name: Integration tests
runs-on: ubuntu-latest
Expand All @@ -50,8 +52,8 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
cache-dependency-path: '**/pyproject.toml'
cache: "pip" # caching pip dependencies
cache-dependency-path: "**/pyproject.toml"
- name: Install dependencies
run: |
pip install --upgrade pip
Expand Down Expand Up @@ -110,7 +112,7 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"
Expand Down
77 changes: 52 additions & 25 deletions docs/vuegen_basic_case_study.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"outputs": [],
"source": [
"# Vuegen library \n",
"# Vuegen library\n",
"%pip install vuegen"
]
},
Expand All @@ -78,6 +78,7 @@
"outputs": [],
"source": [
"import os\n",
"\n",
"IN_COLAB = \"COLAB_GPU\" in os.environ"
]
},
Expand Down Expand Up @@ -164,7 +165,9 @@
"source": [
"# Generate the report\n",
"report_type = \"streamlit\"\n",
"report_generator.get_report(dir_path = base_output_dir, report_type = report_type, logger = None)"
"report_generator.get_report(\n",
" dir_path=base_output_dir, report_type=report_type, logger=None\n",
")"
]
},
{
Expand All @@ -185,14 +188,20 @@
"# run_streamlit = True # uncomment line to run the streamlit report\n",
"# Launch the Streamlit report depneding on the platform\n",
"if not IN_COLAB and run_streamlit:\n",
" !streamlit run streamlit_report/sections/report_manager.py\n",
" !streamlit run streamlit_report/sections/report_manager.py\n",
"elif run_streamlit:\n",
" # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n",
" print(\"Password/Enpoint IP for localtunnel is:\",urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
" # Run the Streamlit app in the background\n",
" !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n",
" # Expose the Streamlit app on port 8501\n",
" !npx localtunnel --port 8501 --subdomain vuegen-demo\n",
" # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n",
" print(\n",
" \"Password/Enpoint IP for localtunnel is:\",\n",
" urllib.request.urlopen(\"https://ipv4.icanhazip.com\")\n",
" .read()\n",
" .decode(\"utf8\")\n",
" .strip(\"\\n\"),\n",
" )\n",
" # Run the Streamlit app in the background\n",
" !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n",
" # Expose the Streamlit app on port 8501\n",
" !npx localtunnel --port 8501 --subdomain vuegen-demo\n",
"else:\n",
" print(\"Streamlit report not executed, set run_streamlit to True to run the report\")"
]
Expand All @@ -212,7 +221,9 @@
"source": [
"# Generate the report\n",
"report_type = \"html\"\n",
"report_generator.get_report(dir_path = base_output_dir, report_type = report_type, logger = None)"
"report_generator.get_report(\n",
" dir_path=base_output_dir, report_type=report_type, logger=None\n",
")"
]
},
{
Expand All @@ -239,11 +250,15 @@
"vuegen_logo_path = \"https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg\"\n",
"\n",
"# Load the YAML file\n",
"config_path = os.path.join(base_output_dir, \"Basic_example_vuegen_demo_notebook_config.yaml\")\n",
"config_path = os.path.join(\n",
" base_output_dir, \"Basic_example_vuegen_demo_notebook_config.yaml\"\n",
")\n",
"config = load_yaml_config(config_path)\n",
"\n",
"# Update the logo and graphical abstract with the URL\n",
"config[\"report\"].update({\"logo\": vuegen_logo_path, \"graphical_abstract\": vuegen_logo_path})"
"config[\"report\"].update(\n",
" {\"logo\": vuegen_logo_path, \"graphical_abstract\": vuegen_logo_path}\n",
")"
]
},
{
Expand All @@ -261,15 +276,17 @@
"source": [
"# Update the description for the EDA section\n",
"for section in config[\"sections\"]:\n",
" if section[\"title\"] == \"Plots\": \n",
" if section[\"title\"] == \"Plots\":\n",
" section[\"description\"] = \"This section contains example plots\"\n",
"\n",
"# Update the description for the alpha diversity subsection from the Metagenomics section\n",
"for section in config[\"sections\"]:\n",
" if section[\"title\"] == \"Dataframes\":\n",
" for subsection in section[\"subsections\"]:\n",
" if subsection[\"title\"] == \"All Formats\":\n",
" subsection[\"description\"] = \"This subsection contains example dataframes.\"\n"
" subsection[\"description\"] = (\n",
" \"This subsection contains example dataframes.\"\n",
" )"
]
},
{
Expand All @@ -288,11 +305,11 @@
"# Define new plot with a URL as the file path\n",
"vuegen_abst_fig = {\n",
" \"title\": \"Graphical overview of VueGen’s workflow and components\",\n",
" \"file_path\": \"https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_graph_abstract.png\", \n",
" \"file_path\": \"https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_graph_abstract.png\",\n",
" \"description\": \"\",\n",
" \"caption\": \"The diagram illustrates the processing pipeline of VueGen, starting from either a directory or a YAML configuration file. Reports consist of hierarchical sections and subsections, each containing various components such as plots, dataframes, Markdown, HTML, and data retrieved via API calls.\",\n",
" \"component_type\": \"plot\",\n",
" \"plot_type\": \"static\"\n",
" \"plot_type\": \"static\",\n",
"}\n",
"\n",
"# Add the plot to the Sample Provenance subsection in the EDA section\n",
Expand Down Expand Up @@ -324,7 +341,9 @@
"source": [
"# Test the changes by generarating the report from the modified YAML file\n",
"report_type = \"streamlit\"\n",
"report_generator.get_report(config_path = config_path, report_type = report_type, logger = None)"
"report_generator.get_report(\n",
" config_path=config_path, report_type=report_type, logger=None\n",
")"
]
},
{
Expand All @@ -337,14 +356,20 @@
"# run_streamlit = True # uncomment line to run the streamlit report\n",
"# Launch the Streamlit report depneding on the platform\n",
"if not IN_COLAB and run_streamlit:\n",
" !streamlit run streamlit_report/sections/report_manager.py\n",
" !streamlit run streamlit_report/sections/report_manager.py\n",
"elif run_streamlit:\n",
" # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n",
" print(\"Password/Enpoint IP for localtunnel is:\",urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
" # Run the Streamlit app in the background\n",
" !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n",
" # Expose the Streamlit app on port 8501\n",
" !npx localtunnel --port 8501 --subdomain vuegen-demo\n",
" # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n",
" print(\n",
" \"Password/Enpoint IP for localtunnel is:\",\n",
" urllib.request.urlopen(\"https://ipv4.icanhazip.com\")\n",
" .read()\n",
" .decode(\"utf8\")\n",
" .strip(\"\\n\"),\n",
" )\n",
" # Run the Streamlit app in the background\n",
" !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n",
" # Expose the Streamlit app on port 8501\n",
" !npx localtunnel --port 8501 --subdomain vuegen-demo\n",
"else:\n",
" print(\"Streamlit report not executed, set run_streamlit to True to run the report\")"
]
Expand All @@ -364,7 +389,9 @@
"source": [
"# Test the changes by generarating the report from the modified YAML file\n",
"report_type = \"html\"\n",
"report_generator.get_report(config_path = config_path, report_type = report_type, logger = None)"
"report_generator.get_report(\n",
" config_path=config_path, report_type=report_type, logger=None\n",
")"
]
}
],
Expand Down
Loading