-
Notifications
You must be signed in to change notification settings - Fork 156
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
Dispatch binary predicate tests according to predicate and cases. #1046
Labels
2 - In Progress
Currenty a work in progress
improvement
Improvement / enhancement to an existing function
non-breaking
Non-breaking change
Comments
thomcom
added
feature request
New feature or request
Needs Triage
Need team to review and classify
labels
Apr 7, 2023
thomcom
added
2 - In Progress
Currenty a work in progress
improvement
Improvement / enhancement to an existing function
non-breaking
Non-breaking change
and removed
feature request
New feature or request
Needs Triage
Need team to review and classify
labels
Apr 7, 2023
3 tasks
This was referenced Apr 19, 2023
Merged
rapids-bot bot
pushed a commit
that referenced
this issue
Apr 26, 2023
Closes #1046 Closes #1036 This PR adds a new binary predicate test dispatch test system. The test dispatcher creates one test for each ordered pair of features from the set (point, linestring, polygon) and each predicate that feature tuple can be applied to: - contains - covers - crosses - disjoint - geom_equals - intersects - overlaps - touches - within The combination of 9 predicates and 33 tests creates 297 tests that cover all possible combinations of simple features and their predicates. While development is underway, the test dispatcher automatically `xfails` any test that fails or hasn't been implemented yet in order to pass CI. The test dispatcher outputs diagnostic results during each test run. An output file `test_binpred_test_dispatch.log` is created containing all of the failing tests, including their name, a visual description of the feature tuple and relationship, the shapely objects used to create the test, and the runtime name of the test so it is easy for a developer (myself) to identify which test failed and rerun it. It also creates four .csv files during runtime that collect the results of each test pass or fail relative to which predicate is being run and which pair of features are being tested. These .csv files can be displayed using `tests/binpred/summarize_binpred_test_dispatch_results.py`, which will output a dataframe of each CSV file thusly: ``` (rapids) coder ➜ ~/cuspatial/python/cuspatial/cuspatial $ python tests/binpreds/summarize_binpred_test_dispatch_results.py predicate predicate_passes 0 geom_equals 20 1 intersects 11 2 covers 17 3 crosses 6 4 disjoint 9 5 overlaps 20 6 within 14 predicate predicate_fails 0 contains 33 1 geom_equals 13 2 intersects 22 3 covers 16 4 crosses 27 5 disjoint 24 6 overlaps 13 7 touches 33 8 within 19 feature feature_passes 0 (<ColumnType.POINT: 1>, <ColumnType.POINT: 1>) 14 1 (<ColumnType.POINT: 1>, <ColumnType.POLYGON: 4>) 22 2 (<ColumnType.LINESTRING: 3>, <ColumnType.LINES... 16 3 (<ColumnType.LINESTRING: 3>, <ColumnType.POLYG... 38 4 (<ColumnType.POINT: 1>, <ColumnType.LINESTRING... 7 feature feature_fails 0 (<ColumnType.POINT: 1>, <ColumnType.POINT: 1>) 4 1 (<ColumnType.POINT: 1>, <ColumnType.LINESTRING... 20 2 (<ColumnType.POINT: 1>, <ColumnType.POLYGON: 4>) 14 3 (<ColumnType.LINESTRING: 3>, <ColumnType.LINES... 20 4 (<ColumnType.LINESTRING: 3>, <ColumnType.POLYG... 52 5 (<ColumnType.POLYGON: 4>, <ColumnType.POLYGON:... 90 ``` Without additional modifications, the test dispatcher produces 97 passing results and 200 xfailing results. In a shortly upcoming PR, updates to the basic predicates and binpred test architecture increase the number of passing results to 274, with 25 xfails. These PRs are separated for ease of review. Authors: - H. Thomson Comer (https://github.com/thomcom) Approvers: - Mark Harris (https://github.com/harrism) - Michael Wang (https://github.com/isVoid) URL: #1085
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2 - In Progress
Currenty a work in progress
improvement
Improvement / enhancement to an existing function
non-breaking
Non-breaking change
This is a task list.
Is this a new feature, an improvement, or a change to existing functionality?
Improvement
How would you describe the priority of this feature request
Critical (currently preventing usage)
Please provide a clear description of problem you would like to solve.
Tests for binpreds will be dispatched in the following structure:
This is 300 tests that cover the range of feature positions that exist for simple features. The geometric arrangement of each test is available in
binpred_test_dispatch.py
.Describe any alternatives you have considered
No response
Additional context
No response
Tasks
The text was updated successfully, but these errors were encountered: