Repository navigation
Fix: more AR bugfixes and requested features - #48
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new isLettersOnly() logic can misclassify common multi-word road names (spaces) and the UNIQUE_ID calculation can still include apostrophes depending on rule execution order.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates several Arcade attribute rules and their Vitest coverage to normalize road-name casing, adjust UNIQUE_ID suffix ordering rules, and temporarily tolerate empty-string domain values during data cleanup.
Changes:
- Normalize
FULLNAME,NAME, andUNIQUE_IDoutputs to uppercase. - Update
unique_idsuffix ordering (POSTTYPE vs POSTDIR) based on whether NAME is “letters-only,” with new spatial tests. - Temporarily treat empty strings as acceptable for coded domains while upstream data cleanup is underway.
File summaries
| File | Description |
|---|---|
| attribute-rules/test/text_calculations.test.ts | Updates FULLNAME expectations for uppercase normalization; adds/adjusts related assertions. |
| attribute-rules/test/spatial_calculations.test.ts | Adds NationalGrid test datastore + new UNIQUE_ID ordering tests for numeric vs alphabetic names. |
| attribute-rules/test/format_name.test.ts | Switches to format_name.arcade and adds mixed-case uppercasing coverage. |
| attribute-rules/test/constrain_to_attribute_domain.test.ts | Adds test ensuring empty-string values are accepted during cleanup period. |
| attribute-rules/constraint/Roads_Edit/constrain_to_attribute_domain.arcade | Skips validation for null/empty-string values to avoid blocking edits during cleanup. |
| attribute-rules/calculation/Roads_Edit/unique_id.arcade | Uppercases components, adds “letters-only” check, and adjusts POSTTYPE/POSTDIR ordering accordingly. |
| attribute-rules/calculation/Roads_Edit/fullname_calculation.arcade | Uppercases normalized name parts so FULLNAME output is consistently uppercase. |
| attribute-rules/calculation/Roads_Edit/format_name.arcade | Removes apostrophes and uppercases NAME. |
Review details
Suppressed comments (1)
attribute-rules/test/text_calculations.test.ts:53
- This test block uses a different formatting/structure than the other tests in the file (inline
execute()call + nested braces). Reformatting to match the existing style will keep the file consistent and easier to read.
test("fullname_calculation omits missing name parts", () => {
expect(fullnameExecutor.execute({
"$feature": feature({
NAME: null,
POSTDIR: " n ",
- Files reviewed: 8/8 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
stdavis
previously approved these changes
Sep 3, 2026
stdavis
approved these changes
Sep 3, 2026
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.
I will be deploying these into RoadTest after the data team finishes cleaning up the empty string values that should be replaced with NULL via Python.