Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e5be97d
First output of deeplc as onnx and first notebook
Alirezak2n Mar 14, 2025
b3c3ed9
Update the ONNX model
Alirezak2n Mar 24, 2025
f3a9962
Formatting with Ruff
RalfG Mar 27, 2025
a5ec35c
First refactoring of do_f_extraction* methods
RalfG Mar 27, 2025
655a665
Add calibration test
Alirezak2n Apr 2, 2025
18922d4
Final pytorch version
Alirezak2n Apr 22, 2025
efbe81f
Update pyproject.toml
Alirezak2n Apr 22, 2025
bc6da2e
Add onnx2torch
Alirezak2n Apr 22, 2025
8e897b0
Delete ATLANTIS_SILICA_fixed_mods.csv
Alirezak2n Apr 22, 2025
922e19a
Add feature_matrices function
Alirezak2n Apr 22, 2025
6588d4d
Further cleanup; refactor feature generation; try dask for multiproce…
RalfG Apr 23, 2025
b05223d
Undo changes redundant with upcoming PR from RalfG
RalfG Apr 23, 2025
efabc32
Replace .gitignore with the one from GitHub
RalfG Apr 23, 2025
a373dc9
Merge pull request #88 from Alirezak2n/master
RalfG Apr 23, 2025
194d2be
Merge branch 'dev' into cleanup
RalfG Apr 23, 2025
ccc6ae3
Add dask dependency
RobbinBouwmeester Apr 24, 2025
57db4c8
Update pyproject.toml
RobbinBouwmeester Apr 24, 2025
cc965d6
Read function to prepare matrices
RobbinBouwmeester Apr 24, 2025
efb18bc
Merge pull request #89 from compomics/cleanup
RalfG Apr 24, 2025
984f563
Split-up DeepLC class into separate functions (WIP)
RalfG Apr 24, 2025
12f332a
Generate features as part of dataloader for optimized multiprocessing…
RalfG Jun 5, 2025
8ebbd6c
Simplify predict function and only predict unique peptidoforms:
RalfG Jun 6, 2025
f1947eb
Fully vectorize linear calibration
RalfG Sep 23, 2025
b0ec680
New core functions, model ops, improved calibration, more repo cleanup
RalfG Dec 10, 2025
970ac5d
Restructure data files into package data dir
RalfG Dec 10, 2025
306c3f7
separate finetune function in core
ArthurDeclercq Jan 8, 2026
b4451d0
add finetune to import
ArthurDeclercq Jan 8, 2026
c3a4480
add warnings for reference psm list
ArthurDeclercq Jan 8, 2026
f93cb83
Make data module public
RalfG Jan 8, 2026
09a5645
Make naming in calibration module more generic to also fit use for io…
RalfG Jan 8, 2026
37f4b86
change default epochs in train
ArthurDeclercq Jan 8, 2026
e4b25e5
Merge branch 'feature/new-api' of https://github.com/compomics/DeepLC…
RalfG Jan 8, 2026
d554c30
Add initial architecture
RalfG Jan 8, 2026
5c3e5a0
default patience to at least 10, change data import
ArthurDeclercq Jan 9, 2026
1b6bd57
Create align.py
RobbinBouwmeester Jan 13, 2026
b7fb430
Update align.py
RobbinBouwmeester Jan 13, 2026
cc5f39f
General cleanup, docstrings, etc
RalfG Feb 19, 2026
9338d16
Add basic skeleton for readthedocs
RalfG Feb 19, 2026
336ec9e
Add v4.0 to do list
RalfG Feb 19, 2026
f7a08be
Update actions
RalfG Mar 3, 2026
1bbe23e
Fix tests
RalfG Mar 3, 2026
bce8675
Only lint package dir
RalfG Mar 3, 2026
35bc90f
Fix formatting
RalfG Mar 3, 2026
d0aa1cd
Update changelog; include in docs
RalfG Mar 3, 2026
dff9b59
Merge branch 'master' of https://github.com/compomics/DeepLC into fea…
RalfG Mar 3, 2026
2b0aea9
Merge pull request #90 from CompOmics/feature/new-api
RalfG Mar 3, 2026
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
279 changes: 91 additions & 188 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,204 +1,107 @@
name: Publish to PyPI and GitHub release
name: Publish

on:
push:
tags:
- 'v*'
release:
types: [created]
workflow_dispatch:
inputs:
ref:
description: 'Git ref (branch, tag, or SHA) to build from'
required: true
default: 'master' # ← was 'main'
type: string

# Least-privilege defaults for all jobs (override per-job if needed)
permissions:
contents: write # to create releases and read code
packages: write # to push container images to ghcr.io
id-token: write # for PyPI OIDC publish

jobs:
python-package:
build-python-package:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Select ref
id: select-ref
run: |
if [ -n "${{ github.event.inputs.ref }}" ]; then
echo "ref=${{ github.event.inputs.ref }}" >> $GITHUB_OUTPUT
else
# Fallback to the event ref (e.g. refs/tags/v1.2.3 on tag pushes)
echo "ref=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
fi

- uses: actions/checkout@v4
with:
# Checkout the chosen ref for manual runs; for tag-push runs this will be that tag
ref: ${{ steps.select-ref.outputs.ref }}

- name: Derive version
id: version
shell: bash
run: |
# If the ref looks like a release tag (v*), use it as version (strip refs/tags/ if present)
REF="${{ steps.select-ref.outputs.ref }}"
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VER="${GITHUB_REF#refs/tags/}"
elif [[ "$REF" == refs/tags/v* ]]; then
VER="${REF#refs/tags/}"
elif [[ "$REF" == v* ]]; then
VER="$REF"
else
# Fallback for non-tag manual runs
VER="manual-${{ github.run_number }}"
fi
echo "version=$VER" >> $GITHUB_OUTPUT
echo "Resolved version: $VER"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build flake8

- name: Check for syntax errors
run: |
flake8 ./deeplc --count --select=E9,F63,F7,F82 --show-source --statistics
- uses: actions/checkout@v6

- name: Build package
run: |
python -m build . --sdist --wheel
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Upload compiled wheels
uses: actions/upload-artifact@v4
with:
name: python-wheels
path: dist/*.whl
- name: Build
run: uv build --no-sources

windows-installer:
runs-on: windows-latest
needs: python-package
steps:
- uses: actions/checkout@v4
with:
# Match the same ref used for building the Python package
ref: ${{ needs.python-package.outputs.ref || github.ref }}
# If you want to avoid recomputing the ref/version here, you can
# alternatively repeat the "Select ref" + "Derive version" steps as above
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[gui] pyinstaller
- name: Install Inno Setup
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install innosetup -y --allow-unofficial --force
- name: Run pyinstaller
run: pyinstaller ./deeplc_pyinstaller.spec --clean --noconfirm
- name: Test built DeepLC exe
run: dist/deeplc/deeplc.exe --ignore-gooey --help
- name: Derive version (Windows)
id: version
shell: bash
run: |
REF="${{ github.event.inputs.ref }}"
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VER="${GITHUB_REF#refs/tags/}"
elif [[ "$REF" == refs/tags/v* ]]; then
VER="${REF#refs/tags/}"
elif [[ "$REF" == v* ]]; then
VER="$REF"
else
VER="manual-${{ github.run_number }}"
fi
echo "version=$VER" >> $GITHUB_OUTPUT
echo "Resolved version: $VER"
- name: Run Inno Setup
run: ISCC.exe ./deeplc_innosetup.iss /DAppVersion=${{ steps.version.outputs.version }}
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: windows-installer
path: dist/*.exe
- name: Upload dists
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/
if-no-files-found: error

git-release:
publish-python-package:
needs: build-python-package
runs-on: ubuntu-latest
needs: [python-package, windows-installer]
# Only create a GitHub Release when the ref is a v* tag (either push or manual)
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.event.inputs.ref, 'v')
steps:
- uses: actions/checkout@v4

- name: Resolve version/tag
id: version
shell: bash
run: |
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VER="${GITHUB_REF#refs/tags/}"
elif [[ "${{ github.event.inputs.ref }}" == v* ]]; then
VER="${{ github.event.inputs.ref }}"
else
echo "This job should only run for v* tags."
exit 1
fi
echo "version=$VER" >> $GITHUB_OUTPUT
echo "Resolved version: $VER"
permissions:
id-token: write

- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist

- name: Create GitHub Release
# The docker action infers the tag from GITHUB_REF; set it explicitly for manual runs.
uses: docker://antonyurchenko/git-release:v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "CHANGELOG.md"
# Provide a synthetic tag ref for manual runs with input v*
GITHUB_REF: refs/tags/${{ steps.version.outputs.version }}
with:
args: |
dist/**/*.exe
dist/**/*.whl

build-streamlit-image:
runs-on: ubuntu-latest
needs: python-package
steps:
- uses: actions/checkout@v4
- id: latest_release
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: compomics
repo: DeepLC
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push to ghcr.io
uses: docker/build-push-action@v5
with:
context: streamlit
push: true
tags: |
ghcr.io/compomics/deeplc-streamlit:${{ steps.latest_release.outputs.release }}
ghcr.io/compomics/deeplc-streamlit:latest
- name: Download dists
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

# windows-installer:
# runs-on: windows-latest
# needs: python-package
# steps:
# - uses: actions/checkout@v6
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install .[gui] pyinstaller
# - name: Install Inno Setup
# uses: crazy-max/ghaction-chocolatey@v3
# with:
# args: install innosetup -y --allow-unofficial --force
# - name: Run pyinstaller
# run: pyinstaller ./deeplc_pyinstaller.spec --clean --noconfirm
# - name: Test built DeepLC exe
# run: dist/deeplc/deeplc.exe --ignore-gooey --help
# - name: Run Inno Setup
# run: ISCC.exe ./deeplc_innosetup.iss /DAppVersion=${{ github.ref_name }}
# - name: Upload installer
# uses: actions/upload-artifact@v4
# with:
# name: windows-installer
# path: dist/*.exe
# - name: Upload installer to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# tag: ${{ github.ref }}
# file_glob: true
# file: dist/*.exe

# build-streamlit-image:
# runs-on: ubuntu-latest
# needs: publish-python-package

# steps:
# - uses: actions/checkout@v6

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build and push to ghcr.io
# uses: docker/build-push-action@v5
# with:
# context: streamlit
# push: true
# tags: |
# ghcr.io/compomics/deeplc-streamlit:${{ github.ref }}
# ghcr.io/compomics/deeplc-streamlit:latest
65 changes: 43 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python package test
name: Test

on:
push:
Expand All @@ -7,29 +7,50 @@ on:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
lint-python-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Lint
uses: astral-sh/ruff-action@v3
with:
src: "deeplc"

- name: Check formatting
uses: astral-sh/ruff-action@v3
with:
args: "format --check --diff deeplc"
src: "deeplc"

test-python-package:
needs: lint-python-package
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
system: [["3.11", "ubuntu-latest"], ["3.12", "ubuntu-latest"]]
runs-on: ${{ matrix.system[1] }}
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.system[0] }}
uses: actions/setup-python@v5
- uses: actions/checkout@v6

- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.system[0] }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install --editable .[test]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
enable-cache: true

- name: Install the project
run: uv sync --all-extras --dev

- name: Run tests
run: uv run pytest

- name: Prune cache
run: uv cache prune --ci
Loading