Skip to content
Merged
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: 0 additions & 14 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,6 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: stepcount
python-version: 3.9

- name: Conda info
shell: bash -el {0}
run: conda info

- name: Pip install stepcount
shell: bash -el {0}
run: pip install stepcount
# run: pip install stepcount

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
14 changes: 0 additions & 14 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ jobs:
extra-packages: any::covr, any::xml2
needs: coverage

- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: stepcount
python-version: 3.9

- name: Conda info
shell: bash -el {0}
run: conda info

- name: Pip install stepcount
shell: bash -el {0}
run: pip install stepcount
# run: pip install stepcount

- name: Test coverage
run: |
cov <- covr::package_coverage(
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: stepcount
Title: Estimate Step Counts from 'Accelerometry' Data
Version: 0.3.3
Version: 0.4.0
Authors@R:
person(given = "John",
family = "Muschelli",
Expand All @@ -20,7 +20,7 @@ Imports:
lubridate,
magrittr,
readr,
reticulate
reticulate (>= 1.42.0)
Suggests:
tidyr,
dplyr,
Expand Down
5 changes: 0 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(conda_create_stepcount)
export(have_stepcount)
export(have_stepcount_condaenv)
export(install_stepcount)
export(sc_download_model)
export(sc_load_model)
export(sc_model_filename)
Expand All @@ -16,6 +13,4 @@ export(stepcount)
export(stepcount_check)
export(stepcount_version)
export(stepcount_with_model)
export(unset_reticulate_python)
export(use_stepcount_condaenv)
importFrom(magrittr,"%>%")
22 changes: 2 additions & 20 deletions R/install_stepcount.R
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
#' Install the `stepcount` Python Module
#' Check the `stepcount` Python Module
#'
#' @param packages packages to install.
#' If `stepcount` is not included, it will be added. This package is
#' known to work with `stepcount==3.2.4`
#' @param ... Additional arguments to pass to [reticulate::py_install()],
#' other than `pip` (`pip = TRUE` enforced)
#'
#' @return Output of [reticulate::py_install]
#' @return A logical value indicating whether the `stepcount` Python module is available.
#' @export
#' @rdname stepcount_setup
#' @examples
#' if (have_stepcount()) {
#' stepcount_version()
#' }
install_stepcount = function(packages = "stepcount",
...) {
if (!any(grepl("^stepcount", trimws(tolower(packages))))) {
packages = unique(c(packages, "stepcount"))
}
reticulate::py_install(
packages = packages,
pip = TRUE, ...)
}

#' @export
#' @rdname stepcount_setup
have_stepcount = function() {
reticulate::py_module_available("stepcount")
}
Expand Down Expand Up @@ -55,4 +38,3 @@ module_version = function(module = "numpy") {
stepcount_version = function() {
module_version("stepcount")
}

59 changes: 0 additions & 59 deletions R/use_stepcount_condaenv.R

This file was deleted.

3 changes: 3 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.onLoad <- function(libname, pkgname) {
reticulate::py_require("stepcount", python_version = "3.10")

Check warning on line 2 in R/zzz.R

View check run for this annotation

Codecov / codecov/patch

R/zzz.R#L2

Added line #L2 was not covered by tests
}
19 changes: 4 additions & 15 deletions man/stepcount_setup.Rd

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

31 changes: 0 additions & 31 deletions man/use_stepcount_condaenv.Rd

This file was deleted.

8 changes: 0 additions & 8 deletions tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
# Learn more about the roles of various files in:
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
# * https://testthat.r-lib.org/articles/special-files.html


library(testthat)
library(stepcount)

if (stepcount::have_stepcount_condaenv()) {
stepcount::unset_reticulate_python()
stepcount::use_stepcount_condaenv()
}


testthat::test_check("stepcount")
Loading