Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
51 changes: 50 additions & 1 deletion .github/workflows/build-windows-executable-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ jobs:
# https://github.com/actions/runner-images/blob/main/images/win/scripts/Installers/Install-GitHub-CLI.ps1
echo "C:/Program Files (x86)/GitHub CLI" >> $GITHUB_PATH

- name: Set up Python for pyOpenMS build
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install pyOpenMS build dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel "cython>=3.0.0" "autowrap>=0.24" "numpy>=1.24.0" pandas pytest
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Numpy version constraint inconsistent with requirements.txt.

Build dependencies specify numpy>=1.24.0 but requirements.txt requires numpy>=2.0.0. This inconsistency could lead to wheel compatibility issues if the build uses numpy 1.x while runtime expects 2.x.

🔧 Suggested fix to align versions
-        pip install setuptools wheel "cython>=3.0.0" "autowrap>=0.24" "numpy>=1.24.0" pandas pytest
+        pip install setuptools wheel "cython>=3.0.0" "autowrap>=0.24" "numpy>=2.0.0" pandas pytest
🤖 Prompt for AI Agents
In @.github/workflows/build-windows-executable-app.yaml around lines 65 - 68,
The CI step named "Install pyOpenMS build dependencies" installs pip packages
with "numpy>=1.24.0" which conflicts with requirements.txt's "numpy>=2.0.0";
update the pip install line in that workflow step to use "numpy>=2.0.0" (and
ensure any other occurrences in the workflow match requirements.txt) so
build-time numpy matches runtime expectations.


- name: Extract branch/PR infos
shell: bash
run: |
Expand Down Expand Up @@ -139,11 +149,17 @@ jobs:
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
WITH_GUI: "OFF"
WITH_PARQUET: "OFF"
WITH_PARQUET: "ON"
ADDRESS_SANITIZER: "Off"
BUILD_TYPE: "Release"
OPENMP: "Off"
USE_STATIC_BOOST: "On"
# pyOpenMS build settings
PYOPENMS: "ON"
PY_NUM_THREADS: "2"
PY_MEMLEAK_DISABLE: "On"
PY_NO_OPTIMIZATION: "ON"
Python_ROOT_DIR: "${{ runner.tool_cache }}/Python/${{ env.PYTHON_VERSION }}/x64"
# BUILD_FLAGS: "-p:CL_MPCount=2" # For VS Generator and MSBuild
BUILD_FLAGS: "-j2" # Ninja will otherwise use all cores (doesn't go well in GHA)
CMAKE_CCACHE_EXE: "ccache"
Expand All @@ -161,6 +177,21 @@ jobs:
CI_PROVIDER: "GitHub-Actions"
BUILD_NAME: "${{ env.RUN_NAME }}-Win64-class-topp-${{ github.run_number }}"

- name: Build pyOpenMS
shell: bash
run: |
cd $GITHUB_WORKSPACE/OpenMS/bld
cmake --build . --target pyopenms --config Release -- -j2

- name: Test pyOpenMS
shell: bash
run: |
cd $GITHUB_WORKSPACE/OpenMS/bld/pyOpenMS
pip install dist/*.whl
python -c "import pyopenms; print(f'pyOpenMS version: {pyopenms.__version__}')"
# Run basic tests (skip tutorial tests which may require additional data)
pytest tests/ -v --ignore=tests/test_tutorial.py -x -q 2>&1 | head -100 || true
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

- name: Package
shell: bash
run: |
Expand All @@ -178,6 +209,12 @@ jobs:
name: openms-package
path: ${{ github.workspace }}/OpenMS/bld/*.zip

- name: Upload pyOpenMS wheel as artifact
uses: actions/upload-artifact@v4
with:
name: pyopenms-wheel
path: ${{ github.workspace }}/OpenMS/bld/pyOpenMS/dist/*.whl

build-executable:
runs-on: windows-2022
needs: build-openms
Expand All @@ -199,6 +236,12 @@ jobs:
name: openms-package
path: openms-package

- name: Download pyOpenMS wheel
uses: actions/download-artifact@v4
with:
name: pyopenms-wheel
path: pyopenms-wheel

- name: Extract bin and share from package
run: |
cd openms-package
Expand Down Expand Up @@ -248,6 +291,12 @@ jobs:
- name: Install Required Packages
run: .\python-${{ env.PYTHON_VERSION }}\python -m pip install --force-reinstall -r requirements.txt --no-warn-script-location

- name: Install locally built pyOpenMS wheel
run: |
$wheel = Get-ChildItem -Path pyopenms-wheel -Filter "*.whl" | Select-Object -First 1
Write-Host "Installing pyOpenMS wheel: $($wheel.FullName)"
.\python-${{ env.PYTHON_VERSION }}\python -m pip install $wheel.FullName --no-warn-script-location

Comment on lines +298 to +303
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fail fast when the wheel artifact is missing.

If no wheel exists, $wheel.FullName becomes empty and pip install fails with a confusing error. Consider an explicit guard.

🔧 Suggested fix
     - name: Install locally built pyOpenMS wheel
       run: |
         $wheel = Get-ChildItem -Path pyopenms-wheel -Filter "*.whl" | Select-Object -First 1
+        if (-not $wheel) { throw "pyOpenMS wheel not found in pyopenms-wheel/" }
         Write-Host "Installing pyOpenMS wheel: $($wheel.FullName)"
         .\python-${{ env.PYTHON_VERSION }}\python -m pip install $wheel.FullName --no-warn-script-location
🤖 Prompt for AI Agents
In @.github/workflows/build-windows-executable-app.yaml around lines 297 - 302,
The "Install locally built pyOpenMS wheel" step can attempt to install when no
wheel was found, producing a confusing pip error; add an explicit guard after
selecting $wheel (the result of Get-ChildItem | Select-Object -First 1) that
checks for null/empty and fails fast with a clear message (e.g.,
Write-Error/Write-Host then exit 1) so the job stops with a meaningful error
instead of passing an empty path to .\python-... -m pip install; ensure the
guard references the $wheel variable used later.

- name: Set to offline deployment
run: |
$content = Get-Content -Raw settings.json | ConvertFrom-Json
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ To run the app locally:
```

2. **Install dependencies**

Make sure you can run ```pip``` commands.

Install all dependencies with:
```bash
pip install -r requirements.txt
pip install pyopenms
```

> ℹ️ **Note:** `pyopenms` is not included in `requirements.txt` because it is built from source for Docker and Windows executable distributions. For local development, install it separately via pip as shown above.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
4. **Launch the app**
```bash
streamlit run app.py
Expand Down
6 changes: 1 addition & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ kiwisolver==1.4.8
markupsafe==3.0.2
# via jinja2
matplotlib==3.10.1
# via pyopenms
# via src (pyproject.toml)
narwhals==2.5.0
# via altair
numpy==1.26.4
Expand All @@ -56,7 +56,6 @@ numpy==1.26.4
# matplotlib
# pandas
# pydeck
# pyopenms
# src (pyproject.toml)
# streamlit
packaging==25.0
Expand All @@ -67,7 +66,6 @@ packaging==25.0
# streamlit
pandas==2.2.3
# via
# pyopenms
# pyopenms-viz
# streamlit
pillow==11.1.0
Expand All @@ -85,8 +83,6 @@ pyarrow==19.0.1
# via streamlit
pydeck==0.9.1
# via streamlit
pyopenms==3.3.0
# via src (pyproject.toml)
pyopenms-viz==1.0.0
# via src (pyproject.toml)
pyparsing==3.2.3
Expand Down
Loading