Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (121 loc) · 4.98 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (121 loc) · 4.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[build-system]
requires = ["setuptools>=64.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "pamica"
version = "0.4.1.dev1"
description = "pAMICA: Python implementation of the Adaptive Mixture ICA algorithm"
readme = "README.md"
authors = [
{name = "Seyed Yahya Shirazi", email = "shirazi@ieee.org"},
]
maintainers = [
{name = "Seyed Yahya Shirazi", email = "shirazi@ieee.org"},
]
license = {text = "BSD-3-Clause"}
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering"
]
requires-python = ">=3.12"
dependencies = [
"numpy",
"scipy",
"matplotlib",
"tqdm",
"json5",
"torch>=2.12.1",
"threadpoolctl>=3",
]
# Optional Apple-Silicon GPU backend (AMICAMLXNG). MLX is Apple-only, so it is
# NOT a core dependency; install with `uv pip install mlx` or `pip install
# pamica[mlx]`. `import pamica` never requires it (mlx_impl is imported lazily).
[project.optional-dependencies]
mlx = ["mlx>=0.32"]
# Documentation stack (MkDocs Material + mkdocstrings). Built and deployed to
# GitHub Pages by .github/workflows/docs.yml via `uv sync --extra docs`.
docs = [
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.26",
"mkdocs-git-revision-date-localized-plugin>=1.2",
]
# Visualization for the benchmark sweeps: MNE builds the scalp-map montage for
# the IC topomaps and (issue #91) the distributed channel-subset positions.
viz = ["mne>=1.6"]
# MNE-Python compatibility layer (AMICAICA, issue #139). MNE is not a core
# dependency, so install with `pip install pamica[mne]`; `import pamica` never
# requires it (pamica.mne_compat is imported lazily, same pattern as mlx).
mne = ["mne>=1.6"]
[project.urls]
Homepage = "https://github.com/sccn/pAMICA"
Repository = "https://github.com/sccn/pAMICA"
Documentation = "https://eeglab.org/pAMICA/"
Changelog = "https://eeglab.org/pAMICA/changelog/"
[tool.setuptools]
# List subpackages explicitly so the wheel is deterministic across platforms
# (a bare ["pamica"] dropped torch_impl/ on some setuptools versions).
packages = ["pamica", "pamica.numpy_impl", "pamica.torch_impl", "pamica.mlx_impl", "pamica.metrics", "pamica.native", "pamica.mne_compat"]
# numpy_impl/params.json is the NumPy backend's default parameter file, loaded at
# runtime via importlib/__file__, so it must ship in the wheel.
package-data = {"pamica.numpy_impl" = ["params.json"]}
[dependency-groups]
dev = [
"pre-commit>=4.0",
"pytest>=9.1.1",
"pytest-cov>=7.1.0",
"pytest-xdist>=3.6.1",
"ruff>=0.15.0",
"ty>=0.0.57",
]
[tool.coverage.run]
source = ["pamica"]
branch = true
omit = [
"pamica/tests/*",
# argparse CLI entrypoint: exercised via subprocess, not unit-covered here.
"pamica/numpy_impl/cli.py",
# Optional MLX backend (Apple Silicon only): its tests require MLX + an Apple
# GPU. The `test-macos` job does now run them for real (issue #246), but it
# runs with --no-cov, so the coverage total still comes only from the ubuntu
# `test` job -- where mlx is absent and this package always measures 0%. The
# omission stays required until coverage is combined across both runners.
"pamica/mlx_impl/*",
# Optional MNE compatibility layer (issue #139): imports mne, absent from the
# base test env, so the base coverage run always measures 0%. Exercised by
# the dedicated `test-mne` CI job (uv sync --extra mne) on real sample EEG.
"pamica/mne_compat/*",
]
[tool.coverage.report]
show_missing = true
precision = 1
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@(abc\\.)?abstractmethod",
]
[tool.ty.src]
# .context/ holds point-in-time investigation/debugging artifacts (per
# AGENTS.md): frozen reproduction/prototype scripts for closed issues (e.g.
# issue-21/corrected_mstep_prototype.py, marked "do not ship as-is"), not
# maintained production code, so it is out of scope for type checking. Live
# analysis scripts that ARE tested (loaded via importlib from the test suite)
# were fixed on their own merits rather than excluded. (issue #122)
exclude = [".context/**"]
[tool.ty.rules]
# Optional-extra lazy imports (mne: benchmarks/benchmark_decompose.py; mlx:
# pamica/mlx_impl/core.py, benchmarks/benchmark_dimsweep.py) carry
# `# ty: ignore[unresolved-import]` comments, since CI's base env (no extras,
# matching the other jobs) can't resolve either. Whether such a comment is
# "used" or "unused" then depends on whether the local env happens to have the
# extra installed, so this rule would otherwise flip between a false pass and
# a false "unused-ignore-comment" warning depending on the developer's own
# environment rather than the code. Disabled project-wide rather than per-line
# since there's no per-environment suppression for the checker itself.
unused-ignore-comment = "ignore"