pbs-assess / gfdata

:floppy_disk: An R package for data extraction of BC groundfish data
https://pbs-assess.github.io/gfdata/
1 stars 0 forks source link

Failing test-get-dat tests on check #22

Open ecophilina opened 2 weeks ago

ecophilina commented 2 weeks ago

── Failure (Line 12): get species data functions work at PBS ─────────────────── d has changed from known value recorded in 'C:/Users/englishp/Documents/gfdata/tests/test-cache/get_survey_sets.rds'. Names: 3 string mismatches Attributes: < Component "date": Mean absolute difference: 70486690 > Attributes: < Component "row.names": Numeric: lengths (117, 118) differ > Length mismatch: comparison on first 33 components Component "survey_series_id": Numeric: lengths (117, 118) differ Component "survey_id": Numeric: lengths (117, 118) differ Component "species_code": Lengths (117, 118) differ (string compare on first 117) Component "survey_desc": Lengths (117, 118) differ (string compare on first 117) Component "trip_id": Numeric: lengths (117, 118) differ ...

── Failure (Line 19): get species data functions work at PBS ─────────────────── d has changed from known value recorded in 'C:/Users/englishp/Documents/gfdata/tests/test-cache/get_survey_samples.rds'. Attributes: < Component "date": Mean absolute difference: 70486674 > Component "fishing_event_id": Mean relative difference: 8.461502e-06 Component "minor_stat_area_code": 10 string mismatches Component "specimen_id": Mean relative difference: 0.0001571901 Component "sample_id": Mean relative difference: 0.0002583621 Component "sex": Mean relative difference: 2 Component "length": Mean relative difference: 0.1499167 Component "weight": 'is.NA' value mismatch: 23 in current 23 in target Component "trip_sub_type_code": Mean relative difference: 0.3333333 ...

── Error (Line 27): get species data functions work at PBS ───────────────────── Error in get_cocaught_species(610, "groundfish trawl", "bottom trawl"): could not find function "get_cocaught_species"

Error in reporter$stop_if_needed() : Test failed

ecophilina commented 2 weeks ago

Also running into problems with a few of the lookup-table functions

── Error (Line 17): get lookup functions work at PBS ─────────────────────────── <Rcpp::exception/C++Error/error/condition> Error: nanodbc/nanodbc.cpp:1021: 42000: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "PacManagement" requested by the login. The login failed. Backtrace:

  1. gfdata::get_management_areas()
  2. gfdata::run_sql("PacManagement", "SELECT Area_Code, Area_Description\n FROM Area") at gfdata/R/get-lookup-tables.R:80:3
  3. gfdata:::db_connection(database = database) at gfdata/R/utils.R:23:3
  4. DBI::dbConnect(...)
  5. odbc (local) .local(drv, ...)
  6. odbc:::OdbcConnection(...)
  7. odbc:::odbc_connect(...)

Error in reporter$stop_if_needed() : Test failed