Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/pull_request.add_in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,23 @@ jobs:

- name: 🔪 Check CSharpier formatting
working-directory: add-in/UGRC.UtransTools
run: dotnet csharpier check .
run: dotnet csharpier check ..

test-review-core:
name: Test review core
runs-on: ubuntu-latest

steps:
- name: ⬇️ Set up code
uses: actions/checkout@v7

- name: 🥅 Setup .NET SDK
uses: actions/setup-dotnet@v6
with:
dotnet-version: "8.0"

- name: 🧪 Test review core with coverage
run: >
dotnet test
add-in/UGRC.UtransTools.Core.Tests/UGRC.UtransTools.Core.Tests.csproj
--collect:"XPlat Code Coverage"
25 changes: 23 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@
"recents",
"ROADALIASNAME",
"saltlake",
"SGID",
"Sevier",
"SGID",
"SRFTYP",
"STREETNAME",
"SUFDIR",
"SUFFIXDIR",
"testpaths",
"TOADDR",
"Tooele",
"TRANSADMIN",
"UGRC",
"Uintah",
"utrans",
Expand All @@ -65,7 +66,27 @@
"approve": true,
"matchCommandLine": true
},
"/^conda activate utrans-tools; ruff/": {
"/^conda activate utrans-tools; ruff[^;]*$/": {
"approve": true,
"matchCommandLine": true
},
"/^dotnet build \\.\\\\add-in\\\\UGRC\\.UtransTools\\\\UGRC\\.UtransTools\\.csproj --configuration Debug$/": {
"approve": true,
"matchCommandLine": true
},
"/^Set-Location 'C:\\\\projects\\\\utrans-tools'; dotnet test 'add-in\\\\UGRC\\.UtransTools\\.Core\\.Tests\\\\UGRC\\.UtransTools\\.Core\\.Tests\\.csproj'$/": {
"approve": true,
"matchCommandLine": true
},
"/^dotnet test add-in\\\\UGRC\\.UtransTools\\.Core\\.Tests\\\\UGRC\\.UtransTools\\.Core\\.Tests\\.csproj$/": {
"approve": true,
"matchCommandLine": true
},
"/^dotnet build \"add-in\\\\UGRC\\.UtransTools\\\\UGRC\\.UtransTools\\.csproj\" --configuration Debug --no-restore$/": {
"approve": true,
"matchCommandLine": true
},
"/^dotnet build add-in\\\\UGRC\\.UtransTools\\\\UGRC\\.UtransTools\\.csproj --configuration Debug --no-restore --verbosity minimal$/": {
"approve": true,
"matchCommandLine": true
}
Expand Down
13 changes: 13 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Agent skills

### Issue tracker

Issues and specs are tracked in this repository's GitHub Issues. See `docs/agents/issue-tracker.md`.

### Triage labels

Uses the default canonical triage labels. See `docs/agents/triage-labels.md`.

### Domain docs

Uses a single-context layout rooted at `CONTEXT.md`. See `docs/agents/domain.md`.
21 changes: 21 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# UTRANS Change Review

This context covers the review of changes detected between county road data and UTRANS roads. It distinguishes the detected change from the optional UTRANS road it may reference.

## Language

**DFC result**:
A detected feature-change record that a reviewer assesses against county road data and, when present, a linked UTRANS road.
_Avoid_: DFC record, detected change

**Change status**:
The review outcome stored on a DFC result: `COMPLETED`, `IGNORE`, or `REVISIT`.
_Avoid_: DFC disposition

**Linked UTRANS road**:
The UTRANS road referenced by a DFC result as its target road. A DFC result may have no linked UTRANS road.
_Avoid_: target road segment

**Unlinked new record**:
A DFC result with change type `N` and no target UTRANS road. It can be added as a new UTRANS road or assigned a non-completed change status.
_Avoid_: driveway candidate
41 changes: 41 additions & 0 deletions UGRC.UtransTools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,57 @@ VisualStudioVersion = 17.14.37411.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UGRC.UtransTools", "add-in\UGRC.UtransTools\UGRC.UtransTools.csproj", "{9112D502-5FDD-4284-BDF7-B0DA219C99EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UGRC.UtransTools.Core", "add-in\UGRC.UtransTools.Core\UGRC.UtransTools.Core.csproj", "{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UGRC.UtransTools.Core.Tests", "add-in\UGRC.UtransTools.Core.Tests\UGRC.UtransTools.Core.Tests.csproj", "{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "add-in", "add-in", "{89F9893B-E750-84D5-8801-D0B0E8294416}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Debug|x64.ActiveCfg = Debug|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Debug|x64.Build.0 = Debug|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Debug|x86.ActiveCfg = Debug|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Debug|x86.Build.0 = Debug|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Release|Any CPU.Build.0 = Release|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Release|x64.ActiveCfg = Release|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Release|x64.Build.0 = Release|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Release|x86.ActiveCfg = Release|Any CPU
{9112D502-5FDD-4284-BDF7-B0DA219C99EF}.Release|x86.Build.0 = Release|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Debug|x64.ActiveCfg = Debug|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Debug|x64.Build.0 = Debug|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Debug|x86.ActiveCfg = Debug|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Debug|x86.Build.0 = Debug|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Release|Any CPU.Build.0 = Release|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Release|x64.ActiveCfg = Release|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Release|x64.Build.0 = Release|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Release|x86.ActiveCfg = Release|Any CPU
{8EADADCE-DF0D-46F4-A64C-24BAB8438F5F}.Release|x86.Build.0 = Release|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Debug|x64.ActiveCfg = Debug|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Debug|x64.Build.0 = Debug|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Debug|x86.ActiveCfg = Debug|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Debug|x86.Build.0 = Debug|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Release|x64.ActiveCfg = Release|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Release|x64.Build.0 = Release|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Release|x86.ActiveCfg = Release|Any CPU
{DA2F0C58-0D25-419B-A5CC-8498A4B47B2B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
44 changes: 42 additions & 2 deletions add-in/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@

## Usage

### Map Requirements

Before opening the editor, the active map must contain these layers with these exact names:

- `UTRANS.TRANSADMIN.ROADS_EDIT`
- `COUNTY_STREETS`
- `DFC_RESULT`
- `SGID.LOCATION.AddressSystemQuadrants`
- `SGID.BOUNDARIES.ZipCodes`
- `SGID.BOUNDARIES.Counties`
- `SGID.BOUNDARIES.Municipalities`

Each layer must have an available feature-class data source. The `CARTOCODE`, `ONEWAY`, `VERT_LEVEL`, `SPEED_LMT`, and `STATUS` fields in `UTRANS.TRANSADMIN.ROADS_EDIT` must exist and use coded-value domains. The editor uses those domains for its dropdown values.

### Dropdown Values and Highlights

The five road dropdowns (`CARTOCODE`, `ONEWAY`, `VERT_LEVEL`, `SPEED_LMT`, and `STATUS`) display the descriptions from the coded-value domain, but save the corresponding domain codes. The available choices therefore come from the current `ROADS_EDIT` schema, not from a hard-coded list.

When a DFC record is loaded, the initial selected value for each road dropdown is calculated independently:

1. Use the non-blank value from the matching `COUNTY_STREETS` field.
2. If the county value is blank, use the matching value from the linked `ROADS_EDIT` feature.
3. If both values are blank, use the default: `CARTOCODE` `11`, `ONEWAY` `0`, `VERT_LEVEL` `0`, `SPEED_LMT` `25`, or `STATUS` `Active`.

If the selected source value is not in its coded-value domain, the editor replaces it with that field's default. For a multi-select **Add New** operation, there is no single source road, so the editor starts with the defaults and applies the same dropdown values to every created road. For a single new record, the county-road values are used when available.

A yellow highlighted border around a road dropdown means its current value differs from the value initially loaded into the editor. This can mean that you changed the value, that a value was normalized to its default because it was not a valid domain code, or that a multi-select new-road value was changed from its default. The highlight is a review indicator; it does not by itself mean that the value is invalid or that it has already been saved.

### Adding New Features

Use **Add New** to copy an unlinked new record or records from `DFC_RESULT` into the UTRANS roads layer.
Expand All @@ -10,9 +38,21 @@ Use **Add New** to copy an unlinked new record or records from `DFC_RESULT` into
2. Review or update the road attributes shown in the editor. When multiple records are selected, the values are used for each new road.
3. Click **Add New**.

When multiple features are selected, the form values override the county-road values for `CARTOCODE`, `ONEWAY`, `VERT_LEVEL`, `SPEED_LMT`, and `STATUS`. Review these values before clicking **Add New** because the same editor values are applied to every new road.
The form values override the county-road values for `CARTOCODE`, `ONEWAY`, `VERT_LEVEL`, `SPEED_LMT`, and `STATUS`. Review these values before clicking **Add New** because the same editor values are applied to every new road, including when only one feature is selected.

The editor starts these fields with the following defaults when no county-road or UTRANS value is available: `CARTOCODE` `11`, `ONEWAY` `0`, `VERT_LEVEL` `0`, `SPEED_LMT` `25`, and `STATUS` `Active`. If a loaded value is not present in the corresponding coded-value domain, it is replaced with the same default.

The add-in creates a UTRANS road using each selected county-road geometry and attributes, links the `DFC_RESULT` record to the new road, and marks the change status as `COMPLETED`. The map selections are cleared after the operation finishes.

### Reviewing Detected Changes

Select a `DFC_RESULT` feature to choose its Change Status. Use **IGNORE** for a change that should not update UTRANS, such as a driveway, or **REVISIT** to defer review. Click **Save** to store that change status on the selected DFC result.

For an unlinked new record, **Add New** is available only when the record's change type is `N` and `BASE_FID` is `-1`. **Add New** creates the UTRANS road from the county-road geometry, links the DFC record, and sets its status to **COMPLETED**. A **COMPLETED** save for an unlinked record is rejected; click **Add New** first. Choosing **IGNORE** or **REVISIT** saves only the DFC status and does not write a UTRANS road. For a linked record, **COMPLETED** saves the edited UTRANS attributes and DFC status, while **IGNORE** and **REVISIT** save only the DFC status.

### Repairing a DFC Identifier

The add-in creates a UTRANS road using each selected county-road geometry and attributes, links the `DFC_RESULT` record to the new road, and marks the DFC disposition as `COMPLETED`. The map selections are cleared after the operation finishes.
Use **Update DFC BASE_FID** when a DFC record references the wrong UTRANS segment or after splitting a line. Select exactly one feature in `UTRANS.TRANSADMIN.ROADS_EDIT` before using the button. The repair changes `DFC_RESULT.BASE_FID` to that feature and appends the previous identifier to `DFC_RESULT.PREV__NOTES`.

## Developer Set Up

Expand Down
Loading