Skip to content

feat(transform): add standardize text case transformation - #747

Open
YADUNANDAN-SINGH wants to merge 1 commit into
c2siorg:mainfrom
YADUNANDAN-SINGH:feat/standardize-case
Open

YADUNANDAN-SINGH wants to merge 1 commit into
c2siorg:mainfrom
YADUNANDAN-SINGH:feat/standardize-case

Conversation

@YADUNANDAN-SINGH

Copy link
Copy Markdown
Contributor

Description

Adds the standardizeCase transformation to convert string column values (or "All string columns", matching TrimWhitespaceForm) to lowercase, UPPERCASE, Title Case, or Sentence case, and wires it directly into Quality Assessment casing remediation.

Previously, quality_service.suggest_remediations mapped subtype == "casing" issues to stringReplace as a placeholder workaround, which could only replace a single substring at a time rather than normalizing column casing.

What's included

  • Backend (dataloom-backend/)
    • Added OperationType.standardizeCase, CaseType (lower, upper, title, sentence), StandardizeCaseParams, and standardize_case_params on TransformationInput.
    • Implemented pure standardize_case(df, column, case_type) in transformation_service.py supporting both single columns and "All string columns", preserving missing values (None/NaN), and rejecting non-text columns (int, float, bool, nullable bool, datetime) with TransformationError.
    • Registered OperationType.standardizeCase in TRANSFORMATION_REGISTRY (reusable=True) for preview, commit, undo/redo, pipeline replay, and provenance summaries.
    • Updated quality_service.suggest_remediations so subtype == "casing" points to "standardizeCase".
  • Frontend (dataloom-frontend/)
    • Added STANDARDIZE_CASE operation constant and pipeline step label/summary formatting (column → case_type).
    • Added docked StandardizeCaseForm component with "All string columns" support, preview/save workflow, pipeline step capture (onCapture), and unmount safety, registered under Data ▸ Transform (Text Case).
    • Wired standardizeCase into QualityAssessmentView (Standardize case remediation action button).

Fixes #746

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

How Has This Been Tested?

  • Backend:

    • uv run ruff check . and uv run ruff format --check .
    • uv run pytest (all 1,554 tests pass, including new unit tests in tests/test_transformations.py, schema/registry/HTTP preview-commit-undo-redo tests in tests/test_standardize_case_transformation.py, and quality remediation tests in tests/test_quality.py)
  • Frontend:

    • npm run lint (eslint --max-warnings 0 + tsc --noEmit), Prettier check, and npm run build
    • npm run test (all 85 test files / 649 tests pass, including StandardizeCaseForm.test.tsx, QualityAssessmentView.test.tsx, pipelineStepText.test.ts, and operationTypes.test.ts)
  • Existing tests pass

  • New tests added

  • Manual testing

Screenshots

image image

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review
  • I have added/updated documentation as needed
  • My changes generate no new warnings
  • Tests pass locally

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.

feat(transform): add standardizeCase operation and wire it to the "casing" quality remediation

1 participant