Skip to content
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

matrix_to_subcorpus() fails on GitHub CI (Windows, Ubuntu, but not on macOS) #56

Open
ablaette opened this issue Mar 5, 2022 · 0 comments
Labels

Comments

@ablaette
Copy link
Collaborator

ablaette commented Mar 5, 2022

This test fails on GitHub Actions (Windows/Ubuntu, not macOS):

oil_context <- cqp_query("REUTERS", subcorpus = "OIL", query = '[]{3}"oil" []{3}')
m <- subcorpus_get_ranges(oil_context)
reuters <- cl_find_corpus("REUTERS", registry = get_tmp_registry())
p <- matrix_to_subcorpus(subcorpus = "OIL2", corpus = reuters, region_matrix = m)
expect_true("OIL2" %in% cqp_list_subcorpora("REUTERS"))

x <- cqp_query("REUTERS:OIL2", query = '"crude";', subcorpus = "CRUDEOIL")
expect_true("CRUDEOIL" %in% cqp_list_subcorpora("REUTERS"))

expect_identical(
  cqp_dump_subcorpus("REUTERS", "CRUDEOIL"),
  subcorpus_get_ranges(x)
)

cqp_drop_subcorpus("REUTERS:OIL")
cqp_drop_subcorpus("REUTERS:OIL2")
cqp_drop_subcorpus("REUTERS:CRUDEOIL")

expect_false("OIL" %in% cqp_list_subcorpora("REUTERS"))
expect_false("OIL2" %in% cqp_list_subcorpora("REUTERS"))
expect_false("CRUDEOIL" %in% cqp_list_subcorpora("REUTERS"))

And this example fails on GitHub Action for Windows and Ubuntu. It is now in a dontrun section.

# First we generate a subcorpus from a query result
oil_context <- cqp_query("REUTERS", subcorpus = "OIL", query = '[]{3}"oil" []{3}')
m <- subcorpus_get_ranges(oil_context)
reuters <- cl_find_corpus("REUTERS", registry = get_tmp_registry())
p <- matrix_to_subcorpus(subcorpus = "OIL2", corpus = reuters, region_matrix = m)
cqp_list_subcorpora("REUTERS")
 
x <- cqp_query("REUTERS:OIL2", query = '"crude";', subcorpus = "CRUDEOIL")
subcorpus_get_ranges(x)
 
# clean up
cqp_drop_subcorpus("REUTERS:OIL")
cqp_drop_subcorpus("REUTERS:OIL2")
cqp_drop_subcorpus("REUTERS:CRUDEOIL")
@ablaette ablaette added the bug label Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant