Skip to content

fix(describegpt): semanticmd review follow-ups for #3935 (stats/validation gating + tests)#3936

Merged
jqnatividad merged 2 commits into
masterfrom
fix/semanticmd-review-followups
Jun 2, 2026
Merged

fix(describegpt): semanticmd review follow-ups for #3935 (stats/validation gating + tests)#3936
jqnatividad merged 2 commits into
masterfrom
fix/semanticmd-review-followups

Conversation

@jqnatividad

Copy link
Copy Markdown
Collaborator

Follow-up fixes for the semanticmd Data Dictionary work that was squash-merged in #3935. These two commits were made locally after the squash-merge and weren't part of that PR, so they're landing here.

What changed

Review fixes (Copilot review of #3935):

  • has_stats now considers stats.sparsity, so a column whose only retained stat is sparsity (e.g. via a custom --addl-cols-list) still renders the ### Statistics block — consistent with the Sparsity column the table renders.
  • The SemanticMd template renders the length constraint gracefully when only one of min_length/max_length is present (- Length >= N / - Length <= N via minijinja elif), avoiding an empty ### Validation block.
  • The committed reference doc frontmatter now matches actual yaml_scalar output: URL, spaced title/license, and the YYYY-MM-DD date are quoted; plain lat/lon are unquoted.

Regression tests (roborev follow-up):

  • formatters unit tests: build_semanticmd_entry sets has_stats for a sparsity-only numeric column, and has_validation for a text column with only one of min_length/max_length.
  • describegpt render test: a full semanticmd render asserting the ### Statistics block appears for a sparsity-only numeric column and the elif length branches emit - Length >= N / - Length <= N (never an empty ### Validation block).

Verification

  • cargo +nightly fmt clean
  • cargo test -F all_features describegpt — 77 integration + semanticmd unit tests pass (3 new)
  • cargo clippy -F all_features --bin qsv clean

🤖 Generated with Claude Code

jqnatividad and others added 2 commits June 2, 2026 16:08
…atter

- has_stats now considers stats.sparsity, so a column whose only retained
  stat is sparsity (custom --addl-cols-list) still renders the Statistics block
- Validation length constraint renders gracefully when only one of
  min_length/max_length is present, avoiding an empty ### Validation block
- reference SemanticMd doc frontmatter now matches yaml_scalar output:
  URL, spaced title, license, and YYYY-MM-DD date quoted; plain lat/lon unquoted

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d length (job 2672)

Adds regression tests for the review-driven edge cases in 818e868:
- formatters: build_semanticmd_entry sets has_stats for a numeric column
  whose only retained stat is sparsity, and has_validation for a text column
  with only one of min_length/max_length
- describegpt: a full semanticmd render asserting the ### Statistics block
  appears for a sparsity-only numeric column and the elif length branches
  emit `- Length >= N` / `- Length <= N` (never an empty ### Validation block)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread src/cmd/describegpt.rs Dismissed
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@jqnatividad jqnatividad merged commit b660470 into master Jun 2, 2026
18 checks passed
@jqnatividad jqnatividad deleted the fix/semanticmd-review-followups branch June 2, 2026 20:16
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