Skip to content

Commit 8041207

Browse files
committed
Updated hardcoded InventoryIDs in tests
1 parent 60ff4c7 commit 8041207

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎tests/test-cross-inventory-integrity.R‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ test_that("every BibtexKey resolves to a real bib entry", {
5858
mapping_keys <- bibtex_mapping %>% pull(BibtexKey) %>% unique()
5959
missing_keys <- setdiff(mapping_keys, bib_keys)
6060

61-
# Exclude special case of InventoryID 201 (Arrente), which has "NO SOURCE GIVEN" as its BibtexKey
62-
missing_keys <- setdiff(missing_keys, bibtex_mapping %>% filter(InventoryID == 201) %>% pull(BibtexKey))
61+
# Exclude special case of InventoryID p9fc80 (Arrente, legacy ID 201), which has "NO SOURCE GIVEN" as its BibtexKey
62+
missing_keys <- setdiff(missing_keys, bibtex_mapping %>% filter(InventoryID == "p9fc80") %>% pull(BibtexKey))
6363

6464
## report which InventoryID(s) cite each missing key
6565
offending_rows <- bibtex_mapping %>%

‎tests/test-inventory-metadata.R‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ test_that("glottocodes are valid", {
140140
)
141141

142142
## Djindewal is our one missing glottocode
143-
2729 -> djindewal_inventory_id
143+
"p4c123" -> djindewal_inventory_id
144144
phoible %>%
145145
filter(is.na(.$Glottocode)) %>%
146146
select(InventoryID) %>%
@@ -164,11 +164,11 @@ test_that("glottocodes are valid", {
164164

165165
## Exclude known glottolog-ISO mismatches
166166
known_mismatches <- rbind(
167-
c(868, "nepa1253", "kru"), # kxl (deprecated) merged into kru
168-
c(1307, "krim1238", "bmf"), # krm (deprecated) merged into bmf
169-
c(2750, "dira1238", "dif"), # dit (deprecated) merged into dif
170-
c(2875, "band1337", "drl"), # bjd (deprecated) merged into drl
171-
c(2256, "dark1243", "khk") # drh (deprecated) merged into khk
167+
c("pa6c4f", "nepa1253", "kru"), # kxl (deprecated) merged into kru
168+
c("p43cf5", "krim1238", "bmf"), # krm (deprecated) merged into bmf
169+
c("p469e6", "dira1238", "dif"), # dit (deprecated) merged into dif
170+
c("p87b01", "band1337", "drl"), # bjd (deprecated) merged into drl
171+
c("pf7a44", "dark1243", "khk") # drh (deprecated) merged into khk
172172
)
173173

174174
overridable <- phoible$Glottocode[has_glottocode] %in% known_mismatches[, 2]

0 commit comments

Comments
 (0)