fix(describegpt): semanticmd review follow-ups for #3935 (stats/validation gating + tests)#3936
Merged
Merged
Conversation
…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>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_statsnow considersstats.sparsity, so a column whose only retained stat issparsity(e.g. via a custom--addl-cols-list) still renders the### Statisticsblock — consistent with the Sparsity column the table renders.min_length/max_lengthis present (- Length >= N/- Length <= Nvia minijinjaelif), avoiding an empty### Validationblock.yaml_scalaroutput: URL, spacedtitle/license, and theYYYY-MM-DDdate are quoted; plainlat/lonare unquoted.Regression tests (roborev follow-up):
formattersunit tests:build_semanticmd_entrysetshas_statsfor a sparsity-only numeric column, andhas_validationfor a text column with only one ofmin_length/max_length.describegptrender test: a full semanticmd render asserting the### Statisticsblock appears for a sparsity-only numeric column and theeliflength branches emit- Length >= N/- Length <= N(never an empty### Validationblock).Verification
cargo +nightly fmtcleancargo test -F all_features describegpt— 77 integration + semanticmd unit tests pass (3 new)cargo clippy -F all_features --bin qsvclean🤖 Generated with Claude Code