From 500420d8b0ad5987ecf847981d810bdbe9224133 Mon Sep 17 00:00:00 2001 From: James Wade Date: Thu, 1 Feb 2024 08:47:40 -0500 Subject: [PATCH] chore: cleanup for precommit --- .pre-commit-config.yaml | 4 ---- R/document_data.R | 2 +- R/embedding-py.R | 1 - R/transcribe.R | 2 -- inst/retriever/app.R | 1 - 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8245543..0c66adc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,10 +29,6 @@ repos: - id: no-browser-statement - id: no-debug-statement - id: no-print-statement - - id: deps-in-desc - # args: [--warn_only] - - id: pkgdown - # args: [--warn_only] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: diff --git a/R/document_data.R b/R/document_data.R index 14d3599..e1fd8ba 100644 --- a/R/document_data.R +++ b/R/document_data.R @@ -88,5 +88,5 @@ summarize_data <- function(data, prep_data_prompt <- function(data, method, prompt) { summarized_data <- summarize_data(data = data, method = method) - paste(testthat::capture_output(print(summarized_data)), prompt, sep = "\n") + paste(testthat::capture_output(cat_print(summarized_data)), prompt, sep = "\n") } diff --git a/R/embedding-py.R b/R/embedding-py.R index 1cc96a3..b49c619 100644 --- a/R/embedding-py.R +++ b/R/embedding-py.R @@ -99,7 +99,6 @@ colbert_rerank <- function(documents, model_name = "colbert-ir/colbertv2.0") { ) } - print(paste0("Took ", time$time() - start, " seconds to re-rank documents with ColBERT.")) sorted_data <- scores[order(sapply(scores, function(x) x$score), decreasing = TRUE)] } diff --git a/R/transcribe.R b/R/transcribe.R index 879d1c6..89bbf9e 100644 --- a/R/transcribe.R +++ b/R/transcribe.R @@ -54,8 +54,6 @@ transcribe_audio_chunk <- result <- httr::content(response, "parsed", "application/json") - print(result) - file.remove(tmp_file) return(result) diff --git a/inst/retriever/app.R b/inst/retriever/app.R index 8549af0..99ca16c 100644 --- a/inst/retriever/app.R +++ b/inst/retriever/app.R @@ -53,7 +53,6 @@ make_chat_history <- function(chats) { ) }) |> purrr::list_flatten() - print(history) history }