Skip to content

Commit 458c6db

Browse files
authored
Merge branch 'main' into more_flexible_folder_structure
2 parents b9583ec + e59eec3 commit 458c6db

17 files changed

+918
-99
lines changed

.github/workflows/cdci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python package
1+
name: CICD Python Package
22

33
on:
44
push:

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test documentation building, and publish report to GitHub Pages
1+
name: Docs and Report Examples
22

33
on:
44
push:
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
test:
13-
name: Test
13+
name: Test docs and report examples
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:

CONTRIBUTING.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@ you to share any suggestions or observations you have about this project.
2727

2828
Here are the ways you can submit your suggestions and contribute to the project:
2929

30-
1. **Reporting Issues or Suggesting Improvements:** If you have a [GitHub][github] account
31-
(or are willing to [open one][github-join]) but are unfamiliar with Git, you can report
32-
bugs or suggest improvements by [creating an issue][new-issue]. This GitHub feature allows
33-
for discussion threads on reported issues and proposed enhancements.
30+
### 1. Reporting Issues or Suggesting Improvements
3431

35-
2. **Submitting Changes via Pull Requests:** If you are comfortable using Git and would like to
36-
add or modify a functionality, you can submit a **pull request (PR)**. Instructions on how to contribute this way are provided in the next section.
32+
If you have a [GitHub][github] account (or are willing to [open one][github-join]) but are unfamiliar with Git, you can report bugs or suggest improvements by [creating an issue][new-issue]. This GitHub feature allows for discussion threads on reported issues and proposed enhancements.
3733

38-
3. **Providing Feedback via Email:** If you don’t have a GitHub account and are
39-
unfamiliar with Git, you can send feedback via email to [[email protected]][contact]. However, using GitHub is preferred, as it allows us to respond more quickly and track discussions openly.
34+
### 2. Submitting Changes via Pull Requests
35+
36+
If you are comfortable using Git and would like to add or modify a functionality, you can submit a **pull request (PR)**. Instructions on how to contribute this way are provided in the next section.
37+
38+
### 3. Providing Feedback via Email
39+
40+
If you don’t have a GitHub account and are unfamiliar with Git, you can send feedback via email to [[email protected]][contact]. However, using GitHub is preferred, as it allows us to respond more quickly and track discussions openly.
4041

4142
> [!NOTE]
4243
> The documentation for [Git][git-docs] and [GitHub][github-docs] are easy to follow, and you can learn the basics using their official guides.

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| Information | Links |
88
| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
99
| **Package** | [![PyPI Latest Release](https://img.shields.io/pypi/v/vuegen.svg)][vuegen-pypi] [![Conda Latest Release](https://img.shields.io/conda/v/bioconda/vuegen.svg)][vuegen-conda] [![Supported versions](https://img.shields.io/pypi/pyversions/vuegen.svg)][vuegen-pypi] [![Docker Repository on Quay](https://quay.io/repository/dtu_biosustain_dsp/vuegen/status "Docker Repository on Quay")][vuegen-docker-quay] [![License](https://img.shields.io/github/license/Multiomics-Analytics-Group/vuegen)][vuegen-license] |
10-
| **Documentation** | [![made-with-sphinx-doc](https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg)](https://www.sphinx-doc.org/) ![Docs](https://readthedocs.org/projects/vuegen/badge/?style=flat) [![View - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=flat)][vuegen-docs] |
10+
| **Documentation** | [![View - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=flat)][vuegen-docs] [![made-with-sphinx-doc](https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg)](https://www.sphinx-doc.org/) ![Docs](https://readthedocs.org/projects/vuegen/badge/?style=flat) |
1111
| **Build** | [![CI](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml/badge.svg)][ci-gh-action] [![Docs](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml/badge.svg)][ci-docs] |
1212
| **Examples** | [![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)][emp-html-demo] [![Streamlit](https://img.shields.io/badge/Streamlit-%23FE4B4B.svg?style=for-the-badge&logo=streamlit&logoColor=white)][emp-st-demo] |
1313
| **Discuss on GitHub** | [![GitHub issues](https://img.shields.io/github/issues/Multiomics-Analytics-Group/vuegen)][issues] [![GitHub pull requests](https://img.shields.io/github/issues-pr/Multiomics-Analytics-Group/vuegen)][pulls] |
@@ -98,7 +98,7 @@ If you prefer not to install VueGen on your system, a pre-configured Docker cont
9898

9999
### Nextflow and nf-core
100100

101-
VueGen is also available as a [nf-core][nfcore] module, customised for compatibility with the [Nextflow][nextflow] environment. This module is designed to automate report generation from outputs produced by other modules, subworkflows, or pipelines. The code and documentation for the nf-core module are available in the [nf-VueGen repository][nf-vuegen].
101+
VueGen is also available as a [nf-core][nfcore] module, customised for compatibility with the [Nextflow][nextflow] environment. This module is designed to automate report generation from outputs produced by other modules, subworkflows, or pipelines. You can read the offical documentation for the nf-core module [here](nf-vuegen-nf-core). Also, the source code and detailed documentation are available in the [nf-VueGen repository][nf-vuegen].
102102

103103
## Execution
104104

@@ -238,7 +238,7 @@ More information regarding the app and builds can be found in the
238238

239239
VueGen’s functionality is demonstrated through two case studies:
240240

241-
**1. Predefined Directory**
241+
### 1. Predefined Directory
242242

243243
This introductory case study uses a predefined directory with plots, dataframes, Markdown, and HTML components. Users can generate reports in different formats and modify the configuration file to customize the report structure.
244244

@@ -247,7 +247,7 @@ This introductory case study uses a predefined directory with plots, dataframes,
247247
> [!NOTE]
248248
> The [configuration file][predef-dir-config] is available in the `docs/example_config_files` folder, and the [directory][predef-dir] with example data is in the `docs/example_data` folder.
249249
250-
**2. Earth Microbiome Project Data**
250+
### 2. Earth Microbiome Project Data
251251

252252
This advanced case study demonstrates the application of VueGen in a real-world scenario using data from the [Earth Microbiome Project (EMP)][emp]. The EMP is an initiative to characterize global microbial taxonomic and functional diversity. The notebook process the EMP data, create plots, dataframes, and other components, and organize outputs within a directory to produce reports. Report content and structure can be adapted by modifying the configuration file. Each report consists of sections on exploratory data analysis, metagenomics, and network analysis.
253253

@@ -257,10 +257,12 @@ This advanced case study demonstrates the application of VueGen in a real-world
257257
> The EMP case study is available online as [HTML][emp-html-demo] and [Streamlit][emp-st-demo] reports.
258258
> The [configuration file][emp-config] is available in the `docs/example_config_files` folder, and the [directory][emp-dir] with example data is in the `docs/example_data` folder.
259259
260-
**3. ChatBot Component**
260+
### 3. ChatBot Component
261+
262+
This case study highlights VueGen’s capability to embed a chatbot component into a report subsection,
263+
enabling interactive conversations inside the report. This component is streamlit-specific and is not
264+
available for other report types.
261265

262-
This case study highlights VueGen’s capability to embed a chatbot component into a report subsection,
263-
enabling interactive conversations inside the report.
264266

265267
Two API modes are supported:
266268

@@ -290,9 +292,17 @@ to support more flexible and general-purpose response formats in future releases
290292

291293
Once a Streamlit report is generated, it can be deployed as a web application to make it accessible online. There are multiple ways to achieve this:
292294

293-
- **Streamlit Community Cloud**: Deploy your report easily using [Streamlit Cloud][st-cloud], as demonstrated in the [EMP VueGen Demo][emp-st-demo]. The process involves moving the necessary scripts, data, and a requirements.txt file into a GitHub repository. Then, the app can be deployed via the Streamlit Cloud interface. The deployment example is available in the `streamlit-report-example` branch.
294-
- **Standalone Executables**: Convert your Streamlit application into a desktop app by packaging it as an executable file for different operating systems. A detailed explanation of this process can be found in this [Streamlit forum post][st-forum-exe].
295-
- **Stlite**: Run Streamlit apps directly in the browser with [stlite][stlite], a WebAssembly port of Streamlit powered by Pyodide, eliminating the need for a server. It also allows packaging apps as standalone desktop executables using stlite desktop.
295+
### Streamlit Community Cloud
296+
297+
Deploy your report easily using [Streamlit Cloud][st-cloud], as demonstrated in the [EMP VueGen Demo][emp-st-demo]. The process involves moving the necessary scripts, data, and a requirements.txt file into a GitHub repository. Then, the app can be deployed via the Streamlit Cloud interface. The deployment example is available in the `streamlit-report-example` branch.
298+
299+
### Standalone Executables
300+
301+
Convert your Streamlit application into a desktop app by packaging it as an executable file for different operating systems. A detailed explanation of this process can be found in this [Streamlit forum post][st-forum-exe].
302+
303+
### Stlite
304+
305+
Run Streamlit apps directly in the browser with [stlite][stlite_repo], a WebAssembly port of Streamlit powered by Pyodide, eliminating the need for a server. It also allows packaging apps as standalone desktop executables using stlite desktop.
296306

297307
These options provide flexibility depending on whether the goal is online accessibility, lightweight execution, or local application distribution.
298308

@@ -357,6 +367,7 @@ We appreciate your feedback! If you have any comments, suggestions, or run into
357367
[nfcore]: https://nf-co.re/
358368
[nextflow]: https://www.nextflow.io/
359369
[nf-vuegen]: https://github.com/Multiomics-Analytics-Group/nf-vuegen/
370+
[nf-vuegen-nf-core]: https://nf-co.re/modules/vuegen/
360371
[colab_badge]: https://colab.research.google.com/assets/colab-badge.svg
361372
[colab_link_intro_demo]: https://colab.research.google.com/github/Multiomics-Analytics-Group/vuegen/blob/main/docs/vuegen_basic_case_study.ipynb
362373
[predef-dir-config]: https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml
@@ -366,7 +377,7 @@ We appreciate your feedback! If you have any comments, suggestions, or run into
366377
[emp-config]: https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config
367378
[emp-dir]: https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Earth_microbiome_vuegen_demo_notebook
368379
[st-cloud]: https://streamlit.io/cloud
369-
[stlite]: https://github.com/whitphx/stlite
380+
[stlite_repo]: https://github.com/whitphx/stlite
370381
[st-forum-exe]: https://discuss.streamlit.io/t/streamlit-deployment-as-an-executable-file-exe-for-windows-macos-and-android/6812
371382
[Mona]: https://multiomics-analytics-group.github.io/
372383
[Biosustain]: https://www.biosustain.dtu.dk/

docs/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
In order to build the docs you need to
44

5-
1. install sphinx and additional support packages
6-
2. build the package reference files
7-
3. run sphinx to create a local html version
5+
1. Install sphinx and additional support packages
6+
2. Build the package reference files
7+
3. Run sphinx to create a local html version
88

99
The documentation is build using readthedocs automatically.
1010

@@ -31,7 +31,9 @@ sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../src/v
3131
sphinx-build -n -W --keep-going -b html ./ ./_build/
3232
```
3333

34-
## Include repo README.md into docs
34+
## Include repo README into docs
35+
36+
The README is included in the `Overview` section of the docs. We created a [Python script](https://github.com/Multiomics-Analytics-Group/vuegen/blob/split-readme-docs/docs/split_readme.py) to split the README sections into separate md files, stored in `docs/sections_readme`. The `index.md` file contains the structure of the docs with the generated sections and additional information.
3537

3638
Relative links are used in the main README, which need to be resolved when building. It's
3739
possible to include the a `relative-docs` option if one uses `index.md` ([see docs](https://myst-parser.readthedocs.io/en/latest/faq/index.html#include-a-file-from-outside-the-docs-folder-like-readme-md)). This does not work

docs/conf.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@
3838
"sphinx.ext.intersphinx",
3939
"sphinx_new_tab_link",
4040
"myst_nb",
41+
"sphinx_copybutton",
4142
]
4243

4344
# https://myst-nb.readthedocs.io/en/latest/computation/execute.html
4445
nb_execution_mode = "auto"
4546

46-
myst_enable_extensions = ["dollarmath", "amsmath"]
47+
myst_enable_extensions = ["dollarmath", "amsmath", "colon_fence"]
4748

4849
# Plolty support through require javascript library
4950
# https://myst-nb.readthedocs.io/en/latest/render/interactive.html#plotly
@@ -98,13 +99,13 @@
9899
# https://github.com/executablebooks/MyST-NB/blob/master/docs/conf.py
99100
# html_title = ""
100101
html_theme = "sphinx_book_theme"
101-
# html_logo = "_static/logo-wide.svg"
102-
# html_favicon = "_static/logo-square.svg"
102+
html_logo = "https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg"
103+
html_favicon = "https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg"
103104
html_theme_options = {
104105
"github_url": "https://github.com/Multiomics-Analytics-Group/vuegen",
105106
"repository_url": "https://github.com/Multiomics-Analytics-Group/vuegen",
106107
"repository_branch": "main",
107-
"home_page_in_toc": True,
108+
"home_page_in_toc": False,
108109
"path_to_docs": "docs",
109110
"show_navbar_depth": 1,
110111
"use_edit_page_button": True,
@@ -136,7 +137,16 @@
136137
PROJECT_ROOT = Path(__file__).parent.parent
137138
PACKAGE_ROOT = PROJECT_ROOT / "src" / "vuegen"
138139

140+
def run_split_readme(_):
141+
print("[conf.py] Splitting README.md into sections...")
142+
from split_readme import process_readme
143+
144+
readme_path = PROJECT_ROOT / "README.md"
145+
output_dir = PROJECT_ROOT / "docs" / "sections_readme"
146+
process_readme(readme_path, output_dir)
147+
139148
def run_apidoc(_):
149+
print("[conf.py] Running sphinx-apidoc...")
140150
from sphinx.ext import apidoc
141151

142152
apidoc.main(
@@ -154,4 +164,5 @@ def run_apidoc(_):
154164
)
155165

156166
def setup(app):
167+
app.connect("builder-inited", run_split_readme)
157168
app.connect("builder-inited", run_apidoc)

docs/example_report.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Vuegen Case Study - View HTML Report
1+
# Earth Microbiome Project Case Study - HTML and Streamlit Example Reports
22

3-
The stable version of the current `html` report generated in the example notebook
4-
using `vuegen` can be viewed at
5-
6-
[multiomics-analytics-group.github.io/vuegen/](https://multiomics-analytics-group.github.io/vuegen/)
3+
The Earth Microbiome Project case study generated in the example notebook using `vuegen` is available online as [HTML](https://multiomics-analytics-group.github.io/vuegen/) and [Streamlit](https://earth-microbiome-vuegen-demo.streamlit.app/) reports.
-3.4 MB
Loading

docs/index.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
# Overview
2-
31
<!-- https://myst-parser.readthedocs.io/en/latest/faq/index.html
42
#include-a-file-from-outside-the-docs-folder-like-readme-md -->
53

6-
```{include} ../README.md
7-
:start-line: 0
4+
```{include} ./sections_readme/home_page.md
5+
:caption: VueGen
86
:relative-docs: docs
97
:relative-images:
108
```
119

10+
```{toctree}
11+
:maxdepth: 1
12+
:caption: Overview
13+
14+
sections_readme/about
15+
sections_readme/installation
16+
sections_readme/execution
17+
sections_readme/gui
18+
sections_readme/case_studies
19+
sections_readme/web_app_deploy
20+
sections_readme/contributing
21+
sections_readme/citation
22+
sections_readme/credits
23+
sections_readme/contact
24+
```
25+
1226
```{toctree}
1327
:maxdepth: 2
1428
@@ -20,8 +34,12 @@ vuegen_demo
2034
:caption: Building a report
2135
2236
vuegen_basic_case_study
37+
vuegen_basic_case_study_configfile
2338
vuegen_case_study_earth_microbiome
39+
vuegen_case_study_earth_microbiome_configfile
2440
example_report
41+
vuegen_APICall_configfile
42+
vuegen_Chatbot_configfile
2543
```
2644

2745
```{toctree}

0 commit comments

Comments
 (0)