From 0ce3ef5115b00ce658b226996b39718dbbb4f78c Mon Sep 17 00:00:00 2001 From: brycefrank Date: Sat, 21 Sep 2024 13:25:07 -0700 Subject: [PATCH] adding man for pub processing --- man/aggregate_pub_models.Rd | 15 +++++++++++++++ man/create_model_row.Rd | 12 ++++++++++++ man/get_model_hash.Rd | 17 +++++++++++++++++ man/get_params_path.Rd | 14 ++++++++++++++ man/get_pub_file_specs.Rd | 14 ++++++++++++++ man/ingest_models.Rd | 18 ++++++++++++++++++ man/load_parameter_frame.Rd | 21 +++++++++++++++++++++ man/map_publications.Rd | 27 +++++++++++++++++++++++++++ man/set_params_path.Rd | 17 +++++++++++++++++ 9 files changed, 155 insertions(+) create mode 100644 man/aggregate_pub_models.Rd create mode 100644 man/create_model_row.Rd create mode 100644 man/get_model_hash.Rd create mode 100644 man/get_params_path.Rd create mode 100644 man/get_pub_file_specs.Rd create mode 100644 man/ingest_models.Rd create mode 100644 man/load_parameter_frame.Rd create mode 100644 man/map_publications.Rd create mode 100644 man/set_params_path.Rd diff --git a/man/aggregate_pub_models.Rd b/man/aggregate_pub_models.Rd new file mode 100644 index 0000000..8dc21ca --- /dev/null +++ b/man/aggregate_pub_models.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/publication_processing.R +\name{aggregate_pub_models} +\alias{aggregate_pub_models} +\title{Aggregates the set of models in a publication into a model_tbl} +\usage{ +aggregate_pub_models(pub) +} +\arguments{ +\item{pub}{The publication object} +} +\description{ +Aggregates the set of models in a publication into a model_tbl +} +\keyword{internal} diff --git a/man/create_model_row.Rd b/man/create_model_row.Rd new file mode 100644 index 0000000..e0a0c37 --- /dev/null +++ b/man/create_model_row.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/publication_processing.R +\name{create_model_row} +\alias{create_model_row} +\title{Creates a dataframe row from model information} +\usage{ +create_model_row(model, pub, model_id) +} +\description{ +Creates a dataframe row from model information +} +\keyword{internal} diff --git a/man/get_model_hash.Rd b/man/get_model_hash.Rd new file mode 100644 index 0000000..8d5038b --- /dev/null +++ b/man/get_model_hash.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/publication_processing.R +\name{get_model_hash} +\alias{get_model_hash} +\title{Hashes a function string} +\usage{ +get_model_hash(predict_fn_populated, descriptors) +} +\description{ +We need some sort of stable data structure that will serve as a unique ID +for a model, but will also change in the event that the model changes. This +way, models can be "versioned" across time, which may be useful for debugging +purposes down the line. This function trims whitespace and lowercases +the predict_fn_populated pasted with the descriptors, which serves as a +reasonable proxy for the model. +} +\keyword{internal} diff --git a/man/get_params_path.Rd b/man/get_params_path.Rd new file mode 100644 index 0000000..c5164e4 --- /dev/null +++ b/man/get_params_path.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/params.R +\name{get_params_path} +\alias{get_params_path} +\title{Get the parameter search path} +\usage{ +get_params_path() +} +\value{ +A string containing the currently set parameter search path +} +\description{ +Get the parameter search path +} diff --git a/man/get_pub_file_specs.Rd b/man/get_pub_file_specs.Rd new file mode 100644 index 0000000..9035234 --- /dev/null +++ b/man/get_pub_file_specs.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/publication_processing.R +\name{get_pub_file_specs} +\alias{get_pub_file_specs} +\title{Retrieve all publication file names in the publication subdirectories} +\usage{ +get_pub_file_specs(pub_path) +} +\description{ +The publication subdirectories divide the publications into groups sorted +by last name. This function returns a list containing the publication paths +and the publication names. +} +\keyword{internal} diff --git a/man/ingest_models.Rd b/man/ingest_models.Rd new file mode 100644 index 0000000..2e24a87 --- /dev/null +++ b/man/ingest_models.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/publication_processing.R +\name{ingest_models} +\alias{ingest_models} +\title{Ingest a set of models by running the publication files} +\usage{ +ingest_models(verbose, pub_path = NULL, params_path = NULL) +} +\arguments{ +\item{verbose}{If TRUE, print verbose messages} + +\item{pub_path}{A path to a directory containing publication files} + +\item{params_path}{A path to a directory containing parameter files} +} +\description{ +Ingest a set of models by running the publication files +} diff --git a/man/load_parameter_frame.Rd b/man/load_parameter_frame.Rd new file mode 100644 index 0000000..58fc41a --- /dev/null +++ b/man/load_parameter_frame.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/params.R +\name{load_parameter_frame} +\alias{load_parameter_frame} +\title{Load a parameter frame from the models/parameters directory} +\usage{ +load_parameter_frame(name) +} +\arguments{ +\item{name}{The name of the file, excluding the extension} +} +\value{ +A tibble::tbl_df of the parameter data. +} +\description{ +This is a convenience function that allows a user to easily load parameter +files from a directory, and is typically used when creating +`FixedEffectsSet`. By default the function will load parameter frames +from an existing `allometric` installation. For the purposes of testing +publication files locally, refer to `set_params_path`. +} diff --git a/man/map_publications.Rd b/man/map_publications.Rd new file mode 100644 index 0000000..6182d2b --- /dev/null +++ b/man/map_publications.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/publication_processing.R +\name{map_publications} +\alias{map_publications} +\title{Iteratively process publication files} +\usage{ +map_publications(verbose, func, pub_path = NULL, params_path = NULL) +} +\arguments{ +\item{verbose}{Whether or not to print verbose messages to console} + +\item{func}{The publication processing function. It should take a Publication +object as its only argument.} + +\item{pub_path}{An optional path to a publication directory, by +default the internally stored set of publications is used.} + +\item{params_path}{An optional path to a parameters directory, by +default the internally stored set of parameter files is used.} +} +\description{ +This function allows a user to flexibly extract information as it loops over +the publication files. Two main internal use-cases exist for this. First, +it is used to install models as is done in `insall_models()` and, second, +it is used to populate the remote MongoDB. Most users will not be interested +in this function, but it is exposed for usage in the `allodata` package. +} diff --git a/man/set_params_path.Rd b/man/set_params_path.Rd new file mode 100644 index 0000000..6ec6fff --- /dev/null +++ b/man/set_params_path.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/params.R +\name{set_params_path} +\alias{set_params_path} +\title{Set the parameter search path} +\usage{ +set_params_path(params_path) +} +\arguments{ +\item{params_path}{The file path containing parameter files} +} +\description{ +The parameter search path is where `allometric` looks for parameter frames. +By default, the package searches the local installation, however it is +useful when testing publication files to search a local directory, which +can be set here. +}