MNeuEventLib 0.2.1__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.
Files changed (50) hide show
  1. mneueventlib-0.2.1/.github/workflows/label_merge_conflicts.yml +21 -0
  2. mneueventlib-0.2.1/.github/workflows/push.yml +41 -0
  3. mneueventlib-0.2.1/.github/workflows/release.yml +187 -0
  4. mneueventlib-0.2.1/.gitignore +82 -0
  5. mneueventlib-0.2.1/.readthedocs.yaml +23 -0
  6. mneueventlib-0.2.1/Cargo.lock +1056 -0
  7. mneueventlib-0.2.1/Cargo.toml +26 -0
  8. mneueventlib-0.2.1/LICENSE +28 -0
  9. mneueventlib-0.2.1/MNeuEventLib/__init__.py +2 -0
  10. mneueventlib-0.2.1/MNeuEventLib/plotting.py +56 -0
  11. mneueventlib-0.2.1/PKG-INFO +15 -0
  12. mneueventlib-0.2.1/README.md +29 -0
  13. mneueventlib-0.2.1/bench.py +59 -0
  14. mneueventlib-0.2.1/docs/Makefile +20 -0
  15. mneueventlib-0.2.1/docs/make.bat +35 -0
  16. mneueventlib-0.2.1/docs/source/_static/HIFI00195790.nxs +0 -0
  17. mneueventlib-0.2.1/docs/source/_static/api/README.md +8 -0
  18. mneueventlib-0.2.1/docs/source/api.rst +11 -0
  19. mneueventlib-0.2.1/docs/source/conf.py +28 -0
  20. mneueventlib-0.2.1/docs/source/how-to/create_plots.ipynb +138 -0
  21. mneueventlib-0.2.1/docs/source/how-to/filtering.ipynb +303 -0
  22. mneueventlib-0.2.1/docs/source/how-to/index.rst +13 -0
  23. mneueventlib-0.2.1/docs/source/index.rst +55 -0
  24. mneueventlib-0.2.1/docs/source/install.rst +21 -0
  25. mneueventlib-0.2.1/docs/source/tutorials/batch_processing.ipynb +222 -0
  26. mneueventlib-0.2.1/docs/source/tutorials/getting_started.ipynb +242 -0
  27. mneueventlib-0.2.1/docs/source/tutorials/index.rst +12 -0
  28. mneueventlib-0.2.1/pyproject.toml +28 -0
  29. mneueventlib-0.2.1/src/batch_interface.rs +777 -0
  30. mneueventlib-0.2.1/src/consts.rs +3 -0
  31. mneueventlib-0.2.1/src/data/frame_data.rs +95 -0
  32. mneueventlib-0.2.1/src/data/mod.rs +14 -0
  33. mneueventlib-0.2.1/src/data/nexus_data.rs +367 -0
  34. mneueventlib-0.2.1/src/data/sample_logs.rs +405 -0
  35. mneueventlib-0.2.1/src/data/save/instrument.rs +255 -0
  36. mneueventlib-0.2.1/src/data/save/mod.rs +10 -0
  37. mneueventlib-0.2.1/src/data/save/periods.rs +227 -0
  38. mneueventlib-0.2.1/src/data/save/sample_logs.rs +265 -0
  39. mneueventlib-0.2.1/src/data/save/utils.rs +231 -0
  40. mneueventlib-0.2.1/src/data/save/wimda.rs +361 -0
  41. mneueventlib-0.2.1/src/filters/api.rs +968 -0
  42. mneueventlib-0.2.1/src/filters/filtering.rs +266 -0
  43. mneueventlib-0.2.1/src/filters/mod.rs +7 -0
  44. mneueventlib-0.2.1/src/filters/weights.rs +426 -0
  45. mneueventlib-0.2.1/src/interface.rs +219 -0
  46. mneueventlib-0.2.1/src/lib.rs +36 -0
  47. mneueventlib-0.2.1/src/stats.rs +644 -0
  48. mneueventlib-0.2.1/src/test_utils.rs +145 -0
  49. mneueventlib-0.2.1/src/utils.rs +84 -0
  50. mneueventlib-0.2.1/tests/test_data/HIFI00195790.nxs +0 -0
@@ -0,0 +1,21 @@
1
+ name: 'Check For Merge Conflicts'
2
+ on:
3
+ push:
4
+ branches:
5
+ - 'main'
6
+ pull_request:
7
+ types: [opened, synchronize, reopened]
8
+
9
+ jobs:
10
+ label-conflicts:
11
+ runs-on: ubuntu-slim
12
+ steps:
13
+ - uses: prince-chrismc/label-merge-conflicts-action@v1
14
+ with:
15
+ conflict_label_name: "Has Conflicts"
16
+ github_token: ${{ secrets.GITHUB_TOKEN }}
17
+ # These are optional incase you need to adjust for the limitations described below
18
+ max_retries: 5
19
+ wait_ms: 15000
20
+ detect_merge_changes: false
21
+ conflict_comment: ":wave: Hi, @${author},\n\nConflicts have been detected against the base branch. Please rebase your branch against the base branch."
@@ -0,0 +1,41 @@
1
+ name:
2
+
3
+ on:
4
+ push:
5
+
6
+ env:
7
+ CARGO_TERM_COLOR: always
8
+
9
+ jobs:
10
+ format:
11
+ name: Check formatting
12
+ runs-on: ubuntu-slim
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: dtolnay/rust-toolchain@stable
16
+ with:
17
+ components: rustfmt
18
+ - run: cargo fmt --check
19
+
20
+ lint:
21
+ name: Lint
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ - uses: dtolnay/rust-toolchain@stable
26
+ with:
27
+ components: clippy
28
+ - run: cargo clippy --all-targets --all-features -- -D warnings
29
+
30
+ linux:
31
+ name: Run unit tests
32
+ needs: [lint, format]
33
+ strategy:
34
+ matrix:
35
+ os: [windows-latest, ubuntu-latest, macOS-latest]
36
+ runs-on: ${{ matrix.os }}
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - uses: dtolnay/rust-toolchain@stable
40
+ - run: cargo test --verbose
41
+
@@ -0,0 +1,187 @@
1
+ # This file is autogenerated by maturin v1.13.3
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: Build and release
7
+
8
+ on:
9
+ push:
10
+ tags:
11
+ - '*'
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ linux:
19
+ runs-on: ${{ matrix.platform.runner }}
20
+ strategy:
21
+ matrix:
22
+ platform:
23
+ - runner: ubuntu-latest
24
+ target: x86_64
25
+ - runner: ubuntu-latest
26
+ target: x86
27
+ - runner: ubuntu-latest
28
+ target: aarch64
29
+ - runner: ubuntu-latest
30
+ target: armv7
31
+ - runner: ubuntu-latest
32
+ target: s390x
33
+ - runner: ubuntu-latest
34
+ target: ppc64le
35
+ steps:
36
+ - uses: actions/checkout@v6
37
+ - uses: actions/setup-python@v6
38
+ with:
39
+ python-version: "3.8"
40
+ - name: Build wheels
41
+ uses: PyO3/maturin-action@v1
42
+ with:
43
+ target: ${{ matrix.platform.target }}
44
+ args: --release --out dist --find-interpreter
45
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
46
+ manylinux: auto
47
+ before-script-linux: |
48
+ pip install --upgrade cmake
49
+ - name: Upload wheels
50
+ uses: actions/upload-artifact@v6
51
+ with:
52
+ name: wheels-linux-${{ matrix.platform.target }}
53
+ path: dist
54
+
55
+ musllinux:
56
+ runs-on: ${{ matrix.platform.runner }}
57
+ strategy:
58
+ matrix:
59
+ platform:
60
+ - runner: ubuntu-latest
61
+ target: x86_64
62
+ - runner: ubuntu-latest
63
+ target: x86
64
+ - runner: ubuntu-latest
65
+ target: aarch64
66
+ - runner: ubuntu-latest
67
+ target: armv7
68
+ steps:
69
+ - uses: actions/checkout@v6
70
+ - uses: actions/setup-python@v6
71
+ with:
72
+ python-version: "3.8"
73
+ - name: Build wheels
74
+ uses: PyO3/maturin-action@v1
75
+ with:
76
+ target: ${{ matrix.platform.target }}
77
+ args: --release --out dist --find-interpreter
78
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
79
+ manylinux: musllinux_1_2
80
+ before-script-linux: |
81
+ pip install --upgrade cmake
82
+ - name: Upload wheels
83
+ uses: actions/upload-artifact@v6
84
+ with:
85
+ name: wheels-musllinux-${{ matrix.platform.target }}
86
+ path: dist
87
+
88
+ windows:
89
+ runs-on: ${{ matrix.platform.runner }}
90
+ strategy:
91
+ matrix:
92
+ platform:
93
+ - runner: windows-latest
94
+ target: x64
95
+ python_arch: x64
96
+ - runner: windows-latest
97
+ target: x86
98
+ python_arch: x86
99
+ - runner: windows-11-arm
100
+ target: aarch64
101
+ python_arch: arm64
102
+ steps:
103
+ - uses: actions/checkout@v6
104
+ - uses: actions/setup-python@v6
105
+ with:
106
+ python-version: "3.13"
107
+ architecture: ${{ matrix.platform.python_arch }}
108
+ - name: Build wheels
109
+ uses: PyO3/maturin-action@v1
110
+ with:
111
+ target: ${{ matrix.platform.target }}
112
+ args: --release --out dist --find-interpreter
113
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
114
+ - name: Upload wheels
115
+ uses: actions/upload-artifact@v6
116
+ with:
117
+ name: wheels-windows-${{ matrix.platform.target }}
118
+ path: dist
119
+
120
+ macos:
121
+ runs-on: ${{ matrix.platform.runner }}
122
+ strategy:
123
+ matrix:
124
+ platform:
125
+ - runner: macos-15-intel
126
+ target: x86_64
127
+ - runner: macos-latest
128
+ target: aarch64
129
+ steps:
130
+ - uses: actions/checkout@v6
131
+ - uses: actions/setup-python@v6
132
+ with:
133
+ python-version: "3.8"
134
+ - name: Build wheels
135
+ uses: PyO3/maturin-action@v1
136
+ with:
137
+ target: ${{ matrix.platform.target }}
138
+ args: --release --out dist --find-interpreter
139
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
140
+ - name: Upload wheels
141
+ uses: actions/upload-artifact@v6
142
+ with:
143
+ name: wheels-macos-${{ matrix.platform.target }}
144
+ path: dist
145
+
146
+ sdist:
147
+ runs-on: ubuntu-latest
148
+ steps:
149
+ - uses: actions/checkout@v6
150
+ - name: Build sdist
151
+ uses: PyO3/maturin-action@v1
152
+ with:
153
+ command: sdist
154
+ args: --out dist
155
+ - name: Upload sdist
156
+ uses: actions/upload-artifact@v6
157
+ with:
158
+ name: wheels-sdist
159
+ path: dist
160
+
161
+ release:
162
+ name: Release
163
+ runs-on: ubuntu-latest
164
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
165
+ needs: [linux, musllinux, windows, macos, sdist]
166
+ permissions:
167
+ # Use to sign the release artifacts
168
+ id-token: write
169
+ # Used to upload release artifacts
170
+ contents: write
171
+ # Used to generate artifact attestation
172
+ attestations: write
173
+ steps:
174
+ - uses: actions/download-artifact@v7
175
+ - name: Generate artifact attestation
176
+ uses: actions/attest@v4
177
+ with:
178
+ subject-path: 'wheels-*/*'
179
+ - name: Install uv
180
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
181
+ uses: astral-sh/setup-uv@v7
182
+ - name: Publish to PyPI
183
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
184
+ run: uv publish 'wheels-*/*'
185
+ env:
186
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
187
+
@@ -0,0 +1,82 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # API documentation (should be freshly built when docs built)
66
+ docs/source/_static/api/*
67
+ !docs/source/_static/api/README.md
68
+
69
+ # PyCharm
70
+ .idea/
71
+
72
+ # VSCode
73
+ .vscode/
74
+
75
+ # Pyenv
76
+ .python-version
77
+
78
+ # direnv
79
+ .envrc
80
+
81
+ # jupyter
82
+ .ipynb_checkpoints
@@ -0,0 +1,23 @@
1
+ version: 2
2
+
3
+ sphinx:
4
+ # Path to your Sphinx configuration file.
5
+ configuration: docs/source/conf.py
6
+
7
+ python:
8
+ install:
9
+ - method: pip
10
+ path: .
11
+ extra_requirements:
12
+ - docs
13
+
14
+ build:
15
+ os: ubuntu-24.04
16
+ apt_packages:
17
+ - cmake
18
+ tools:
19
+ python: "3.13"
20
+ rust: "1.96"
21
+ jobs:
22
+ pre_build:
23
+ - cargo doc --document-private-items --no-deps --target-dir "./docs/source/_static/api/"