Skip to content

[DOC] Improve example quality and API doc clarity - #124

Merged
nbara merged 18 commits into
masterfrom
docs/example-gallery-quality-pass1
Jul 20, 2026
Merged

[DOC] Improve example quality and API doc clarity#124
nbara merged 18 commits into
masterfrom
docs/example-gallery-quality-pass1

Conversation

@nbara

@nbaranbara commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

This PR improves the documentation quality of the package in two ways:

  • rewrites and extends several example scripts to make them more didactic
  • tightens public API docstrings so parameters/returns are clearer and more consistent with the code

What changed

  • improved the teaching narrative of the example gallery, with clearer goals, interpretation hints, and simple quantitative checks
  • added a new ASR example focused on calibration sensitivity
  • regenerated the corresponding example notebooks
  • cleaned up docstrings across core public utilities and methods

@nbaranbara changed the title Improve example didactics and API doc clarity[DOC] Improve example quality and API doc clarityJul 20, 2026
@nbaranbara added the maintenance Code maintenance label Jul 20, 2026
@nbaranbara self-assigned this Jul 20, 2026
@codecov

codecovBot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.29%. Comparing base (2c09b8f) to head (5a48c91).

Files with missing linesPatch %Lines
meegkit/utils/testing.py83.33%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #124 +/- ##
==========================================
- Coverage 83.30% 83.29% -0.02% 
==========================================
Files 25 25 Lines 2857 2861 +4 ==========================================
+ Hits 2380 2383 +3 - Misses 477 478 +1 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on improving the package’s documentation and example gallery by making example scripts more didactic (added interpretation guidance + simple quantitative checks) and by tightening/expanding docstrings across many public utilities.

Changes:

  • Expanded docstrings across meegkit utilities to clarify parameters/returns and improve narrative consistency.
  • Updated multiple example scripts with clearer interpretation hints and simple quantitative diagnostics; added a new ASR calibration-sensitivity example (+ notebook).
  • Extended create_line_data to accept an optional RNG for reproducible examples.

Reviewed changes

Copilot reviewed 30 out of 40 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
meegkit/utils/testing.pyAdds rng parameter and updates docstring for synthetic line-noise data generation.
meegkit/utils/stats.pyExpands docstrings for rms and robust_mean; clarifies rolling_corr API compatibility.
meegkit/utils/sig.pyAdds/repairs docstrings for signal utilities (e.g., envelope, slope-sum, prony); fixes a parameter name typo in docs.
meegkit/utils/matrix.pyImproves docstrings for shape helpers and fold/unfold/matmul utilities.
meegkit/utils/denoise.pyExpands docstrings for trial means, weighted power, and outlier-sample detection.
meegkit/utils/covariances.pyClarifies parameter docs for covariance functions (padding/estimator, X vs Y).
meegkit/utils/coherence.pyExpands docstrings for spectrogram/polycoherence plotting helpers and synthetic signal docs.
meegkit/utils/base.pyAdds parameter/return docs for mrdivide and mldivide.
meegkit/utils/auditory.pyExpands docstrings for ERB conversions and filterbank class init params.
meegkit/utils/asr.pyExpands docstrings for ASR helpers (yulewalk, polystab, numf, denf) and parameter naming.
meegkit/trca.pyAdds documentation updates for TRCA-related functions (one doc mismatch noted in comments).
meegkit/sns.pyExpands docstring for sns1 with parameters/returns.
meegkit/detrend.pyCorrects/expands docstrings for detrending and ringing reduction APIs.
meegkit/cca.pyClarifies parameter docs for nt_cca; expands whitening function docstrings.
meegkit/asr.pyExpands docstrings for ASR entry points and state/weight handling; adds sfreq/show/sample_weight docs.
examples/example_trca.pyAdds post-run summary plots and interpretation text for TRCA performance stability.
examples/example_star.pyAdds narrative and quantitative correlation checks vs clean reference; improves plot labeling.
examples/example_star_dss.pyAdds narrative and quantitative “corr with target” comparisons for DSS vs STAR+DSS.
examples/example_ress.pyAdds narrative + target-bin vs neighboring SNR quantitative checks and labeling.
examples/example_phase_estimation.pyRemoves test-import dependency by inlining helpers and adds printed mean absolute errors (indentation consistency noted).
examples/example_mcca.pyRefactors repeated plotting into a helper and adds didactic narration (indentation consistency noted).
examples/example_mcca_2.pyAdds didactic framing and prints correlation with the known target signal.
examples/example_mcca_2.ipynbRegenerated notebook to match updated script narrative and outputs.
examples/example_dss.pyAdds quantitative correlation checks vs ground truth and improves plot labeling.
examples/example_dss_line.pyUses seeded RNG via create_line_data(rng=...) and adds a simple PSD line-bin metric + interpretation.
examples/example_dering.pyImproves narrative and adds a simple quantitative ringing proxy metric.
examples/example_asr.pyAdds workflow narration + RMS attenuation summary plot and calibration-retention reporting.
examples/example_asr_calibration_sensitivity.pyNew tutorial example comparing ASR attenuation across calibration windows.
examples/example_asr_calibration_sensitivity.ipynbNew notebook generated from the calibration-sensitivity example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadmeegkit/trca.py Outdated
Comment threadmeegkit/utils/testing.py Outdated
Comment threadexamples/example_phase_estimation.py Outdated
Comment threadexamples/example_phase_estimation.py Outdated
Comment threadexamples/example_mcca.py Outdated
@nbara
nbara merged commit 8c9d449 into masterJul 20, 2026
7 checks passed
@nbara
nbara deleted the docs/example-gallery-quality-pass1 branch July 20, 2026 17:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenanceCode maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@nbara