Skip to content

Fix typos in code comments and one assert message - #213

Open
Avicennasis wants to merge 1 commit into
uber:masterfrom
Avicennasis:docs/fix-typos
Open

Avicennasis wants to merge 1 commit into
uber:masterfrom
Avicennasis:docs/fix-typos

Conversation

@Avicennasis

Copy link
Copy Markdown

Summary

Fixes 9 verified typos, 8 of them in JSDoc / // comments and 1 in an assert() message. No identifier is renamed. Every Wrong string was re-checked against live master (ef5088c) immediately before editing.

  • modules/mlvis-common/src/utils/kmeans.js: distnace -> distance (JSDoc example prose, lines 100 and 105) and nInscances -> nInstances (shape annotations, lines 58, 81, 84 and 114). nInscances is never used as an identifier anywhere in the repo - it only ever appears inside comments, and the surrounding annotations already spell it nInstances (e.g. lines 5, 38, 55, 180).
  • modules/manifold/src/utils/kepler-utils.js line 85: // no need to create 2 layers if this is an agregated layer -> aggregated.
  • modules/manifold/src/actions/io-actions.js line 61: the TODO comment refers to `parsePromse`; the real symbol is parsePromise, imported on line 2 and used on line 52. Comment only.
  • modules/manifold/src/selectors/compute.js line 144: the assert message 'must provide `nClusters for automatic segmentation' was missing its closing backtick. The parallel assert six lines above correctly reads 'must provide `segmentFilters` for manual segmentation'.

Please note

The compute.js change is the only one that is not purely a comment: it alters the text of an assert() message that a developer would see when nClusters is missing. No test in the repo asserts on that string (grepped for for automatic segmentation - the source line is the only hit), so nothing should break, but it is worth a look.

Deliberately not changed

idsInSegmentgroups in kepler-utils.js and _renderXAxies in jupyter-ma-causal/.../multi-line-chart/index.js were flagged by the same scan, but both are real identifiers (a function parameter declared at lines 44, 78 and 142, and a class method defined at line 74 and called at line 261). Renaming them is out of scope for a typo PR, and the @param tags must keep matching the actual parameter names, so they are left untouched.

CLA

The contributor has signed / is signing Uber's Contributor License Agreement at https://cla-assistant.io/uber/manifold, as required by CONTRIBUTING.md. The cla-assistant check should go green on this PR.

Testing

CONTRIBUTING.md asks for "appropriate test cases" with each patch. This change touches only comments and one assertion message, so there is no behaviour to add a test for; no existing test references any of the changed strings.

Corrects 9 verified spelling/typo issues. All but one are inside JSDoc or
// comments; no identifier is renamed.

- modules/mlvis-common/src/utils/kmeans.js: 'distnace' -> 'distance' (x2),
  'nInscances' -> 'nInstances' (x4) - all in JSDoc/inline comments; the
  misspelling is never used as an identifier.
- modules/manifold/src/utils/kepler-utils.js: 'agregated' -> 'aggregated'.
- modules/manifold/src/actions/io-actions.js: TODO comment referenced
  'parsePromse'; the real imported symbol is 'parsePromise'.
- modules/manifold/src/selectors/compute.js: the assert message
  'must provide `nClusters for automatic segmentation' was missing its
  closing backtick, unlike the parallel 'segmentFilters' assert above it.

Signed-off-by: Léon Avic Simmons <Avicennasis@gmail.com>
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.

1 participant