Skip to content

Conversation

@marklondon999
Copy link
Contributor

@marklondon999 marklondon999 commented Jul 23, 2025

📌 Pull Request Template

I want to refactor the LabelAccuracy class by subdividing its responsibilities into distinct components  
so that the codebase is easier to maintain, test, and extend for future evaluation workflows.

Description:
The current LabelAccuracy class handles multiple responsibilities including data preprocessing, validation, accuracy computation, and visualisation.

This refactor will involve breaking the class into smaller, purpose-specific modules or methods, such as:

Preprocessing: Handling input formatting, missing values, and column setup.
Accuracy Evaluation: Computing full and 2-digit match accuracy, Jaccard similarity, etc.
Visualisation: Generating plots, heatmaps, and summary displays.

Acceptance Criteria:

[ ] LabelAccuracy is refactored into clearly defined subcomponents or methods.
[ ] Each component has a single, well-defined responsibility.
[ ] Unit tests are updated or added for each new component.
[ ] No change in output or evaluation results from the original implementation.
[ ] Code is peer reviewed and merged.

✅ Checklist

Please confirm you've completed these checks before requesting a review.

  • Code is formatted using Black
  • Imports are sorted using isort
  • Code passes linting with Ruff, Pylint, and Mypy
  • Security checks pass using Bandit
  • API and Unit tests are written and pass using pytest
  • Terraform files (if applicable) follow best practices and have been validated (terraform fmt & terraform validate)
  • DocStrings follow Google-style and are added as per Pylint recommendations
  • Documentation has been updated if needed

🔍 How to Test

…a_for_analysis.py to allow full end to end run
@marklondon999 marklondon999 changed the title lint check - no changes SA-240_Refactor_LabelAccuracy_Class Jul 23, 2025
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