-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
187849414 Autodetect Boundary Type #1613
base: main
Are you sure you want to change the base?
Conversation
* Add geojson-utils.ts with `isBoundaryValue`
…tribute name to determine type.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1613 +/- ##
===========================================
+ Coverage 67.88% 85.63% +17.75%
===========================================
Files 600 602 +2
Lines 30405 30495 +90
Branches 8351 7809 -542
===========================================
+ Hits 20639 26113 +5474
+ Misses 9611 4227 -5384
Partials 155 155
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
codap-v3 Run #5248
Run Properties:
|
Project |
codap-v3
|
Branch Review |
187849414-autodetect-boundary-type-v3
|
Run status |
Passed #5248
|
Run duration | 06m 05s |
Commit |
92adb98571: Merge main.
|
Committer | Teale Fristoe |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
35
|
Skipped |
0
|
Passing |
221
|
View all changes introduced in this branch ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good -- suggestions are mainly to rearrange some of the dependencies.
expect(() => evaluate(`lookupBoundary("US_state_boundaries", "Alaska")`)).toThrow() | ||
expect(() => evaluate(`lookupBoundary(Mammal, "Alaska")`)).toThrow() | ||
|
||
// Second argument can't be a non-existant symbol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Second argument can't be a non-existant symbol | |
// Second argument can't be a non-existent symbol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure what to do with this file, but maybe combine it with boundary-utils.ts
(nee geojson-utils.ts
) for now? Leave the src/boundaries
folder for the GeoJSON files for the nonce, but it will go away once the boundary files are being loaded remotely, at which point maybe the rest of the relationships will become more clear as well.
@@ -26,10 +26,12 @@ | |||
*/ | |||
|
|||
import { Instance, SnapshotIn, types } from "mobx-state-tree" | |||
import { kPolygonNames } from "../../components/map/map-types" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute
shouldn't be importing from the map component. I'd suggest moving kPolygonNames
to utilities/boundary-utils.ts
(nee geojson-utils.ts
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to boundary-utils.test.ts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to boundary-utils.ts
.
PT Stories:
https://www.pivotaltracker.com/story/show/187849414
https://www.pivotaltracker.com/story/show/188491735
https://www.pivotaltracker.com/story/show/188491712
This PR implements related behavior requested in three different stories.
lookupBoundary
function has been implemented.Other changes:
basicCanonicalNameToDependency
was moved fromformula-dependency-utils.ts
toname-mapping-utils.ts
to avoid an import cycle. This was a very straightforward change to make. I'm not sure if there was some organizational reason for this function to be in one file rather than the other.