Skip to content

Commit

Permalink
Move extract_schema_version to hubUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
annakrystalli committed May 15, 2024
1 parent 8458223 commit d9a1c81
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 40 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Suggests:
testthat (>= 3.2.0)
Remotes:
Infectious-Disease-Modeling-Hubs/hubData,
Infectious-Disease-Modeling-Hubs/hubUtils
Infectious-Disease-Modeling-Hubs/hubUtils@enhancement/v3-utils
Config/Needs/website: Infectious-Disease-Modeling-Hubs/hubStyle
Depends:
R (>= 2.10)
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export(create_target_metadata)
export(create_target_metadata_item)
export(create_task_id)
export(create_task_ids)
export(extract_schema_version)
export(validate_config)
export(validate_hub_config)
export(validate_model_metadata_schema)
Expand Down
2 changes: 1 addition & 1 deletion R/config-schema-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ get_config_file_schema_version <- function(config_path, config) {
config = config
)

version <- extract_schema_version(config_schema_version)
version <- hubUtils::extract_schema_version(config_schema_version)

if (length(version) == 0L) {
cli::cli_abort(
Expand Down
2 changes: 1 addition & 1 deletion R/create_output_type_item.R
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ create_output_type_sample <- function(is_required, output_type_id_type, max_leng

schema <- download_tasks_schema(schema_version, branch)

if (extract_schema_version(schema$`$id`) < "v3.0.0") {
if (hubUtils::extract_schema_version(schema$`$id`) < "v3.0.0") {
cli::cli_abort(
"This function is only supported for schema versions {.val v3.0.0} and above."
)
Expand Down
10 changes: 0 additions & 10 deletions R/utils.R

This file was deleted.

19 changes: 0 additions & 19 deletions man/extract_schema_version.Rd

This file was deleted.

7 changes: 0 additions & 7 deletions tests/testthat/test-utils.R

This file was deleted.

0 comments on commit d9a1c81

Please sign in to comment.