docs: describe every module, and fix four broken README examples - #66
Open
snesmaeili wants to merge 2 commits into
Open
docs: describe every module, and fix four broken README examples#66snesmaeili wants to merge 2 commits into
snesmaeili wants to merge 2 commits into
Conversation
The code has moved ahead of the public-facing story. The source tree ships
asr, dss, icanclean, sns, spectrum_interpolation and zapline, but the README
never mentioned ASR once, and the package description still read "Denoising
Source Separation (DSS) and ZapLine algorithms for MNE-Python".
Reframe the README around choosing a method by contamination structure, with
a table mapping problem -> method -> the information that method uses, and
cover all six modules.
Four Quick Start examples were broken. Each now executes; all seven snippets
in the file were run against synthetic data before committing.
- ZapLine-plus printed `zapline_plus.detected_freq_`, which does not
exist -> AttributeError. The detected frequency lives in
`adaptive_results_["line_freq"]`.
- `dss.transform(epochs, return_type="epochs")` -> TypeError. `transform`
takes only (self, X); `return_type` is a constructor argument.
- `BandpassBias(sfreq=..., freq=10, bandwidth=4)` -> TypeError. The
signature is `BandpassBias(freq_band=(lo, hi), sfreq=...)`.
- The adaptive ZapLine example did not say that adaptive mode calibrates
and cleans together, so it requires fit_transform().
Also add asr, artifact-removal, icanclean and line-noise to the packaging
keywords, and replace the "specializes in DSS" opening of the docs landing
page with the same capability table.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6GFfnt85ZSjuRaDrETwpU
ruff 0.16 formats Python code blocks inside Markdown; 0.15 did not. CI installs ruff unpinned, so it picked up the new behaviour and rejected the aligned trailing comments and wrapped call in the DSS example. Cosmetic only -- the example code itself is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6GFfnt85ZSjuRaDrETwpU
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66 +/- ##
=======================================
Coverage 95.77% 95.77%
=======================================
Files 68 68
Lines 8565 8565
Branches 1512 1512
=======================================
Hits 8203 8203
Misses 175 175
Partials 187 187
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The code has moved ahead of the public-facing story.
mne_denoise/ships asr, dss, icanclean, sns, spectrum_interpolation and zapline, but:pyproject.tomlstill described the project as "Denoising Source Separation (DSS) and ZapLine algorithms for MNE-Python"docs/index.rstopened with "specializes in Denoising Source Separation (DSS)"Counting mentions before this PR: DSS 20, ZapLine 17, ASR 0, iCanClean 0, spectrum_interpolation 0, SNS 0.
What changed
Reframed the README around choosing a method by contamination structure — a table mapping problem → method → the information that method uses — and covered all six modules. Same table now opens the docs landing page.
Four Quick Start examples were broken
These are exactly the lines a new user copy-pastes. Each is now fixed, and all seven snippets in the README were executed against synthetic data before committing (7 passed, 0 failed).
zapline_plus.detected_freq_AttributeError— attribute does not existadaptive_results_["line_freq"]dss.transform(epochs, return_type="epochs")TypeError—transformtakes only(self, X)return_typeset on the constructorBandpassBias(sfreq=..., freq=10, bandwidth=4)TypeErrorBandpassBias(freq_band=(8.0, 12.0), sfreq=...)fit/transformworkfit_transformAlso added
asr,artifact-removal,icanclean,line-noiseto the packaging keywords so the project is findable by what it does.Notes