Skip to content

Commit 458a8c8

Browse files
authored
Merge pull request #51 from pepkit/dev
Release 0.5.1
2 parents 150b52d + 23033f0 commit 458a8c8

29 files changed

Lines changed: 886 additions & 402 deletions

.Rbuildignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010

1111
CNAME
1212
test.sh
13-
.github
13+
.github
14+
^cran-comments\.md$

.github/workflows/R-CMD-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
config:
2323
- {os: windows-latest, r: 'release'}
2424
- {os: macOS-latest, r: 'release'}
25-
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
25+
- {os: ubuntu-latest, r: 'release'}
2626

2727
env:
2828
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ docs
1414
doc
1515
Meta
1616
pepr.Rcheck/
17-
pepr_*.tar.gz
17+
pepr_*.tar.gz
18+
cran-comments.md

DESCRIPTION

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
Package: pepr
22
Type: Package
33
Title: Reading Portable Encapsulated Projects
4-
Version: 0.5.0
5-
Date: 2023-11-16
4+
Version: 0.6.0
5+
Date: 2026-02-27
66
Authors@R: c(person("Nathan", "Sheffield", email = "nathan@code.databio.org",
77
role = c("aut", "cph","cre")),person("Michal","Stolarczyk",email="michal@virginia.edu",role=c("aut")))
88
Maintainer: Nathan Sheffield <nathan@code.databio.org>
9-
Description: A PEP, or Portable Encapsulated Project, is a dataset that
9+
Description: A PEP, or Portable Encapsulated Project, is a dataset that
1010
subscribes to the PEP structure for organizing metadata. It is written using
11-
a simple YAML + CSV format, it is your one-stop solution to metadata
12-
management across data analysis environments. This package reads this
13-
standardized project configuration structure into R.
11+
a simple YAML + CSV format, it is your one-stop solution to metadata
12+
management across data analysis environments. This package reads this
13+
standardized project configuration structure into R.
1414
Described in Sheffield et al. (2021) <doi:10.1093/gigascience/giab077>.
1515
Imports:
1616
yaml,
1717
stringr,
18-
pryr,
1918
data.table,
2019
methods,
21-
RCurl
20+
RCurl,
21+
httr2
2222
Suggests:
2323
knitr,
24-
testthat,
24+
testthat (>= 3.1.2),
2525
rmarkdown,
2626
curl
2727
VignetteBuilder: knitr
2828
License: BSD_2_clause + file LICENSE
29-
BugReports: https://github.com/pepkit/pepr
30-
RoxygenNote: 7.2.3
29+
BugReports: https://github.com/pepkit/pepr/issues
30+
RoxygenNote: 7.3.3
3131
Encoding: UTF-8

NAMESPACE

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ export(getSample)
1818
export(getSubsample)
1919
export(listAmendments)
2020
export(makeSectionsAbsolute)
21+
export(pullProject)
2122
export(sampleTable)
23+
export(saveJWT)
24+
export(saveProject)
2225
exportClasses(Config)
2326
exportClasses(Project)
2427
exportMethods("$")
2528
exportMethods("[")
2629
exportMethods("[[")
2730
import(RCurl)
28-
import(pryr)
31+
import(httr2)
2932
import(stringr)
3033
import(yaml)
3134
importFrom(methods,as)

NEWS.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# pepr 0.6.0 - 2026-02-27
2+
3+
## Added
4+
5+
* `pullProject()` to fetch PEPs from PEPhub API via registry paths (e.g., `databio/example:default`)
6+
* `saveProject()` to write a Project object to local files (config YAML + sample CSVs)
7+
* `saveJWT()` to store an authentication token for private PEPs
8+
* PEPhub integration vignette examples in Getting Started guide
9+
10+
## Changed
11+
12+
* Replaced `httr` with `httr2` for PEPhub API calls
13+
* Replaced `tidyr` dependency with base R for subsample unnesting
14+
* Added mocked tests for PEPhub API (CRAN-compatible)
15+
* Graceful error handling when PEPhub API is unreachable
16+
17+
# pepr 0.5.1 - 2026-02-27
18+
19+
## Changed
20+
21+
* Removed dependency on archived `pryr` package; replaced `pryr::partial()` with base R anonymous functions
22+
* Fixed BugReports URL in DESCRIPTION
23+
* Updated all pep.databio.org URLs to current paths
24+
* Removed codecov badge from README
25+
126
# pepr 0.5.0 - 2023-11-16
227

328
## Fixed
@@ -55,7 +80,7 @@
5580

5681
## Changed
5782

58-
* **project configuration file to follow [PEP2.0.0 specification](http://pep.databio.org/en/2.0.0/specification/).** Browse the specification for changes related to config format
83+
* **project configuration file to follow [PEP2.0.0 specification](https://pep.databio.org/spec/specification/).** Browse the specification for changes related to config format
5984

6085

6186
# pepr 0.2.2 - 2020-01-09

R/config.R

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ setMethod("initialize", "Config", function(.Object, data) {
2626
#' @export
2727
#' @rdname Config-class
2828
Config = function(file, amendments = NULL) {
29+
### if the config from the Project constructor is a list and not a filepath, it is from a PEP fetched from PEPhub
30+
if (typeof(file) == 'list') {
31+
config = methods::new("Config", data = file)
32+
return(config)
33+
}
2934
message("Loading config file: ", file)
3035
cfg_data = .loadConfig(filename = file, amendments = amendments)
3136
config = methods::new("Config", data = cfg_data)
@@ -58,7 +63,7 @@ setMethod(
5863
#' .expandList(x)
5964
#' @export
6065
#' @keywords internal
61-
.expandList <- function(x) {
66+
.expandList = function(x) {
6267
if (is.list(x))
6368
return(lapply(x, .expandList))
6469
if (length(x) > 1)
@@ -81,7 +86,7 @@ setMethod(
8186
#' .getSubscript(l, 1) == .getSubscript(l, "a")
8287
#' @export
8388
#' @keywords internal
84-
.getSubscript <- function(lst, i) {
89+
.getSubscript = function(lst, i) {
8590
if (is.character(i))
8691
return(grep(paste0("^", i, "$"), names(lst)))
8792
return(i)
@@ -135,7 +140,7 @@ setMethod("[[", "Config", function(x, i) {
135140
})
136141

137142

138-
.DollarNames.Config <- function(x, pattern = "")
143+
.DollarNames.Config = function(x, pattern = "")
139144
grep(paste0("^", pattern), grep(names(x), value = TRUE))
140145

141146
#' @rdname select-config
@@ -170,7 +175,7 @@ setMethod(
170175
),
171176
definition = function(object, sections, cfgPath) {
172177
# Enable creation of absolute path using given parent folder path.
173-
absViaParent = pryr::partial(.makeAbsPath, parent = dirname(cfgPath))
178+
absViaParent = function(x) .makeAbsPath(x, parent = dirname(cfgPath))
174179
for (section in sections) {
175180
if (section %in% names(object))
176181
object[[section]] = absViaParent(object[[section]])
@@ -297,7 +302,7 @@ setMethod(
297302
# or for user information when the Project is created, where message
298303
# is preferred
299304
if (!style == "message") {
300-
printFun = pryr::partial(cat, fill = T)
305+
printFun = function(...) cat(..., fill = TRUE)
301306
} else{
302307
printFun = message
303308
}

R/constants.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ CFG_DUPLICATE_KEY = "duplicate"
2020
CFG_REMOVE_KEY = "remove"
2121
CFG_LOOPER_KEY = "looper"
2222
SAMPLE_NAME_ATTR = "sample_name"
23-
SUBSAMPLE_NAME_ATTR = "subsample_name"
23+
SUBSAMPLE_NAME_ATTR = "subsample_name"
24+
BASE_URL = "https://pephub-api.databio.org/api/v1/"

R/pepr.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' @author Michal Stolarczyk, Nathan Sheffield
88
#' @import yaml
99
#' @import stringr
10-
#' @import pryr
10+
#' @import httr2
1111
#'
1212
#' @references
1313
#' GitHub: \url{https://github.com/pepkit/pepr}, Documentation: \url{https://code.databio.org/pepr/}

0 commit comments

Comments
 (0)