Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ..Rcheck/00check.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
* using log directory ‘/home/runner/work/animl-r/animl-r/..Rcheck’
* using R version 4.3.3 (2024-02-29)
* using platform: x86_64-pc-linux-gnu (64-bit)
* R was compiled by
gcc (Ubuntu 13.2.0-23ubuntu3) 13.2.0
GNU Fortran (Ubuntu 13.2.0-23ubuntu3) 13.2.0
* running under: Ubuntu 24.04.4 LTS
* using session charset: UTF-8
* using options ‘--no-tests --no-manual --no-vignettes --no-build-vignettes’
* checking for file ‘./DESCRIPTION’ ... ERROR
Required fields missing or empty:
‘Author’ ‘Maintainer’
* DONE
Status: 1 ERROR
2 changes: 1 addition & 1 deletion R/detection.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ detect <- function(detector,
resize_width,
resize_height,
letterbox=TRUE,
category_map=MD_LABELS,
category_map=list('0'='empty', '1'='animal', '2'='human', '3'='vehicle'),
confidence_threshold=0.1,
file_col='filepath',
batch_size=1,
Expand Down
2 changes: 1 addition & 1 deletion R/file_management.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ save_data <- function(data, out_file, prompt=TRUE) {
#'
#' @examples
#' \dontrun{
#' loadData("path/to/newfile.csv")
#' load_data("path/to/newfile.csv")
#' }

load_data <- function(file) {
Expand Down
1 change: 1 addition & 0 deletions R/install.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# VARIABLE FOR VERSION
ANIML_VERSION <- "3.3.2"

#' @noRd
animl_module_installed <- function() {
tryCatch(
{
Expand Down
30 changes: 19 additions & 11 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@


.onLoad <- function(libname, pkgname) {
# Skip Python loading during R CMD check to avoid interference with checks
if (nchar(Sys.getenv("_R_CHECK_PACKAGE_NAME_")) > 0L) {
return(invisible())
}
# Try to load animl-py, but don't fail if it's not available
tryCatch(
{
Expand All @@ -14,16 +18,20 @@
# Store the error state so we can warn users later
assign("animl_py_available", FALSE, envir = .animl_internal)
})
}
}

.onAttach <- function(libname, pkgname) {
if (!exists("animl_py_available", envir = .animl_internal) ||
!get("animl_py_available", envir = .animl_internal)) {
packageStartupMessage(
"Warning: animl-py is not installed.\n",
"animl functionality requires Python 3.12 and animl-py.\n",
"Run animl::animl_install() to set up the Python environment.\n",
"See ?animl::animl_install_instructions for more details."
)
}
}
# Skip startup message during R CMD check
if (nchar(Sys.getenv("_R_CHECK_PACKAGE_NAME_")) > 0L) {
return(invisible())
}
if (!exists("animl_py_available", envir = .animl_internal) ||
!get("animl_py_available", envir = .animl_internal)) {
packageStartupMessage(
"Warning: animl-py is not installed.\n",
"animl functionality requires Python 3.12 and animl-py.\n",
"Run animl::animl_install() to set up the Python environment.\n",
"See ?animl::animl_install_instructions for more details."
)
}
}
2 changes: 1 addition & 1 deletion man/detect.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/load_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.