Skip to content

Commit 58c99d4

Browse files
authored
Merge branch 'main' into test_all_os
2 parents a30b9da + 60f3ecf commit 58c99d4

File tree

70 files changed

+10924
-3092
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+10924
-3092
lines changed

.github/workflows/cdci.yml

Lines changed: 57 additions & 4 deletions
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:
@@ -7,6 +7,7 @@ on:
77
branches: [main]
88
release:
99
types: [published]
10+
workflow_dispatch:
1011

1112
jobs:
1213
test:
@@ -20,17 +21,25 @@ jobs:
2021
- uses: actions/checkout@v4
2122
- uses: psf/black@stable
2223
with:
23-
jupyter: true
24+
# ! for now (format output files of vuegen for streamlit)
25+
src: "./src"
2426
- uses: isort/isort-action@v1
27+
with:
28+
# ! should be removed once all imports are correctly sorted
29+
sort-paths: src
2530
- name: Set up Python ${{ matrix.python-version }}
2631
uses: actions/setup-python@v5
2732
with:
2833
python-version: ${{ matrix.python-version }}
2934
cache: "pip" # caching pip dependencies
3035
cache-dependency-path: "**/pyproject.toml"
31-
- name: Install dependencies
36+
- name: lint package code with ruff
3237
run: |
3338
python -m pip install --upgrade pip
39+
pip install ruff
40+
ruff check src
41+
- name: Install dependencies for testing
42+
run: |
3443
pip install pytest
3544
pip install -e .
3645
- name: Run tests
@@ -64,6 +73,7 @@ jobs:
6473
run: |
6574
cd docs
6675
vuegen -dir example_data/Earth_microbiome_vuegen_demo_notebook
76+
# here we are testing that the generated config from the -dir call works
6777
vuegen -c example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml
6878
# repeat for easier inspection on GitHub:
6979
- name: quarto html report
@@ -101,6 +111,44 @@ jobs:
101111
cd docs
102112
vuegen -dir example_data/Earth_microbiome_vuegen_demo_notebook -rt jupyter
103113
vuegen -c example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml -rt jupyter
114+
- name: quarto html report based on predefined config file
115+
run: |
116+
cd docs
117+
vuegen -c example_config_files/Basic_example_vuegen_demo_notebook_config.yaml -output_dir ../tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html -rt html
118+
# Check for changes
119+
if git diff ../tests/report_examples | grep .; then
120+
echo "Error: One or more protected files have been modified."
121+
exit 1
122+
fi
123+
- name: check streamlit report files for chatbot API
124+
run: |
125+
vuegen -c docs/example_config_files/Chatbot_example_config.yaml -output_dir tests/report_examples/chat_bot
126+
if git diff tests/report_examples | grep .; then
127+
echo Failed for report: $format
128+
echo "Error: One or more protected files have been modified."
129+
exit 1
130+
fi
131+
- name: check for changes in report files
132+
run: |
133+
# write streamlit report to test folder
134+
vuegen -dir docs/example_data/Basic_example_vuegen_demo_notebook -output_dir tests/report_examples/Basic_example_vuegen_demo_notebook
135+
# Check for changes
136+
if git diff tests/report_examples | grep .; then
137+
echo "Error: One or more protected files have been modified."
138+
exit 1
139+
fi
140+
- name: check for changes in quarto report files
141+
run: |
142+
# write quarto based report to test folder
143+
for format in html pdf docx odt revealjs pptx jupyter; do
144+
vuegen -dir docs/example_data/Basic_example_vuegen_demo_notebook -output_dir tests/report_examples/Basic_example_vuegen_demo_notebook/$format -rt $format
145+
# Check for changes
146+
if git diff tests/report_examples | grep .; then
147+
echo Failed for report: $format
148+
echo "Error: One or more protected files have been modified."
149+
exit 1
150+
fi
151+
done
104152
105153
publish:
106154
name: Publish package to PyPI
@@ -128,6 +176,11 @@ jobs:
128176
build-executable:
129177
name: Build-exe-${{ matrix.os.label }}
130178
runs-on: ${{ matrix.os.runner }}
179+
if: |
180+
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
181+
github.event_name == 'release' ||
182+
startsWith(github.ref, 'refs/tags') ||
183+
github.event_name == 'workflow_dispatch'
131184
needs:
132185
- test
133186
- other-reports
@@ -157,7 +210,7 @@ jobs:
157210
- name: Build executable
158211
run: |
159212
cd gui
160-
pyinstaller -n vuegen_gui --onefile --windowed --collect-all pyvis --collect-all streamlit --collect-all st_aggrid --collect-all customtkinter --collect-all quarto_cli --collect-all plotly --collect-all _plotly_utils --collect-all traitlets --collect-all referencing --collect-all rpds --collect-all tenacity --collect-all pyvis --collect-all pandas --collect-all numpy --collect-all matplotlib --collect-all openpyxl --collect-all xlrd --collect-all nbformat --collect-all nbclient --collect-all altair --collect-all itables --collect-all kaleido --collect-all pyarrow --collect-all dataframe_image --collect-all narwhals --collect-all PIL --collect-all vl_convert --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook --add-data ../docs/images/vuegen_logo.png:. app.py
213+
pyinstaller -n vuegen_gui --onefile --windowed --collect-all pyvis --collect-all streamlit --collect-all st_aggrid --collect-all customtkinter --collect-all quarto_cli --collect-all plotly --collect-all _plotly_utils --collect-all traitlets --collect-all referencing --collect-all rpds --collect-all tenacity --collect-all pandas --collect-all numpy --collect-all matplotlib --collect-all openpyxl --collect-all xlrd --collect-all nbformat --collect-all nbclient --collect-all altair --collect-all itables --collect-all kaleido --collect-all pyarrow --collect-all dataframe_image --collect-all narwhals --collect-all PIL --collect-all vl_convert --collect-all typing-extensions --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook --add-data ../docs/images/vuegen_logo.png:. app.py
161214
# --windowed only for mac, see:
162215
# https://pyinstaller.org/en/stable/usage.html#building-macos-app-bundles
163216
# 'Under macOS, PyInstaller always builds a UNIX executable in dist.'

.github/workflows/docs.yml

Lines changed: 15 additions & 15 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:
@@ -7,10 +7,10 @@ on:
77
branches: [main]
88
release:
99
types: [published]
10-
10+
1111
jobs:
1212
test:
13-
name: Test
13+
name: Test docs and report examples
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
@@ -21,24 +21,24 @@ jobs:
2121
uses: actions/setup-python@v5
2222
with:
2323
python-version: ${{ matrix.python-version }}
24-
cache: 'pip' # caching pip dependencies
25-
cache-dependency-path: '**/pyproject.toml'
24+
cache: "pip" # caching pip dependencies
25+
cache-dependency-path: "**/pyproject.toml"
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install -e .[docs]
29+
pip install .[docs]
3030
- name: Build references
3131
run: |
32-
cd docs
33-
sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../src/vuegen
32+
cd docs
33+
sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../src/vuegen
3434
- name: Build documentation
3535
run: |
36-
cd docs
37-
sphinx-build -n --keep-going -b html ./ ./_build/
36+
cd docs
37+
sphinx-build -n --keep-going -b html ./ ./_build/
3838
# --- HTML example deployment ---
3939
- name: Rename entry point of report to index.html
4040
run: |
41-
mv docs/quarto_report/quarto_report.html docs/quarto_report/index.html
41+
mv docs/quarto_report/quarto_report.html docs/quarto_report/index.html
4242
- name: Publish HTML report to GitHub Pages (gh-pages branch)
4343
# Only publish a new static report upon a new release -> can be changed.
4444
if: startsWith(github.ref, 'refs/tags')
@@ -53,13 +53,13 @@ jobs:
5353
# path: docs/_build/
5454

5555
# --- Streamlit example deployment ---
56-
- name: Fix Absolute Paths in Streamlit Scripts
57-
run: |
58-
find docs/streamlit_report/sections -type f -name "*.py" -exec sed -i 's|/home/runner/work/vuegen/vuegen/docs/||g' {} +
56+
#- name: Fix Absolute Paths in Streamlit Scripts
57+
# run: |
58+
# find docs/streamlit_report/sections -type f -name "*.py" -exec sed -i 's|/home/runner/work/vuegen/vuegen/docs/||g' {} +
5959
- name: Publish Streamlit report to streamlit-example branch
6060
if: startsWith(github.ref, 'refs/tags')
6161
uses: peaceiris/actions-gh-pages@v4
6262
with:
6363
github_token: ${{ secrets.GITHUB_TOKEN }}
6464
publish_dir: docs/
65-
publish_branch: streamlit-report-example
65+
publish_branch: streamlit-report-example

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ cython_debug/
117117
logs/
118118
vuegen/logs/
119119
streamlit_report/
120+
!tests/report_examples
120121
quarto_report/
121122
output_docker/
122123

@@ -128,6 +129,5 @@ docs/images/UML_diagrams/
128129
docs/images/Graphical_abstract/
129130
docs/images/Nfcore_module_figure
130131
docs/presentations/
131-
docs/example_data/Earth_microbiome_vuegen_demo_notebook_test/
132-
docs/vuegen_case_study_earth_microbiome_test.ipynb
133-
test.py
132+
basic_example_vuegen_demo_notebook_config.yaml
133+
earth_microbiome_vuegen_demo_notebook_config.yaml

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.rulers": [88, 100, 120]
3+
}

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.

0 commit comments

Comments
 (0)