Skip to content

Fix: more AR bugfixes and requested features - #48

Merged
acneville merged 7 commits into
mainfrom
fix/ar-bugfixes2
Sep 3, 2026
Merged

acneville merged 7 commits into
mainfrom
fix/ar-bugfixes2

Conversation

@acneville

Copy link
Copy Markdown
Contributor

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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, and UNIQUE_ID outputs to uppercase.
  • Update unique_id suffix 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.

Comment thread attribute-rules/calculation/Roads_Edit/unique_id.arcade
Comment thread attribute-rules/calculation/Roads_Edit/unique_id.arcade Outdated
Comment thread attribute-rules/test/text_calculations.test.ts
acneville and others added 2 commits September 3, 2026 14:09
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>
@acneville
acneville requested a review from stdavis September 3, 2026 20:15
stdavis
stdavis previously approved these changes Sep 3, 2026
Comment thread attribute-rules/constraint/Roads_Edit/constrain_to_attribute_domain.arcade Outdated
@acneville
acneville merged commit e6cd97d into main Sep 3, 2026
2 checks passed
@acneville
acneville deleted the fix/ar-bugfixes2 branch September 3, 2026 21:43
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.

3 participants