Skip to content

Commit 5407855

Browse files
authored
Merge pull request #241 from CompOmics/update-im2deep-version
update im2deep version, fix docstring
2 parents b5b1948 + d1c8362 commit 5407855

File tree

6 files changed

+152
-44
lines changed

6 files changed

+152
-44
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,22 @@ jobs:
4444
steps:
4545
- uses: actions/checkout@v4
4646

47-
- uses: actions/setup-python@v5
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@v6
4849
with:
4950
python-version: "3.11"
51+
enable-cache: true
5052

5153
- name: Install package and dependencies
52-
run: |
53-
# Using pip to ensure proper environment discovery by PyInstaller
54-
python -m pip install --upgrade pip
55-
pip install --only-binary :all: .[ionmob] pyinstaller
54+
run: uv sync --group installer
5655

5756
- name: Install Inno Setup
5857
uses: crazy-max/ghaction-chocolatey@v3
5958
with:
60-
args: install innosetup -y --allow-unofficial --force
59+
args: install innosetup -y --allow-unofficial
6160

6261
- name: Run pyinstaller
63-
run: pyinstaller ./ms2rescore.spec --clean --noconfirm
62+
run: uv run pyinstaller ./ms2rescore.spec --clean --noconfirm
6463

6564
- name: Test built exe
6665
run: dist/ms2rescore/ms2rescore.exe

.github/workflows/test.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,35 +45,32 @@ jobs:
4545
run: uv run ms2rescore --help
4646

4747
test-windows-installer:
48-
# Only run on push to main (e.g., after PR merge)
49-
if: ${{ github.ref == 'refs/heads/main' }}
5048
runs-on: windows-latest
5149
steps:
5250
- uses: actions/checkout@v4
5351

54-
- uses: actions/setup-python@v5
52+
- name: Install uv
53+
uses: astral-sh/setup-uv@v6
5554
with:
56-
python-version: "3.12"
55+
python-version: "3.11"
56+
enable-cache: true
5757

5858
- name: Install package and dependencies
59-
run: |
60-
# Using pip to ensure proper environment discovery by PyInstaller
61-
python -m pip install --upgrade pip
62-
pip install --only-binary :all: .[ionmob,idxml] pyinstaller
59+
run: uv sync --group installer
6360

6461
- name: Install Inno Setup
6562
uses: crazy-max/ghaction-chocolatey@v1
6663
with:
67-
args: install innosetup -y --allow-unofficial --force
64+
args: install innosetup -y --allow-unofficial
6865

6966
- name: Run pyinstaller
70-
run: pyinstaller ./ms2rescore.spec --clean --noconfirm
67+
run: uv run pyinstaller ./ms2rescore.spec --clean --noconfirm
7168

7269
- name: Test built exe
7370
run: dist/ms2rescore/ms2rescore.exe
7471

7572
- name: Run Inno Setup
76-
run: ISCC.exe ./ms2rescore_innosetup.iss /DAppVersion=${{ github.ref_name }}
73+
run: ISCC.exe ./ms2rescore_innosetup.iss /DAppVersion=test-build
7774

7875
- name: Upload artifact
7976
uses: actions/upload-artifact@v4

ms2rescore.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ while requirements:
4646
module_version = importlib.metadata.version(re.match(r"^[\w\-]+", requirement)[0])
4747
try:
4848
datas_, binaries_, hidden_imports_ = collect_all(requirement, include_py_files=True)
49-
except ImportError:
49+
except (ImportError, RuntimeError) as e:
50+
# Skip packages that fail to collect (e.g., xgboost.testing requires hypothesis)
51+
print(f"Warning: Failed to collect {requirement}: {e}")
5052
continue
5153
datas += datas_
5254
hidden_imports_ = set(hidden_imports_)

ms2rescore/feature_generators/im2deep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def make_calibration_df(psm_list_df: pd.DataFrame, threshold: float = 0.25) -> p
150150
DataFrame with PSMs.
151151
threshold
152152
Percentage of highest scoring identified target PSMs to use for calibration,
153-
default 0.95.
153+
default 0.25.
154154
155155
Returns
156156
-------

pyproject.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ authors = [
1919
{ name = "Ralf Gabriels", email = "[email protected]" },
2020
{ name = "Arthur Declercq", email = "[email protected]" },
2121
{ name = "Ana Sílvia C. Silva" },
22+
{ name = "Robbe Devreese" },
2223
{ name = "Robbin Bouwmeester" },
2324
{ name = "Louise Buur" },
2425
]
@@ -37,12 +38,12 @@ dependencies = [
3738
"customtkinter>=5,<6",
3839
"deeplc>=3.1",
3940
"deeplcretrainer",
40-
"im2deep>=0.3.1",
41+
"im2deep>=1.1",
4142
"jinja2>=3",
4243
"lxml>=4.5",
4344
"mokapot==0.10", # 0.11.0 will introduce API changes
4445
"ms2pip>=4.0.0",
45-
"ms2rescore_rs>=0.4.3",
46+
"ms2rescore_rs>=0.4",
4647
"numpy>=1.25",
4748
"packaging>=25.0",
4849
"pandas>=1",
@@ -71,6 +72,14 @@ docs = [
7172
"sphinx-autobuild",
7273
"toml",
7374
]
75+
installer = [
76+
# Pinned dependencies for reproducible Windows installer builds
77+
"pyinstaller",
78+
"pyopenms==3.3",
79+
"ionmob>=0.2",
80+
"tensorflow",
81+
"im2deep==1.1.1",
82+
]
7483

7584
[project.urls]
7685
GitHub = "https://github.com/compomics/ms2rescore"

0 commit comments

Comments
 (0)