Validate measures_labels length in correlation analysis

Open Beginner friendly
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
data

Research direction

Start by reading src/circumplex/analysis/corr_analysis.py:107-110 and the downstream label construction at lines 228-268. Add tests for matching and mismatched custom label lengths, then run the relevant test suite; done means mismatches raise a clear ValueError while valid lengths continue successfully.

Written by the indexing model from the issue text.

Description

Summary

corr_analysis() accepts measures_labels, but it does not validate that the labels list matches the number of measures.

Problem

measures_labels is used downstream to build labels for results rows, but there is no explicit length check against measures. A mismatched list can lead to malformed labels or downstream shape/logic errors.

Evidence

  • src/circumplex/analysis/corr_analysis.py:107-110
  • downstream label construction in src/circumplex/analysis/corr_analysis.py:228-268

Proposed work

  • Validate that len(measures_labels) == len(measures) whenever custom labels are provided.
  • Raise a clear ValueError when the lengths do not match.
  • Add tests covering mismatched and valid label lengths.

Acceptance criteria

  • Invalid measures_labels length is caught immediately with a clear error.
  • Tests cover both success and failure cases.
Dominant language
Python
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MitchellAcoustics/circumplex

All issues in MitchellAcoustics/circumplex

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.