r-hyperspec / hyperSpec

hyperSpec: Tools for Spectroscopy (R package)
https://r-hyperspec.github.io/hyperSpec/
GNU General Public License v3.0
12 stars 3 forks source link

Improve hy_list_available_hySpc_packages() (part 2) #6

Closed GegznaV closed 3 years ago

GegznaV commented 3 years ago

Code in this PR unifies the GH API output for different machines.

Related to #3 and closes cbeleites/hyperSpec#328.


@bryanhanson and @cbeleites, could you test this new version of function on your machines and inform us if it works for you.

Otherwise, I'll need the output file of:

gh_api_response <- readLines(
  "https://api.github.com/orgs/r-hyperspec/repos?per_page=100"
)
readr::write_lines(gh_api_response, file = "gh_api_response.txt")

with more information on what kind of machine the file was generated.

GegznaV commented 3 years ago

Unit test message on Bryan's MAC:

  Running 'testthat.R' [8s/10s]
 ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
  • no spc files with empty spectra available so far (1)
  • On CRAN (2)
  • skip (1)
  • TODO: implement (1)

  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (???): hy_list_available_hySpc_packages() works ─────────────────────
  length(pkgs) > 5 is not TRUE

  `actual`:   FALSE
  `expected`: TRUE 

  [ FAIL 1 | WARN 0 | SKIP 42 | PASS 950 ]
  Error: Test failures
  Execution halted
GegznaV commented 3 years ago

I've removed the additional whitespace in the GH API response. Should work now. image

Can you test again @bryanhanson?

bryanhanson commented 3 years ago

This works now on my machine.

GegznaV commented 3 years ago

@cbeleites We are waiting for your review (and approval).

cbeleites commented 3 years ago

I get other errors locally, but #6 works now.