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

update test-read_camtrap_dp.R back to updated version of datapackage.json #200

Closed
PietrH opened this issue Mar 7, 2023 · 1 comment
Closed
Labels
camtrapdp/camtraptor To be decided if this is related to camtrapdp or camtraptor good first issue Good for newcomers
Milestone

Comments

@PietrH
Copy link
Member

PietrH commented Mar 7, 2023

context

As per #191 test-read_camtrap_dp.R now refers to a specific commit for an example of camtrap-dp's datapackage.json:

test_that("file can be an URL", {
  # camtraptor is trailing camtrap-dp, refer to specific commit to keep using old version
  # dp_path <- "https://raw.githubusercontent.com/tdwg/camtrap-dp/main/example/datapackage.json"
  dp_path <-
    "https://raw.githubusercontent.com/tdwg/camtrap-dp/bb046c85a55bef2ced709357c0047f0136df8326/example/datapackage.json"
  dp <- suppressMessages(read_camtrap_dp(
    file = dp_path,
    media = FALSE
  ))
  expect_true(is.list(dp))
  expect_true(all(c("tbl_df", "tbl", "data.frame") %in%
    class(dp$data$deployments)))
  expect_true(all(c("tbl_df", "tbl", "data.frame") %in%
    class(dp$data$observations)))
})

We did this because at the time of #191 the test was failing because camtraptor was trailing an older version of camtrap-dp.


blockers

This issue is blocked by the neccesairy changes to read_camtrap_dp.R and camtraptor to use the new schema in general.

fix

Once camtraptor is ready: read_camtrap_dp() is updated to use/support the new schema) the test should be switched back to using the most up to date datapackage.json from camtrap-dp

@PietrH PietrH added the good first issue Good for newcomers label Mar 7, 2023
@PietrH PietrH added this to the v1.0 milestone Mar 7, 2023
@peterdesmet peterdesmet added the camtrapdp/camtraptor To be decided if this is related to camtrapdp or camtraptor label Mar 6, 2024
@peterdesmet
Copy link
Member

This is no longer the case in camtrapdp, it refers to a version: https://github.com/inbo/camtrapdp/blob/14cc3cc2b8bf7399feef78f808ab5a62543ed9bb/tests/testthat/test-read_camtrapdp.R#L4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
camtrapdp/camtraptor To be decided if this is related to camtrapdp or camtraptor good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants