-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81af0aa
commit b80bc4e
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
tests/functional/curate/cram/apply-geolocation-rules/last-duplicate-rule-applied.t
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Setup | ||
|
||
$ export AUGUR="${AUGUR:-$TESTDIR/../../../../../bin/augur}" | ||
|
||
Test an exact rule with duplicate raw entries applies the last matching annotation. | ||
Verifies that we can override "default" rules by appending custom rules. | ||
|
||
$ cat >rules.tsv <<~~ | ||
> r_raw/c_raw/d_raw/l_raw r_annotated/c_annotated/d_annotated/l_annotated | ||
> r_raw/c_raw/d_raw/l_raw r_annotated_custom/c_annotated_custom/d_annotated_custom/l_annotated_custom | ||
> ~~ | ||
|
||
It applies the last rules that matched. | ||
|
||
$ echo '{"region": "r_raw", "country": "c_raw", "division": "d_raw", "location": "l_raw"}' \ | ||
> | ${AUGUR} curate apply-geolocation-rules \ | ||
> --geolocation-rules rules.tsv | ||
{"region": "r_annotated_custom", "country": "c_annotated_custom", "division": "d_annotated_custom", "location": "l_annotated_custom"} |