Skip to content

Docs: style pass over the user guide and tutorial; fix two broken snippets - #92

Merged
kjs11 merged 2 commits into
masterfrom
docs/style-pass
Nov 2, 2026
Merged

kjs11 merged 2 commits into
masterfrom
docs/style-pass

Conversation

@wenh06

@wenh06 wenh06 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Companion to the concepts-page style pass (PR #90). Standard: formal, declarative academic register (paper writing), no casual/journalistic phrasing, no anthropomorphism, no machine-translation patterns.

Language fixes

  • user_guide/index: 'walks through the package the way you would use it' -> 'follows the typical usage flow'; 'lifted from' -> 'taken from'
  • tutorial: 'five-minute tour' -> 'short introduction'; 'live in' -> 'are provided in'; 'one-liner to reload' -> 'reloaded with a single call'
  • user_guide/training: 'The trainer in one paragraph' -> 'Overview'; 'owns the training loop' -> 'implements the training loop'; 'you define what is trained' -> 'the subclass defines'; 'What you get for free' -> 'Provided by the base class'; 'your inference loop' / 'in your DataLoaders' -> definite article
  • user_guide/evaluation: 'ship with' -> 'are provided with' / 'provides' (x3); 'scalar predictions' -> 'predicted probabilities'
  • examples: 'double as' -> 'also serve as'; 'Highlights to look for' -> 'Points to note'
  • models: garbled 'the number of classes/leads-out' -> 'the class list and the number of leads'

Correctness fixes (found by executing the snippets)

The tutorial and user_guide/models snippets had never been run:

  • ECG_CRNN_CONFIG.copy() / LUDBTrainCfg.copy(): dict.copy() on a CFG returns a plain dict, so the next attribute assignment raises AttributeError (exactly the pitfall the new concepts page documents). Both now use copy.deepcopy.
  • ECG_CRNN(config, n_leads=12, n_classes=26): wrong signature; the constructor is ECG_CRNN(classes, n_leads, config).
  • config.cnn.name = "resnet_block_leadwise": no such block key in the config; replaced with resnet_nature_comm_bottle_neck_se.
  • compute_output_shape(bs=2, input_len=4000): wrong keyword names; the signature is compute_output_shape(seq_len, batch_size), verified to return (2, n_classes).

All corrected snippets were executed before being written down.

Verification

…n snippets

Language: apply the formal, declarative register of the paper writing
to the pages added in the docs overhaul -- no casual/journalistic
phrasing, no anthropomorphism:

- 'walks through the package the way you would use it' -> 'follows the
  typical usage flow'; 'lifted from' -> 'taken from'; 'five-minute
  tour' -> 'short introduction'; 'live in' -> 'are provided in'
- 'The trainer in one paragraph' -> 'Overview'; 'owns the training
  loop' -> 'implements'; 'you define what is trained' -> 'the subclass
  defines'; 'What you get for free' -> 'Provided by the base class';
  'your inference loop'/'in your DataLoaders' -> definite article
- 'ship with' -> 'are provided with'/'provides' (x3); 'scalar
  predictions' -> 'predicted probabilities'; 'double as' -> 'also
  serve as'; 'Highlights to look for' -> 'Points to note'
- garbled 'the number of classes/leads-out' -> 'the class list and
  the number of leads'

Correctness (found by executing the snippets; they had never been
run):

- tutorial and user_guide/models used 'ECG_CRNN_CONFIG.copy()' /
  'LUDBTrainCfg.copy()' -- dict.copy() on a CFG returns a plain dict,
  so the very next attribute assignment raises AttributeError (the
  pitfall the concepts page documents); both now use copy.deepcopy
- 'ECG_CRNN(config, n_leads=12, n_classes=26)' -- wrong signature; the
  constructor is ECG_CRNN(classes, n_leads, config)
- 'config.cnn.name = "resnet_block_leadwise"' -- no such block key;
  replaced with 'resnet_nature_comm_bottle_neck_se'
- 'compute_output_shape(bs=2, input_len=4000)' -- wrong keyword
  names; the signature is compute_output_shape(seq_len, batch_size),
  verified to return (2, n_classes)

All corrected snippets executed against the package before writing
them down.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-29T03:59:20.737125Z
We couldn’t complete this review. Comment @codex review to try again.
6427978 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.76%. Comparing base (53c0998) to head (61799f6).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
- Coverage   93.47%   92.76%   -0.71%     
==========================================
  Files         138      138              
  Lines       18628    18628              
==========================================
- Hits        17412    17280     -132     
- Misses       1216     1348     +132     
Flag Coverage Δ
core 67.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

@kjs11
kjs11 enabled auto-merge November 2, 2026 12:42
@kjs11
kjs11 added this pull request to the merge queue Nov 2, 2026
@kjs11

kjs11 commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

No need to make these changes a PR?

Merged via the queue into master with commit 5354ab7 Nov 2, 2026
17 of 18 checks passed
@wenh06
wenh06 deleted the docs/style-pass branch November 11, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants