Skip to contents

Push term request payloads generated by render_ontology_term_request() to the ontology repository.

Usage

submit_term_request_issues(
  requests,
  repo = "dfo-pacific-science/dfo-salmon-ontology",
  token = NULL,
  dry_run = TRUE,
  confirm = interactive()
)

Arguments

requests

Output from render_ontology_term_request().

repo

Repository slug, defaulting to the DFO salmon ontology.

token

Optional GitHub PAT. If NULL, inferred from gh credentials.

dry_run

If TRUE, returns a preview payload and does not call GitHub.

confirm

If TRUE, prompts before posting each issue.

Value

A tibble summarizing request outcomes with either a dry-run preview or GitHub API response fields (issue_number, issue_url).

Details

In normal development, keep dry_run = TRUE while reviewing; set it to FALSE only after the request payloads look correct.

Examples

sample_gap <- dplyr::tibble(
  dataset_id = "d1",
  table_id = "t1",
  column_name = "run_id",
  code_value = NA_character_,
  target_scope = "column",
  target_sdp_file = "column_dictionary.csv",
  target_sdp_field = "term_iri",
  target_row_key = "run_id",
  dictionary_role = "variable",
  search_query = "run id",
  column_label = "Run ID",
  column_description = "Dataset-specific run identifier",
  top_non_smn_source = "gbif",
  top_non_smn_label = "Run event id",
  top_non_smn_iri = NA_character_,
  top_non_smn_ontology = NA_character_,
  top_non_smn_match_type = "label",
  top_non_smn_score = 0.9,
  candidate_count = 1L,
  non_smn_sources = "gbif",
  placement_recommendation = "profile",
  placement_confidence = 0.82,
  placement_rationale = "Local identifier-like term for workflow tracking."
)
reqs <- render_ontology_term_request(
  sample_gap,
  scope = "auto",
  ask = FALSE,
  profile_name = "local-program"
)
#> Error in render_ontology_term_request(sample_gap, scope = "auto", ask = FALSE,     profile_name = "local-program"): could not find function "render_ontology_term_request"
submit_term_request_issues(reqs, dry_run = TRUE)
#> Error in submit_term_request_issues(reqs, dry_run = TRUE): could not find function "submit_term_request_issues"