Skip to content

Commit

Permalink
Merge pull request #26 from hubverse-org/to-hubverse
Browse files Browse the repository at this point in the history
Rename org name
  • Loading branch information
annakrystalli authored Jun 18, 2024
2 parents d53544c + 2ddd783 commit 3774cb4
Show file tree
Hide file tree
Showing 71 changed files with 502 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Our procedures for contributing bigger changes, code in particular, generally fo

### Pull request process

* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("Infectious-Disease-Modeling-Hubs/hubAdmin", fork = TRUE)`.
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("hubverse-org/hubAdmin", fork = TRUE)`.

* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`.
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
Expand Down
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Authors@R:
person("Evan L.", "Ray", , "[email protected]", role = "ctb"),
person(family = "Consortium of Infectious Disease Modeling Hubs",
role = c("cph")))
Description: A set of utility functions for administering hubverse Infectious Disease Modeling Hubs.
Description: A set of utility functions for administering hubverse Hubs.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Config/testthat/edition: 3
URL: https://github.com/Infectious-Disease-Modeling-Hubs/hubAdmin
BugReports: https://github.com/Infectious-Disease-Modeling-Hubs/hubAdmin/issues
URL: https://github.com/hubverse-org/hubAdmin
BugReports: https://github.com/hubverse-org/hubAdmin/issues
Imports:
checkmate,
cli,
Expand All @@ -43,9 +43,9 @@ Suggests:
rmarkdown,
testthat (>= 3.2.0)
Remotes:
Infectious-Disease-Modeling-Hubs/hubData@feature/handle-samples,
Infectious-Disease-Modeling-Hubs/hubUtils@enhancement/v3-utils
Config/Needs/website: Infectious-Disease-Modeling-Hubs/hubStyle
hubverse-org/hubData@feature/handle-samples,
hubverse-org/hubUtils@enhancement/v3-utils
Config/Needs/website: hubverse-org/hubStyle
Depends:
R (>= 2.10)
LazyData: true
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

# hubAdmin 0.0.1

* Initial package release resulting from split of `hubUtils` package. See [`hubUtils` NEWS.md](https://github.com/Infectious-Disease-Modeling-Hubs/hubUtils/blob/main/NEWS.md) for details including previous release notes.
* Initial package release resulting from split of `hubUtils` package. See [`hubUtils` NEWS.md](https://github.com/hubverse-org/hubUtils/blob/main/NEWS.md) for details including previous release notes.
2 changes: 1 addition & 1 deletion R/check_input.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ check_input <- function(input, property, parent_schema, # nolint: cyclocomp_lint
"!" = "Cannot determine appropriate type for argument
{.arg {property_name}}, type validation skipped.
Schema may be invalid. Consult relevant schema and consider opening an issue at
{.url https://github.com/Infectious-Disease-Modeling-Hubs/schemas/issues}"
{.url https://github.com/hubverse-org/schemas/issues}"
),
call = call
)
Expand Down
12 changes: 6 additions & 6 deletions R/config-schema-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ check_config_schema_version <- function(schema_version, config = c("tasks", "adm
}

check_prefix <- grepl(
"https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/",
"https://raw.githubusercontent.com/(hubverse-org|Infectious-Disease-Modeling-Hubs)/schemas/main/",
schema_version,
fixed = TRUE
fixed = FALSE
)

if (!check_prefix) {
cli::cli_abort(c(
"x" = "Invalid {.code schema_version} property.",
"i" = "Valid {.code schema_version} properties should start with
{.val https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/}
{.val https://raw.githubusercontent.com/hubverse-org/schemas/main/}
and resolve to the schema file's raw contents on GitHub."
))
}
Expand Down Expand Up @@ -89,9 +89,9 @@ validate_schema_version_property <- function(validation, config = c("tasks", "ad
)
}

check_prefix <- grepl("https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/",
check_prefix <- grepl("https://raw.githubusercontent.com/(hubverse-org|Infectious-Disease-Modeling-Hubs)/schemas/main/",

Check warning on line 92 in R/config-schema-utils.R

View workflow job for this annotation

GitHub Actions / lint

file=R/config-schema-utils.R,line=92,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 122 characters.
schema_version,
fixed = TRUE
fixed = FALSE
)

if (!check_prefix) {
Expand All @@ -103,7 +103,7 @@ validate_schema_version_property <- function(validation, config = c("tasks", "ad
keyword = "schema_version prefix",
message = paste(
"Invalid 'schema_version' property. Should start with",
"'https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/'"
"'https://raw.githubusercontent.com/hubverse-org/schemas/main/'"
),
schema = "",
data = schema_version
Expand Down
4 changes: 2 additions & 2 deletions R/create_task_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#' values are required.
#' @param schema_version Character string specifying the json schema version to
#' be used for validation. The default value `"latest"` will use the latest version
#' available in the Infectious Disease Modeling Hubs
#' [schemas repository](https://github.com/Infectious-Disease-Modeling-Hubs/schemas).
#' available in the hubverse
#' [schemas repository](https://github.com/hubverse-org/schemas).
#' Alternatively, a specific version of a schema (e.g. `"v0.0.1"`) can be
#' specified.
#' @details `required` and `optional` vectors for standard task_ids defined in a Hub schema
Expand Down
9 changes: 4 additions & 5 deletions R/validate_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@
#' @param schema_version Character string specifying the json schema version to
#' be used for validation. The default value `"from_config"` will use the
#' version specified in the `schema_version` property of the config file.
#' `"latest"` will use the latest version available in the Infectious Disease
#' Modeling Hubs
#' [schemas repository](https://github.com/Infectious-Disease-Modeling-Hubs/schemas).
#' `"latest"` will use the latest version available in the hubverse
#' [schemas repository](https://github.com/hubverse-org/schemas).
#' Alternatively, a specific version of a schema (e.g. `"v0.0.1"`) can be
#' specified.
#' @param branch The branch of the Infectious Disease Modeling Hubs
#' [schemas repository](https://github.com/Infectious-Disease-Modeling-Hubs/schemas)
#' @param branch The branch of the hubverse
#' [schemas repository](https://github.com/hubverse-org/schemas)
#' from which to fetch schema. Defaults to `"main"`.
#' @return Returns the result of validation. If validation is successful, will
#' return `TRUE`. If any validation errors are detected, returns `FALSE` with
Expand Down
4 changes: 2 additions & 2 deletions R/validate_hub_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ validate_hub_config <- function(hub_path = ".", schema_version = "from_config",
attr(validations, "config_dir") <- fs::path(hub_path, "hub-config")
attr(validations, "schema_version") <- schema_version
attr(validations, "schema_url") <- gsub(
"https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/",
"https://github.com/Infectious-Disease-Modeling-Hubs/schemas/tree/",
"https://raw.githubusercontent.com/hubverse-org/schemas/",
"https://github.com/hubverse-org/schemas/tree/",
unique(schema_url_dirnames),
fixed = TRUE
)
Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ knitr::opts_chunk$set(
```


# hubAdmin <a href="https://Infectious-Disease-Modeling-Hubs.github.io/hubAdmin/"><img src="man/figures/logo.png" align="right" height="131" alt="hubAdmin website" /></a>
# hubAdmin <a href="https://hubverse-org.github.io/hubAdmin/"><img src="man/figures/logo.png" align="right" height="131" alt="hubAdmin website" /></a>

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/hubAdmin)](https://CRAN.R-project.org/package=hubAdmin)
[![R-CMD-check](https://github.com/Infectious-Disease-Modeling-Hubs/hubAdmin/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Infectious-Disease-Modeling-Hubs/hubAdmin/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check](https://github.com/hubverse-org/hubAdmin/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hubverse-org/hubAdmin/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of hubAdmin is to provide a set of utility functions for administering hubverse Infectious Disease Modeling Hubs.
The goal of hubAdmin is to provide a set of utility functions for administering hubverse Hubs.

This package is part of the [hubverse](https://hubdocs.readthedocs.io/en/latest/) ecosystem, which aims to provide a set of tools for infectious disease modeling hubs to share and collaborate on their work.

Expand All @@ -32,7 +32,7 @@ You can install the development version of hubAdmin from [GitHub](https://github

``` r
# install.packages("remotes")
remotes::install_github("Infectious-Disease-Modeling-Hubs/hubAdmin")
remotes::install_github("hubverse-org/hubAdmin")
```

> ##### **Note:**
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# hubAdmin <a href="https://Infectious-Disease-Modeling-Hubs.github.io/hubAdmin/"><img src="man/figures/logo.png" align="right" height="131" alt="hubAdmin website" /></a>
# hubAdmin <a href="https://hubverse-org.github.io/hubAdmin/"><img src="man/figures/logo.png" align="right" height="131" alt="hubAdmin website" /></a>

<!-- badges: start -->

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN
status](https://www.r-pkg.org/badges/version/hubAdmin)](https://CRAN.R-project.org/package=hubAdmin)
[![R-CMD-check](https://github.com/Infectious-Disease-Modeling-Hubs/hubAdmin/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Infectious-Disease-Modeling-Hubs/hubAdmin/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check](https://github.com/hubverse-org/hubAdmin/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hubverse-org/hubAdmin/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of hubAdmin is to provide a set of utility functions for
administering hubverse Infectious Disease Modeling Hubs.
administering hubverse Hubs.

This package is part of the
[hubverse](https://hubdocs.readthedocs.io/en/latest/) ecosystem, which
Expand All @@ -27,7 +27,7 @@ You can install the development version of hubAdmin from

``` r
# install.packages("remotes")
remotes::install_github("Infectious-Disease-Modeling-Hubs/hubAdmin")
remotes::install_github("hubverse-org/hubAdmin")
```

> ##### **Note:**
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
url: https://infectious-disease-modeling-hubs.github.io/hubAdmin/
url: https://hubverse-org.github.io/hubAdmin/
template:
package: hubStyle
8 changes: 4 additions & 4 deletions man/create_output_type_mean.Rd

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

8 changes: 4 additions & 4 deletions man/create_output_type_quantile.Rd

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

8 changes: 4 additions & 4 deletions man/create_target_metadata_item.Rd

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

8 changes: 4 additions & 4 deletions man/create_task_id.Rd

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

9 changes: 4 additions & 5 deletions man/validate_config.Rd

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

9 changes: 4 additions & 5 deletions man/validate_hub_config.Rd

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

4 changes: 2 additions & 2 deletions tests/_snaps/create_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
create_config(rounds)
Output
$schema_version
[1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json"
[1] "https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json"
$rounds
$rounds[[1]]
Expand Down Expand Up @@ -105,7 +105,7 @@
attr(,"class")
[1] "config" "list"
attr(,"schema_id")
[1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json"
[1] "https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json"

# create_config functions error correctly

Expand Down
8 changes: 4 additions & 4 deletions tests/_snaps/create_model_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
attr(,"class")
[1] "model_task" "list"
attr(,"schema_id")
[1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json"
[1] "https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json"

---

Expand Down Expand Up @@ -249,7 +249,7 @@
attr(,"class")
[1] "model_task" "list"
attr(,"schema_id")
[1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json"
[1] "https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json"

# create_output_type_point functions error correctly

Expand Down Expand Up @@ -308,6 +308,6 @@
x `schema_id` attributes are not consistent across all arguments.
Argument `schema_id` attributes:
* task_ids : invalid_schema_id
* output_type : https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json
* target_metadata : https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json
* output_type : https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json
* target_metadata : https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json

6 changes: 3 additions & 3 deletions tests/_snaps/create_model_tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
attr(,"n")
[1] 1
attr(,"schema_id")
[1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json"
[1] "https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json"

---

Expand Down Expand Up @@ -361,7 +361,7 @@
attr(,"n")
[1] 2
attr(,"schema_id")
[1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json"
[1] "https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json"

# create_model_tasks functions error correctly

Expand Down Expand Up @@ -393,5 +393,5 @@
x `schema_id` attributes are not consistent across all items.
Item `schema_id` attributes:
* Item 1 : invalid_schema_id
* Item 2 : https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json
* Item 2 : https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json

2 changes: 1 addition & 1 deletion tests/_snaps/create_output_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
attr(,"n")
[1] 3
attr(,"schema_id")
[1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.0/tasks-schema.json"
[1] "https://raw.githubusercontent.com/hubverse-org/schemas/main/v2.0.0/tasks-schema.json"

# create_output_type functions error correctly

Expand Down
Loading

0 comments on commit 3774cb4

Please sign in to comment.