Skip to content

Commit b694fd1

Browse files
authored
Merge pull request #108 from KohlbacherLab/develop
Release 4.0.0
2 parents 5a3a2c8 + b1cd7fe commit b694fd1

41 files changed

Lines changed: 1662 additions & 1279 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, ready_for_review, reopened]
6+
# Optional: Only run on specific file changes
7+
# paths:
8+
# - "src/**/*.ts"
9+
# - "src/**/*.tsx"
10+
# - "src/**/*.js"
11+
# - "src/**/*.jsx"
12+
13+
jobs:
14+
claude-review:
15+
# Optional: Filter by PR author
16+
# if: |
17+
# github.event.pull_request.user.login == 'external-contributor' ||
18+
# github.event.pull_request.user.login == 'new-developer' ||
19+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20+
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pull-requests: read
25+
issues: read
26+
id-token: write
27+
env:
28+
HAS_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN != '' }}
29+
30+
steps:
31+
- name: Checkout repository
32+
if: env.HAS_TOKEN == 'true'
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 1
36+
37+
- name: Run Claude Code Review
38+
if: env.HAS_TOKEN == 'true'
39+
id: claude-review
40+
uses: anthropics/claude-code-action@v1
41+
with:
42+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
43+
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
44+
plugins: 'code-review@claude-code-plugins'
45+
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
46+

.github/workflows/claude.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Run Claude Code
34+
id: claude
35+
uses: anthropics/claude-code-action@v1
36+
with:
37+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
39+
# This is an optional setting that allows Claude to read CI results on PRs
40+
additional_permissions: |
41+
actions: read
42+
43+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44+
# prompt: 'Update the pull request description to include a summary of changes.'
45+
46+
# Optional: Add claude_args to customize behavior and configuration
47+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48+
# or https://code.claude.com/docs/en/cli-reference for available options
49+
# claude_args: '--allowed-tools Bash(gh pr:*)'
50+

.github/workflows/pypi-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- name: Set up Python 3.7
14-
uses: actions/setup-python@v4
13+
- name: Set up Python 3.11
14+
uses: actions/setup-python@v5
1515
with:
16-
python-version: 3.7
16+
python-version: '3.11'
1717
- name: Install pypa/build
1818
run: >-
1919
python -m

.github/workflows/python-test-conda-external.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
name: Unit tests external tools
22

33
on:
4-
push:
5-
branches: [ main, develop ]
64
pull_request:
7-
branches: [ main, develop ]
5+
branches: [ main, master ]
86

97
jobs:
108
tests-external:
119
strategy:
1210
matrix:
1311
platform: [ubuntu-latest]
14-
python-version: [3.7]
12+
python-version: ['3.11', '3.12']
1513
runs-on: ${{ matrix.platform }}
1614

1715
steps:
@@ -30,34 +28,33 @@ jobs:
3028
working-directory: ./epytope-tools/
3129
run: |
3230
./post.runner
33-
- name: Set conda package directory
34-
run: |
35-
mkdir /tmp/condapkgs
36-
echo "CONDA_PKGS_DIRS=/tmp/condapkgs" >> $GITHUB_ENV
3731
- name: Activate epytope-tools
3832
run: |
3933
echo "$PWD/epytope-tools/bin" >> $GITHUB_PATH
4034
echo "PATH=$PATH"
41-
- name: Set up Python ${{ matrix.python-version }}
42-
run: |
43-
$CONDA/bin/conda create -p /tmp/condaenv python==${{ matrix.python-version }}'.*' setuptools"==52.0" protobuf"<=3.20.1"
44-
- name: Activate conda environment
45-
run: |
46-
echo "/tmp/condaenv/bin" >> $GITHUB_PATH
47-
export PATH="/tmp/condaenv/bin:$PATH"
35+
- name: Set up Miniconda
36+
uses: conda-incubator/setup-miniconda@v3
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
activate-environment: test
40+
auto-activate-base: false
4841
- name: Install epytope
42+
shell: bash -el {0}
4943
run: |
5044
pip install ./epytope/
5145
- name: Set up test environment
46+
shell: bash -el {0}
5247
run: |
53-
conda install -p /tmp/condaenv -c conda-forge -c bioconda nose
48+
pip install pytest
5449
- name: Run Tests - Cleavage Prediction
5550
working-directory: ./epytope/
51+
shell: bash -el {0}
5652
continue-on-error: true
57-
run: nosetests -v epytope/test/external/TestExternalCleavagePrediction.py || echo "Cleavage Prediction" >> FAILED_TESTS
53+
run: pytest -v epytope/test/external/TestExternalCleavagePrediction.py || echo "Cleavage Prediction" >> FAILED_TESTS
5854
- name: Run Tests - Epitope Prediction
5955
working-directory: ./epytope/
60-
run: nosetests -v epytope/test/external/TestExternalEpitopePrediction.py || echo "Epitope Prediction" >> FAILED_TESTS
56+
shell: bash -el {0}
57+
run: pytest -v epytope/test/external/TestExternalEpitopePrediction.py || echo "Epitope Prediction" >> FAILED_TESTS
6158
- name: Validate Test Results
6259
working-directory: ./epytope/
6360
run: |

.github/workflows/python-test-conda.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ jobs:
1111
strategy:
1212
matrix:
1313
platform: [ubuntu-latest, macos-latest]
14-
python-version: [3.7]
14+
python-version: ['3.11', '3.12']
1515
runs-on: ${{ matrix.platform }}
1616

1717
steps:
1818
- uses: actions/checkout@v4
19-
- name: Set conda package directory
20-
run: |
21-
mkdir /tmp/condapkgs
22-
echo "CONDA_PKGS_DIRS=/tmp/condapkgs" >> $GITHUB_ENV
23-
- name: Set up Python ${{ matrix.python-version }}
24-
run: |
25-
$CONDA/bin/conda create -p /tmp/condaenv python==${{ matrix.python-version }}'.*' setuptools"==52.0" protobuf"<=3.20.1"
26-
- name: Activate conda environment
27-
run: |
28-
echo "/tmp/condaenv/bin" >> $GITHUB_PATH
29-
export PATH="/tmp/condaenv/bin:$PATH"
19+
- name: Set up Miniconda
20+
uses: conda-incubator/setup-miniconda@v3
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
activate-environment: test
24+
auto-activate-base: false
3025
- name: Install epytope
26+
shell: bash -el {0}
3127
run: |
3228
pip install .
3329
- name: Install Test dependencies
34-
run: conda install -p /tmp/condaenv -c conda-forge -c bioconda nose nose-exclude glpk
30+
shell: bash -el {0}
31+
run: |
32+
pip install pytest
33+
conda install -c conda-forge glpk
3534
- name: Run Tests
36-
run: nosetests --exclude-dir=epytope/test/external epytope
35+
shell: bash -el {0}
36+
run: pytest epytope/test/ --ignore=epytope/test/external -v

.readthedocs.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.11"
7+
8+
sphinx:
9+
configuration: epytope/doc/conf.py
10+
11+
python:
12+
install:
13+
- method: pip
14+
path: .
15+
extra_requirements:
16+
- docs

CHANGELOG.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,34 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
## v4.0.0 - Unreleased
7+
8+
### `Added`
9+
10+
- [#107](https://github.com/KohlbacherLab/epytope/pull/107) Added `EnsemblRESTAdapter` and `PyEnsemblAdapter` as drop-in replacements for `MartsAdapter` [#103](https://github.com/KohlbacherLab/epytope/issues/103) [#106](https://github.com/KohlbacherLab/epytope/issues/106)
11+
- Added MHCFlurry 2.0 predictor class
12+
13+
### `Changed`
14+
15+
- **BREAKING**: Minimum Python version raised to 3.11, build via `pyproject.toml`
16+
- **BREAKING**: Removed `mhcnuggets` predictors; `mhcflurry` is now optional (`pip install epytope[mhcflurry]`)
17+
- Full pandas 3.0 compatibility
18+
- Migrated CI to `pytest` with Python 3.11/3.12 matrix
19+
- [#107](https://github.com/KohlbacherLab/epytope/pull/107) Switched CI tests from `MartsAdapter` (BioMart) to `EnsemblRESTAdapter` (REST API) to eliminate flaky BioMart failures
20+
- [#107](https://github.com/KohlbacherLab/epytope/pull/107) Restricted external tool CI tests to PRs targeting `main`/`master` only
21+
22+
### `Fixed`
23+
24+
- Fixed `MartsAdapter` `KeyError` caused by inconsistent BioMart display-name headers
25+
- Fixed nondeterministic OptiTope results due to unordered set inputs to Pyomo
26+
627
## v3.4.0 - 2024-01-10
728

829
### `Added`
930

1031
- [#93](https://github.com/KohlbacherLab/epytope/pull/93) Added NetMHCIIpan version 4.2 interface [#92](https://github.com/KohlbacherLab/epytope/issues/92)
1132
- [#96](https://github.com/KohlbacherLab/epytope/pull/96) Added NetMHCIIpan version 4.3 interface [#95](https://github.com/KohlbacherLab/epytope/issues/95)
1233

13-
### `Changed`
14-
1534
### `Fixed`
1635

1736
- [#93](https://github.com/KohlbacherLab/epytope/pull/93) Fixed length restriction of NetMHCIIpan interfaces [#91](https://github.com/KohlbacherLab/epytope/issues/91)

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ use the following commands:
2828

2929
### Python Packages
3030

31-
- pandas
31+
- pandas>=2.1
3232
- pyomo>=4.0
33-
- svmlight
3433
- PyMySQL
3534
- biopython
36-
- pyVCF
37-
- h5py<=2.10.0
35+
- PyVCF3
36+
- requests
37+
- beautifulsoup4
3838

3939
### Third-Party Software (not installed through pip)
4040

@@ -58,8 +58,7 @@ Currently **epytope** provides implementations of several prediction methods or
5858
- Assembly with spacers by [Schubert et al.](https://pubmed.ncbi.nlm.nih.gov/26813686/)
5959
- Epitope Prediction
6060
- [SYFPEITHI](https://link.springer.com/article/10.1007/s002510050595)
61-
- [MHCNuggets](https://pubmed.ncbi.nlm.nih.gov/31871119/) 2.0, 2.3.2
62-
- [MHCflurry](https://pubmed.ncbi.nlm.nih.gov/29960884/) 1.2.2, 1.4.3
61+
- [MHCflurry](https://pubmed.ncbi.nlm.nih.gov/29960884/) 1.2.2, 1.4.3, 2.0 (optional: `pip install epytope[mhcflurry]`)
6362
- [NetMHC](https://pubmed.ncbi.nlm.nih.gov/26515819/) 3.0, 3.4, 4.0
6463
- [NetMHCII](https://pubmed.ncbi.nlm.nih.gov/29315598/) 2.2, 2.3
6564
- [NetMHCpan](https://pubmed.ncbi.nlm.nih.gov/28978689/) 2.4, 2.8, 3.0, 4.0, 4.1

epytope/CleavagePrediction/PSSM.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def predict(self, peptides, length=None, **kwargs):
155155
:return: Returns a :class:`~epytope.Core.Result.CleavageSitePredictionResult` object
156156
:rtype: :class:`~epytope.Core.Result.CleavageSitePredictionResult`
157157
"""
158-
return super(PCM, self).predict(peptides, lenght=length, **kwargs)
158+
return super().predict(peptides, lenght=length, **kwargs)
159159

160160

161161
class ProteaSMMConsecutive(APSSMCleavageSitePredictor):
@@ -217,7 +217,7 @@ def predict(self, peptides, length=None, **kwargs):
217217
:return: Returns a :class:`~epytope.Core.Result.CleavageSitePredictionResult` object
218218
:rtype: :class:`~epytope.Core.Result.CleavageSitePredictionResult`
219219
"""
220-
return super(ProteaSMMConsecutive, self).predict(peptides, length=length, **kwargs)
220+
return super().predict(peptides, length=length, **kwargs)
221221

222222

223223
class ProteaSMMImmuno(APSSMCleavageSitePredictor):
@@ -280,7 +280,7 @@ def predict(self, peptides, length=None, **kwargs):
280280
:return: Returns a :class:`~epytope.Core.Result.CleavageSitePredictionResult` object
281281
:rtype: :class:`~epytope.Core.Result.CleavageSitePredictionResult`
282282
"""
283-
return super(ProteaSMMImmuno, self).predict(peptides, length=length, **kwargs)
283+
return super().predict(peptides, length=length, **kwargs)
284284

285285

286286
class APSSMCleavageFragmentPredictor(ACleavageFragmentPrediction):
@@ -292,14 +292,16 @@ class APSSMCleavageFragmentPredictor(ACleavageFragmentPrediction):
292292
Implements predict functionality
293293
"""
294294

295-
@abc.abstractproperty
295+
@property
296+
@abc.abstractmethod
296297
def trailingN(self):
297298
"""
298299
The number of trailing residues at the N-terminal of the peptide used for prediction
299300
"""
300301
raise NotImplementedError
301302

302-
@abc.abstractproperty
303+
@property
304+
@abc.abstractmethod
303305
def tralingC(self):
304306
"""
305307
The number of trailing residues at the C-terminal of the peptide used for prediction

0 commit comments

Comments
 (0)