Skip to content

Commit bd0cb88

Browse files
committed
More efficient gui spec and new publish
1 parent 92b898b commit bd0cb88

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ jobs:
2929
uses: actions/setup-python@v5
3030
with:
3131
python-version: "3.11"
32-
- name: Install dependencies
32+
- name: Install build tooling
3333
run: |
3434
python -m pip install --upgrade pip
3535
python -m pip install --upgrade build
3636
3737
- name: Build source and wheel
38-
run: |
39-
python -m build
38+
run: python -m build
4039

4140
- name: Upload build artifacts
4241
uses: actions/upload-artifact@v4
@@ -62,31 +61,20 @@ jobs:
6261
with:
6362
python-version: "3.11"
6463

65-
- name: Install dependencies
64+
- name: Install dependencies for building EXE
6665
run: |
6766
python -m pip install --upgrade pip
68-
pip install --only-binary :all: . pyinstaller pillow requests
67+
pip install --only-binary :all: .[gui] pyinstaller
6968
7069
- name: Build Windows EXE with PyInstaller
71-
working-directory: ./ideeplc
72-
run: |
73-
pyinstaller gui.spec --noconfirm
74-
# working-directory: ${{ github.workspace }}
70+
run: pyinstaller ideeplc/gui.spec --noconfirm
7571

7672
- name: Upload EXE to artifact
7773
uses: actions/upload-artifact@v4
7874
with:
7975
name: iDeepLC-gui
8076
path: dist/*.exe
8177

82-
- name: Upload EXE to GitHub Release
83-
uses: svenstaro/upload-release-action@v2
84-
with:
85-
repo_token: ${{ secrets.GITHUB_TOKEN }}
86-
tag: ${{ github.ref }}
87-
file: dist/*.exe
88-
file_glob: true
89-
9078
- name: Upload EXE to GitHub Release page
9179
uses: softprops/action-gh-release@v1
9280
with:

ideeplc/gui.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ app_name = f"iDeepLC_{version}"
1717
script_path = "gui.py"
1818
icon_path = str(project_root / "ideeplc" / "logo" / "ideeplc.ico")
1919

20-
packages = ["PIL", "requests", "torch", "ideeplc", "lxml", "pyteomics", "tqdm"]
20+
packages = ["ideeplc"]
2121
hiddenimports = set()
2222
datas, binaries = [], []
2323

ideeplc/utilities.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import numpy as np
55
import pandas as pd
6-
import tqdm
76
from numpy import ndarray
87
from pyteomics import proforma, mass
98
from importlib.resources import files
@@ -316,7 +315,7 @@ def df_to_matrix(
316315
aa_to_feature = aa_chemical_feature()
317316
amino_acids_atoms = aa_atomic_composition_array()
318317

319-
for idx, peptide in tqdm.tqdm(enumerate(seqs), total=len(seqs)):
318+
for idx, peptide in enumerate(seqs):
320319
try:
321320
parsed_sequence, modifiers, sequence, modifications = peptide_parser(
322321
peptide

pyproject.toml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,26 @@ classifiers = [
1919
"Development Status :: 5 - Production/Stable",
2020
]
2121
dynamic = ["version"]
22-
requires-python = ">=3.7"
22+
requires-python = ">=3.8"
2323
dependencies = [
2424
"matplotlib>=3.7,<4",
2525
"numpy>=1.25,<2",
2626
"pandas>=2,<3",
2727
"pyteomics>=4.5,<5",
28-
"seaborn>=0.13,<1",
2928
"torch>=2.2.1,<3",
3029
"scikit-learn>=1.4,<2",
31-
"tqdm>=4.65,<5",
3230
"rich>=13",
3331
"lxml>=4.9,<5",
3432
]
3533

3634
[project.optional-dependencies]
35+
36+
gui = [
37+
"pillow>=9.5",
38+
"requests>=2.31",
39+
]
40+
41+
3742
dev = [
3843
"pytest",
3944
"pytest-cov",
@@ -42,6 +47,12 @@ dev = [
4247
"flake8"
4348
]
4449

50+
[tool.setuptools.package-data]
51+
ideeplc = [
52+
"models/*.pth",
53+
"structure_feature/*.csv",
54+
]
55+
4556
[build-system]
4657
requires = ["setuptools"]
4758
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)