Skip to content

Commit

Permalink
Set data.table threads to 2 for package checks (#139)
Browse files Browse the repository at this point in the history
* Seems to pass CRAN checks now (tested with rhub)
* Submit v1.0.2
  • Loading branch information
zsteinmetz authored Sep 5, 2023
1 parent 8ed1ba9 commit f4c2107
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 63 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 1.0.1
Date: 2023-09-04 13:32:12 UTC
SHA: 0ae4952382c771ea3f729f1303fd6431182d7d95
Version: 1.0.2
Date: 2023-09-05 13:16:55 UTC
SHA: 92ce663a7883e3c9886fb7c2ada24fd7deb4c49b
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: OpenSpecy
Type: Package
Title: Analyze, Process, Identify, and Share Raman and (FT)IR Spectra
Version: 1.0.1
Date: 2023-09-04
Version: 1.0.2
Date: 2023-09-05
Authors@R: c(person("Win", "Cowger", role = c("cre", "aut", "dtc"),
email = "[email protected]",
comment = c(ORCID = "0000-0001-9226-3104")),
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# OpenSpecy 1.0.2

## Bug Fixes

- Set data.table threads to 2 for (CRAN) checks


# OpenSpecy 1.0.1

## Bug Fixes
Expand Down
1 change: 1 addition & 0 deletions R/def_features.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#' collapsed for the features.
#'
#' @examples
#' \dontshow{data.table::setDTthreads(2)}
#' tiny_map <- read_extdata("CA_tiny_map.zip") |> read_any()
#' identified_map <- def_features(tiny_map, tiny_map$metadata$x == 0)
#' collapse_spec(identified_map)
Expand Down
1 change: 1 addition & 0 deletions R/interactive_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#' spectra from the \code{OpenSpecy} object(s).
#'
#' @examples
#' \dontshow{data.table::setDTthreads(2)}
#' data("raman_hdpe")
#' tiny_map <- read_extdata("CA_tiny_map.zip") |> read_zip()
#' plotly_spec(raman_hdpe)
Expand Down
1 change: 1 addition & 0 deletions R/read_multi.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#' All \code{read_*()} functions return \code{OpenSpecy} objects
#'
#' @examples
#' \dontshow{data.table::setDTthreads(2)}
#' read_extdata("raman_hdpe.csv") |> read_any()
#' read_extdata("ftir_ldpe_soil.asp") |> read_any()
#' read_extdata("testdata_zipped.zip") |> read_zip()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ Needs an Open Source Community: Open Specy to the Rescue!”
[10.1021/acs.analchem.1c00123](https://doi.org/10.1021/acs.analchem.1c00123).

Cowger W, Steinmetz Z (2023). “OpenSpecy: Analyze, Process,
Identify, and Share Raman and (FT)IR Spectra.” *R package*, **1.0.1**.
Identify, and Share Raman and (FT)IR Spectra.” *R package*, **1.0.2**.
[https://github.com/wincowgerDEV/OpenSpecy-package](https://github.com/wincowgerDEV/OpenSpecy-package).
1 change: 1 addition & 0 deletions man/def_features.Rd

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

1 change: 1 addition & 0 deletions man/interactive_plots.Rd

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

1 change: 1 addition & 0 deletions man/read_multi.Rd

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

3 changes: 3 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
library(testthat)
library(OpenSpecy)

library(data.table)
setDTthreads(2)

test_check("OpenSpecy")
2 changes: 0 additions & 2 deletions tests/testthat/test-adj_range.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
library(data.table)

test_that("flatten_range() error handling", {
test <- as_OpenSpecy(x = 1:10, spectra = data.table(V1 = 1:10))

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-as_OpenSpecy.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
library(data.table)

data("raman_hdpe")
df <- read_extdata("raman_hdpe.csv") |> read.csv()

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-conform_spec.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
library(data.table)

data("raman_hdpe")

test_that("conform_spec() throws an error for non-OpenSpecy objects", {
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-gen_OpenSpecy.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
library(data.table)
data("raman_hdpe")
csv <- read_extdata("raman_hdpe.csv") |> read.csv()

Expand Down
6 changes: 2 additions & 4 deletions tests/testthat/test-io_spec.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Loading test data
data(raman_hdpe)

# Create temp dir for testthat
tmp <- file.path(tempdir(), "OpenSpecy-testthat")
dir.create(tmp, showWarnings = F)

library(data.table)
# Loading test data
data(raman_hdpe)

test_that("extdata files are present", {
ed <- read_extdata()
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-manage_spec.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
library(data.table)
data("raman_hdpe")

specs <- lapply(c(read_extdata("raman_hdpe.yml"),
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-read_ext.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
tmp <- file.path(tempdir(), "OpenSpecy-testthat")
dir.create(tmp, showWarnings = F)

library(data.table)

data("raman_hdpe")

test_that("extdata files are present", {
Expand Down
2 changes: 2 additions & 0 deletions vignettes/sop.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ knitr::opts_chunk$set(
comment = "#>",
warning = FALSE
)
data.table::setDTthreads(2)
```

# Document Overview
Expand Down
86 changes: 43 additions & 43 deletions vignettes/sop.html

Large diffs are not rendered by default.

0 comments on commit f4c2107

Please sign in to comment.