Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/streaming fix windows #128

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c82b1e0
✨ cherry picks internal fixes from !68 and !70
gessulat Sep 19, 2024
08d7c3f
Cherry pick feature/confidence_streaming branch
ezander Sep 27, 2024
92f9e9a
✨ adds filelock dependency for tests
gessulat Sep 27, 2024
18f8dca
💄 linting
gessulat Sep 27, 2024
ab54bba
💄 reformat to satisfy linter
gessulat Sep 27, 2024
a000faf
✨ imports type annotations from future for python 3.9
gessulat Sep 27, 2024
3ff7410
✨ make pytest and cli behave with type annotations in Python 3.9
gessulat Sep 27, 2024
6aaf5b0
✨ test dropping Python 3.9 support
gessulat Sep 27, 2024
11967f7
Set scale_to_one to false in *all* cases
ezander Oct 1, 2024
930a50a
Fixed path problems probably causing errors under windows
ezander Oct 1, 2024
6c646a2
Fix more possible path issues
ezander Oct 1, 2024
fd033ee
Fix warning about bitwise not in python 3.12
ezander Oct 1, 2024
02d4c21
Fix problem with numpy 2.x's different str rep of floats
ezander Oct 3, 2024
7f58137
Make hashing of rows for splitting independent of numpy version and s…
ezander Oct 3, 2024
10b5739
✨ investigate what scores does in windows
gessulat Oct 8, 2024
40fde9b
✨ only test failing test to speed up feedback loop
gessulat Oct 8, 2024
f11693e
✨ are scores zero?
gessulat Oct 8, 2024
78548ff
✨ why does training fail (silently?)
gessulat Oct 8, 2024
894a10c
✨ we're failing in fold 1. what is in fold 1? why is it different in
gessulat Oct 8, 2024
c6089be
✨ set logger to debug; describe into column that leads to bad training
gessulat Oct 8, 2024
893b45f
✨ we fail in ubuntu so that we can compare debug logs
gessulat Oct 8, 2024
efe1018
✨ log more infos during training
gessulat Oct 8, 2024
a4d04d0
✨ fix messed up logging
gessulat Oct 8, 2024
90d9cb9
:sparkles: uses uv for env setup; fix dependencies
gessulat Oct 9, 2024
5848f24
✨ do we need to run the subprocess via uv explicitly for Windows?
gessulat Oct 9, 2024
b80b90f
✨ role back added logs
gessulat Oct 9, 2024
2d4d438
☂️ re-enable tests
gessulat Oct 9, 2024
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
25 changes: 11 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,28 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest, macos-latest]
experimental: [false,]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov wheel
pip install -e .
- 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
run: uv sync --all-extras --dev

- name: Run unit and system tests
run: |
pytest -v --cov=mokapot tests/
uv run pytest -v --cov=mokapot tests/

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,5 @@ venv.bak/
.idea/

tests/integration_tests/run*

/temp/
/.run/
8 changes: 7 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ publish:
- python -m build --sdist --wheel .
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*

check_formatting:
extends: .with_twine
stage: test
script:
- pip install .[dev]
- ruff check . --exclude docs/

unit_test:
extends: .with_twine
stage: test
script:
- pip install .[dev]
- pip install pytest
- pytest tests/

2 changes: 1 addition & 1 deletion data/percolator-noSplit-extended-201-bad.tab
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SpecId Label ScanNr ExpMass Mass MS8_feature_5 missedCleavages MS8_feature_7 MS8_feature_13 MS8_feature_20 MS8_feature_21 MS8_feature_22 MS8_feature_24 MS8_feature_29 MS8_feature_30 MS8_feature_32 MS8_feature_33 MS8_feature_34 MS8_feature_35 MS8_feature_37 MS8_feature_38 MS8_feature_39 MS8_feature_40 MS8_feature_41 MS8_feature_42 MS8_feature_43 MS8_feature_44 MS8_feature_45 MS8_feature_47 MS8_feature_52 MS8_feature_53 MS8_feature_55 MS8_feature_56 MS8_feature_57 MS8_feature_58 MS8_feature_60 MS8_feature_61 MS8_feature_62 MS8_feature_63 MS8_feature_64 MS8_feature_65 MS8_feature_66 MS8_feature_67 MS8_feature_68 MS8_feature_70 MS8_feature_75 MS8_feature_76 MS8_feature_78 MS8_feature_79 MS8_feature_80 MS8_feature_81 MS8_feature_83 MS8_feature_84 MS8_feature_85 MS8_feature_86 MS8_feature_87 MS8_feature_88 MS8_feature_89 MS8_feature_90 MS8_feature_91 MS8_feature_93 MS8_feature_98 MS8_feature_99 MS8_feature_101 MS8_feature_102 MS8_feature_103 MS8_feature_104 MS8_feature_106 MS8_feature_107 MS8_feature_108 MS8_feature_109 MS8_feature_110 MS8_feature_111 MS8_feature_116 MS8_feature_118 MS8_feature_119 MS8_feature_124 MS8_feature_126 MS8_feature_127 MS8_feature_132 MS8_feature_134 MS8_feature_135 MS8_feature_140 MS8_feature_142 MS8_feature_143 MS8_feature_144 MS8_feature_146 MS8_feature_147 MS8_feature_148 MS8_feature_149 MS8_feature_150 MS8_feature_151 MS8_feature_152 MS8_feature_153 MS8_feature_154 MS8_feature_155 MS8_feature_156 MS8_feature_157 MS8_feature_158 Peptide Proteins ModifiedPeptide PCM PeptideGroup
SpecId Label ScanNr ExpMass Mass MS8_feature_5 missedCleavages MS8_feature_7 MS8_feature_13 MS8_feature_20 MS8_feature_21 MS8_feature_22 MS8_feature_24 MS8_feature_29 MS8_feature_30 MS8_feature_32 MS8_feature_33 MS8_feature_34 MS8_feature_35 MS8_feature_37 MS8_feature_38 MS8_feature_39 MS8_feature_40 MS8_feature_41 MS8_feature_42 MS8_feature_43 MS8_feature_44 MS8_feature_45 MS8_feature_47 MS8_feature_52 MS8_feature_53 MS8_feature_55 MS8_feature_56 MS8_feature_57 MS8_feature_58 MS8_feature_60 MS8_feature_61 MS8_feature_62 MS8_feature_63 MS8_feature_64 MS8_feature_65 MS8_feature_66 MS8_feature_67 MS8_feature_68 MS8_feature_70 MS8_feature_75 MS8_feature_76 MS8_feature_78 MS8_feature_79 MS8_feature_80 MS8_feature_81 MS8_feature_83 MS8_feature_84 MS8_feature_85 MS8_feature_86 MS8_feature_87 MS8_feature_88 MS8_feature_89 MS8_feature_90 MS8_feature_91 MS8_feature_93 MS8_feature_98 MS8_feature_99 MS8_feature_101 MS8_feature_102 MS8_feature_103 MS8_feature_104 MS8_feature_106 MS8_feature_107 MS8_feature_108 MS8_feature_109 MS8_feature_110 MS8_feature_111 MS8_feature_116 MS8_feature_118 MS8_feature_119 MS8_feature_124 MS8_feature_126 MS8_feature_127 MS8_feature_132 MS8_feature_134 MS8_feature_135 MS8_feature_140 MS8_feature_142 MS8_feature_143 MS8_feature_144 MS8_feature_146 MS8_feature_147 MS8_feature_148 MS8_feature_149 MS8_feature_150 MS8_feature_151 MS8_feature_152 MS8_feature_153 MS8_feature_154 MS8_feature_155 MS8_feature_156 MS8_feature_157 MS8_feature_158 Peptide Proteins ModifiedPeptide Precursor PeptideGroup
390120 1 52505 2984.374317675 2984.374317675 27 1 4.39773287346864 1.05600619360352 0.185185185185185 1.11111111111111 2.81481481481481 35 4.99716807635322 0.174402239166153 0.111111111111111 0.00529100552753166 0.0804232844599971 0.0317460320614002 -1.20775864924016 0.00317460326132951 0.600000023841858 0.000922763211442017 0.00055365791724004 0.104641347657766 0.0740740740740741 0.444444444444444 2.55555555555556 14 4.56519603562033 0.358209911483048 0.037037037037037 0.00529100552753166 0.182539674970839 0.0317460320614002 -1.51853827336966 0.00264550276376583 0.5 0.00189529062167343 0.000947645310836716 0.179104955741524 0.0740740740740741 0.592592592592593 2.55555555555556 18 4.56519603562033 0.355785448846456 0.037037037037037 0.00411522636810939 0.141975305698536 0.0329218109448751 -1.51853827336966 0.00205761318405469 0.5 0.00146413766048257 0.000732068830241284 0.177892724423228 0.185185185185185 1.11111111111111 2.55555555555556 35 4.92084022385512 0.15368946169618 0.111111111111111 0.00529100552753166 0.0730158708713673 0.0317460320614002 -1.1792680662246 0.00317460326132951 0.600000023841858 0.000813171791357855 0.000487903066332671 0.0922136806819505 0.0740740740740741 0.148148148148148 0.839147686958313 0 0.0740740740740741 0.596351504325867 0 0.0740740740740741 0.596351504325867 0.0740740740740741 0.148148148148148 0.839147686958313 4 14.0633640289307 14.0633640289307 7.51776170730591 7.18997812271118 0 0 0 0 0 0 0 0 -1.05600619360352 262211 _.dummy._ 5133041 513304104 3746459
167618 -1 35142 1598.79490536 1598.79490536 13 1 5.2123265552766 0.0782731870117175 0.615384615384615 1.38461538461538 29.6153846153846 26 6.23419631596735 0.68169286154319 0.461538461538462 0.02366863993498 1.139053271367 0.0532544392805833 -1.23618708000169 0.0177514793781134 0.75 0.0161347428861119 0.012101056773891 0.511269646157393 0.153846153846154 1.07692307692308 26.9230769230769 16 4.21731303051421 0.509927000412204 0.0769230769230769 0.00961538461538462 1.68269230769231 0.0673076923076923 -3.04056367951856 0.00480769230769231 0.5 0.00490314423473273 0.00245157211736636 0.254963500206102 0.230769230769231 1.46153846153846 26.9230769230769 22 4.39931826509783 0.475203076933652 0.0769230769230769 0.0104895108021223 1.22377623044527 0.0664335672671978 -2.85876431935613 0.00349650360070742 0.333333343267441 0.00498464780869727 0.00166154926956576 0.158401030365269 0.384615384615385 1.61538461538462 26.9230769230769 26 5.167312164545 0.786869767626696 0.230769230769231 0.0147928996728017 1.0355029472938 0.0621301761040321 -2.0936832299775 0.00887573968905669 0.600000023841858 0.0116400855280625 0.00698405122664308 0.472121879336455 0.384615384615385 0.538461538461538 3.06590270996094 0.0769230769230769 0.0769230769230769 4.209068775177 0.0769230769230769 0.0769230769230769 7.7958083152771 0.230769230769231 0.230769230769231 3.89074325561523 3 14.6776256561279 8.77441215515137 4.29312372207642 5.5558910369873 0 0 0 0 0 0 0 0 0.0782731870117175 2286595 _.dummy._ 2178398 217839803 1788327
47826 1 38693 1483.782350015 1483.782350015 12 1 5.33775257770524 0.744991249755863 0.666666666666667 1.91666666666667 25.5 31 5.87355472778032 0.534035432491101 0.416666666666667 0.0215053757031759 0.822580655415853 0.0618279576301575 -1.43610371273436 0.0134408598144849 0.625 0.0114846326145291 0.00717789538408071 0.333772145306938 0.166666666666667 0.916666666666667 22.8333333333333 13 4.66878509363779 0.754139716754149 0.166666666666667 0.0128205132981141 1.75641028086344 0.0705128212769826 -2.33735102703985 0.0128205132981141 1 0.0096684582672826 0.0096684582672826 0.754139716754149 0.25 1.58333333333333 22.8333333333333 22 4.77529467454582 0.658024571737302 0.166666666666667 0.0113636367022991 1.03787875175476 0.0719696978727977 -2.23139621492402 0.00757575780153275 0.666666686534882 0.00747755217440866 0.00498503478293911 0.438683060898641 0.583333333333333 2 22.8333333333333 31 5.52196035496777 0.335201948098924 0.416666666666667 0.0188172037402789 0.736559152603149 0.0645161271095276 -1.49625222801692 0.0134408598144849 0.714285731315613 0.00630756335151585 0.00450540239393989 0.239429968636258 0.416666666666667 0.416666666666667 2.52091455459595 0.166666666666667 0.166666666666667 3.12026619911194 0.166666666666667 0.166666666666667 3.1865119934082 0.416666666666667 0.416666666666667 3.1865119934082 3 16.0624752044678 13.8793077468872 5.27713108062744 6.50826787948608 0 0 0 0 0 0 0 0 -0.744991249755863 1213451 _.dummy._ 1880410 188041003 1559331
Expand Down
3 changes: 1 addition & 2 deletions mokapot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@
from .parsers.pin import read_pin, read_percolator
from .parsers.pepxml import read_pepxml
from .parsers.fasta import read_fasta, make_decoys, digest
from .writers import to_flashlfq, to_txt
from .confidence import LinearConfidence, plot_qvalues, assign_confidence
from .confidence import Confidence, assign_confidence
Loading
Loading