ms2rescore-rs 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ms2rescore_rs-0.1.0/.github/workflows/release.yml +111 -0
- ms2rescore_rs-0.1.0/.github/workflows/test.yml +39 -0
- ms2rescore_rs-0.1.0/.gitignore +20 -0
- ms2rescore_rs-0.1.0/Cargo.lock +1583 -0
- ms2rescore_rs-0.1.0/Cargo.toml +14 -0
- ms2rescore_rs-0.1.0/LICENSE +201 -0
- ms2rescore_rs-0.1.0/PKG-INFO +15 -0
- ms2rescore_rs-0.1.0/README.md +2 -0
- ms2rescore_rs-0.1.0/pyproject.toml +19 -0
- ms2rescore_rs-0.1.0/src/file_types.rs +41 -0
- ms2rescore_rs-0.1.0/src/lib.rs +41 -0
- ms2rescore_rs-0.1.0/src/parse_mzdata.rs +159 -0
- ms2rescore_rs-0.1.0/src/parse_timsrust.rs +40 -0
- ms2rescore_rs-0.1.0/src/precursor.rs +34 -0
- ms2rescore_rs-0.1.0/tests/README.md +17 -0
- ms2rescore_rs-0.1.0/tests/data/dda_test.d/analysis.tdf +0 -0
- ms2rescore_rs-0.1.0/tests/data/dda_test.d/analysis.tdf_bin +0 -0
- ms2rescore_rs-0.1.0/tests/data/test.mgf +13 -0
- ms2rescore_rs-0.1.0/tests/data/test.ms2/converter.GlobalMetaData.ms2.parquet +0 -0
- ms2rescore_rs-0.1.0/tests/data/test.ms2/converter.ms2spectrum.bin +0 -0
- ms2rescore_rs-0.1.0/tests/data/test.ms2/converter.ms2spectrum.parquet +0 -0
- ms2rescore_rs-0.1.0/tests/data/test.mzML +330 -0
- ms2rescore_rs-0.1.0/tests/test.py +38 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
linux:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
target: [x86_64, x86, aarch64]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.10"
|
|
22
|
+
- name: Build wheels
|
|
23
|
+
uses: PyO3/maturin-action@v1
|
|
24
|
+
with:
|
|
25
|
+
target: ${{ matrix.target }}
|
|
26
|
+
args: --release --out dist --find-interpreter
|
|
27
|
+
sccache: "true"
|
|
28
|
+
manylinux: auto
|
|
29
|
+
- name: Upload wheels
|
|
30
|
+
uses: actions/upload-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
name: wheels-linux-${{ matrix.target }}
|
|
33
|
+
path: dist
|
|
34
|
+
|
|
35
|
+
windows:
|
|
36
|
+
runs-on: windows-latest
|
|
37
|
+
strategy:
|
|
38
|
+
matrix:
|
|
39
|
+
target: [x64, x86]
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
- uses: actions/setup-python@v5
|
|
43
|
+
with:
|
|
44
|
+
python-version: "3.10"
|
|
45
|
+
architecture: ${{ matrix.target }}
|
|
46
|
+
- name: Build wheels
|
|
47
|
+
uses: PyO3/maturin-action@v1
|
|
48
|
+
with:
|
|
49
|
+
target: ${{ matrix.target }}
|
|
50
|
+
args: --release --out dist --find-interpreter
|
|
51
|
+
sccache: "true"
|
|
52
|
+
- name: Upload wheels
|
|
53
|
+
uses: actions/upload-artifact@v4
|
|
54
|
+
with:
|
|
55
|
+
name: wheels-windows-${{ matrix.target }}
|
|
56
|
+
path: dist
|
|
57
|
+
|
|
58
|
+
macos:
|
|
59
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
60
|
+
strategy:
|
|
61
|
+
matrix:
|
|
62
|
+
platform:
|
|
63
|
+
- runner: macos-latest
|
|
64
|
+
target: x86_64
|
|
65
|
+
- runner: macos-14
|
|
66
|
+
target: aarch64
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v4
|
|
69
|
+
- uses: actions/setup-python@v5
|
|
70
|
+
with:
|
|
71
|
+
python-version: "3.10"
|
|
72
|
+
- name: Build wheels
|
|
73
|
+
uses: PyO3/maturin-action@v1
|
|
74
|
+
with:
|
|
75
|
+
target: ${{ matrix.platform.target }}
|
|
76
|
+
args: --release --out dist --find-interpreter
|
|
77
|
+
sccache: "true"
|
|
78
|
+
- name: Upload wheels
|
|
79
|
+
uses: actions/upload-artifact@v4
|
|
80
|
+
with:
|
|
81
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
82
|
+
path: dist
|
|
83
|
+
|
|
84
|
+
sdist:
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@v4
|
|
88
|
+
- name: Build sdist
|
|
89
|
+
uses: PyO3/maturin-action@v1
|
|
90
|
+
with:
|
|
91
|
+
command: sdist
|
|
92
|
+
args: --out dist
|
|
93
|
+
- name: Upload sdist
|
|
94
|
+
uses: actions/upload-artifact@v4
|
|
95
|
+
with:
|
|
96
|
+
name: wheels-sdist
|
|
97
|
+
path: dist
|
|
98
|
+
|
|
99
|
+
release:
|
|
100
|
+
name: Release
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
needs: [linux, windows, macos, sdist]
|
|
103
|
+
permissions:
|
|
104
|
+
id-token: write
|
|
105
|
+
steps:
|
|
106
|
+
- uses: actions/download-artifact@v4
|
|
107
|
+
- name: Publish to PyPI
|
|
108
|
+
uses: PyO3/maturin-action@v1
|
|
109
|
+
with:
|
|
110
|
+
command: upload
|
|
111
|
+
args: --non-interactive --skip-existing wheels-*/*
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
# Make sure CI fails on all warnings, including Clippy lints
|
|
11
|
+
env:
|
|
12
|
+
RUSTFLAGS: "-Dwarnings"
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
clippy_check:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- name: Run Clippy
|
|
20
|
+
run: cargo clippy --all-targets --all-features
|
|
21
|
+
|
|
22
|
+
pytest:
|
|
23
|
+
runs-on: ${{ matrix.os }}
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- name: Install Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: "3.10"
|
|
33
|
+
- name: Install package and dependencies
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
pip install .[test]
|
|
37
|
+
- name: Run tests
|
|
38
|
+
run: |
|
|
39
|
+
pytest ./tests/test.py
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# IDE
|
|
2
|
+
.vscode/
|
|
3
|
+
|
|
4
|
+
# Python
|
|
5
|
+
__pycache__/
|
|
6
|
+
|
|
7
|
+
# Generated by Cargo
|
|
8
|
+
# will have compiled files and executables
|
|
9
|
+
debug/
|
|
10
|
+
target/
|
|
11
|
+
|
|
12
|
+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
|
13
|
+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
|
14
|
+
Cargo.lock
|
|
15
|
+
|
|
16
|
+
# These are backup files generated by rustfmt
|
|
17
|
+
**/*.rs.bk
|
|
18
|
+
|
|
19
|
+
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
20
|
+
*.pdb
|