From c95cd5f26d3c568823206152d791f774db3eed93 Mon Sep 17 00:00:00 2001 From: cdemkegit Date: Mon, 25 Nov 2024 15:13:56 -0700 Subject: [PATCH] Addresed issue https://github.com/ut-effectiveness/utDataStoR/issues/46 --- DESCRIPTION | 1 + NAMESPACE | 1 + R/display_sql.R | 3 +- R/fte.R | 1 + R/helpers.R | 10 +- R/make_fte_sql.R | 3 +- R/make_headcount_sql.R | 3 +- R/make_retention_sql.R | 3 +- R/utDataStoR-package.R | 7 ++ R/validations.R | 9 +- docs/articles/naming_metrics.html | 12 +- docs/pkgdown.yml | 2 +- docs/reference/create_sql_dir.html | 38 +++++-- docs/reference/display_sql_with_comments.html | 24 +++- docs/reference/figures/lifecycle-archived.svg | 21 ++++ docs/reference/figures/lifecycle-defunct.svg | 21 ++++ .../figures/lifecycle-deprecated.svg | 21 ++++ .../figures/lifecycle-experimental.svg | 21 ++++ docs/reference/figures/lifecycle-maturing.svg | 21 ++++ .../figures/lifecycle-questioning.svg | 21 ++++ .../figures/lifecycle-soft-deprecated.svg | 21 ++++ docs/reference/figures/lifecycle-stable.svg | 29 +++++ .../figures/lifecycle-superseded.svg | 21 ++++ docs/reference/index.html | 63 ++++++++--- docs/reference/make_fte_sql.html | 30 ++++- docs/reference/make_headcount_sql.html | 34 +++++- docs/reference/make_retention_sql.html | 20 +++- docs/reference/sql_fte.html | 7 +- docs/reference/sql_validate_buildings.html | 18 ++- docs/reference/sql_validate_courses.html | 18 ++- docs/reference/sql_validate_graduation.html | 18 ++- docs/reference/sql_validate_rooms.html | 18 ++- docs/reference/sql_validate_student.html | 17 ++- .../sql_validate_student_courses.html | 18 ++- docs/reference/utDataStoR-package.html | 105 ++++++++++++++++++ docs/reference/write_sql_file.html | 43 +++++-- docs/search.json | 2 +- docs/sitemap.xml | 3 + man/create_sql_dir.Rd | 11 +- man/display_sql_with_comments.Rd | 8 +- man/figures/lifecycle-archived.svg | 21 ++++ man/figures/lifecycle-defunct.svg | 21 ++++ man/figures/lifecycle-deprecated.svg | 21 ++++ man/figures/lifecycle-experimental.svg | 21 ++++ man/figures/lifecycle-maturing.svg | 21 ++++ man/figures/lifecycle-questioning.svg | 21 ++++ man/figures/lifecycle-soft-deprecated.svg | 21 ++++ man/figures/lifecycle-stable.svg | 29 +++++ man/figures/lifecycle-superseded.svg | 21 ++++ man/make_fte_sql.Rd | 9 +- man/make_headcount_sql.Rd | 11 +- man/make_retention_sql.Rd | 6 +- man/sql_fte.Rd | 3 +- man/sql_validate_buildings.Rd | 4 +- man/sql_validate_courses.Rd | 4 +- man/sql_validate_graduation.Rd | 4 +- man/sql_validate_rooms.Rd | 4 +- man/sql_validate_student.Rd | 5 +- man/sql_validate_student_courses.Rd | 4 +- man/utDataStoR-package.Rd | 31 ++++++ man/write_sql_file.Rd | 10 +- 61 files changed, 906 insertions(+), 133 deletions(-) create mode 100644 R/utDataStoR-package.R create mode 100644 docs/reference/figures/lifecycle-archived.svg create mode 100644 docs/reference/figures/lifecycle-defunct.svg create mode 100644 docs/reference/figures/lifecycle-deprecated.svg create mode 100644 docs/reference/figures/lifecycle-experimental.svg create mode 100644 docs/reference/figures/lifecycle-maturing.svg create mode 100644 docs/reference/figures/lifecycle-questioning.svg create mode 100644 docs/reference/figures/lifecycle-soft-deprecated.svg create mode 100644 docs/reference/figures/lifecycle-stable.svg create mode 100644 docs/reference/figures/lifecycle-superseded.svg create mode 100644 docs/reference/utDataStoR-package.html create mode 100644 man/figures/lifecycle-archived.svg create mode 100644 man/figures/lifecycle-defunct.svg create mode 100644 man/figures/lifecycle-deprecated.svg create mode 100644 man/figures/lifecycle-experimental.svg create mode 100644 man/figures/lifecycle-maturing.svg create mode 100644 man/figures/lifecycle-questioning.svg create mode 100644 man/figures/lifecycle-soft-deprecated.svg create mode 100644 man/figures/lifecycle-stable.svg create mode 100644 man/figures/lifecycle-superseded.svg create mode 100644 man/utDataStoR-package.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 813a8b7..8ec4245 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,6 +18,7 @@ BugReports: https://github.com/ut-effectiveness/utDataStoR/issues Imports: fs, here, + lifecycle, readr Suggests: rmarkdown, diff --git a/NAMESPACE b/NAMESPACE index 53bbb17..87ad3c3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -15,4 +15,5 @@ export(sql_validate_student_courses) export(write_sql_file) importFrom(fs,file_copy) importFrom(here,here) +importFrom(lifecycle,deprecated) importFrom(readr,read_file) diff --git a/R/display_sql.R b/R/display_sql.R index 818a524..9ebdd66 100644 --- a/R/display_sql.R +++ b/R/display_sql.R @@ -1,8 +1,7 @@ #' Display sql with comments -#' #' This function returns the content of a specified SQL file, including any comments within #' the file. The function should used within a sql code chunk (```sql ``` ) in R markdown within single back tick. -#' Please refer to the example section for better understanding. +#' `r lifecycle::badge("stable")` #' #' @param folder A character string specifying the folder within `inst/sql` where the SQL file is located. #' Must be within quotes. diff --git a/R/fte.R b/R/fte.R index d8d38ac..ad7008a 100644 --- a/R/fte.R +++ b/R/fte.R @@ -1,4 +1,5 @@ #' Generate FTE SQL +#' `r lifecycle::badge("deprecated")` #' #' `sql_fte` was intended to generate the standard sql query for pulling FTE from Edify, REPT #' of DSCIR. We have deprecated this function and will use "make_fte_sql()" instead. diff --git a/R/helpers.R b/R/helpers.R index b0f3489..f0a60dc 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -1,13 +1,11 @@ -#' Generate Helper Functions -#' #' `create_sql_dir` will generate the path used to house the sql files based on the context parameter. -#' #' The create_sql_dir function checks if a directory for SQL files exists based on the specified #' context (project, shiny, or sandbox) and creates one if it doesn't. This ensures the correct folder #' structure is set up for different project environments. +#' `r lifecycle::badge("stable")` #' #' @param context The context of your project. Options are: "project", "shiny", or "sandbox". -#' If not specified, "project" is used bydefault. +#' If not specified, "project" is used by default. #' #' @export #' @@ -30,14 +28,12 @@ create_sql_dir <- function(context = "project") { Please use the 'utHelpR::make_standard_folders()' function instead for improved functionality and support.") } -#' Write SQL Files Functions -#' #' `write_sql_files` will copy and move the sql file based on the context parameter. -#' #' The write_sql_file function copies a specified SQL file from a source folder to a target directory, #' determined by the context (shiny, sandbox, or project). Using the `fs::file_copy` function, #' it places the file in the appropriate path (e.g., in the inst/sql folder for shiny, sandbox/sql for #' sandbox, or the main sql directory otherwise). +#' `r lifecycle::badge("stable")` #' #' @param context The context of your project. "project", "shiny", and "sandbox" #' @param file The name of the SQL file that you want to copy to a new location diff --git a/R/make_fte_sql.R b/R/make_fte_sql.R index 8022c82..9a3933b 100644 --- a/R/make_fte_sql.R +++ b/R/make_fte_sql.R @@ -1,11 +1,10 @@ -#' Generate fte sql -#' #' `make_fte_sql` function will generate the standard SQL query for pulling Full-Time #' Equivalent (FTE) data from Edify.This function allows users to retrieve FTE data based on #' different available data sources. Use the `type` parameter to select the specific FTE data #' type. Available options are: "current", "census" and "eot" (end of term). For more details see #' the fte (full time quivalent) vignette. You can bring this up by running the following code in #' your console: \code{vignette("full_time_equivalent", package = "utDataStoR")} +#' #' `r lifecycle::badge("stable")` #' #' @param name The name you want the SQL file to have in your sql folder. This is a string and #' must be provided in quotes (e.g., "your_filename.sql"). diff --git a/R/make_headcount_sql.R b/R/make_headcount_sql.R index 8f7f405..0fa4b0f 100644 --- a/R/make_headcount_sql.R +++ b/R/make_headcount_sql.R @@ -1,5 +1,3 @@ -#' Generate headcount Sql -#' #' `make_headcount_sql` will generate a standard sql query for pulling headcount #' data from Edify. This function is often used with the function [utHelpR::uth_make_outcome_count] to #' produce pivot tables with headcount numbers. There are several types of headcounts @@ -8,6 +6,7 @@ #' contact Joy Lindsay. For more details see the headcount vignette. You can bring this #' up by running the following code in your console. #' \code{vignette("headcount", package = "utDataStoR")} +#' `r lifecycle::badge("stable")` #' #' #' @param name The name you want the SQL file to have in your sql folder. This is a string and must be provided in quotes diff --git a/R/make_retention_sql.R b/R/make_retention_sql.R index ed747ac..e7eb170 100644 --- a/R/make_retention_sql.R +++ b/R/make_retention_sql.R @@ -1,8 +1,7 @@ -#' Generate Retention Sql -#' #' `make_retention_sql` will generate the standard SQL query for pulling retention #' data from Edify. This function helps in retrieving data related to student retention metrics. #' To specify the type of retention data you would like, use the `type` parameter. +#' `r lifecycle::badge("stable")` #' #' @param name The name you want the SQL file to have in your sql folder. This is a string and must be provided in quotes #' (e.g., "your_filename.sql"). diff --git a/R/utDataStoR-package.R b/R/utDataStoR-package.R new file mode 100644 index 0000000..425b3c1 --- /dev/null +++ b/R/utDataStoR-package.R @@ -0,0 +1,7 @@ +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +#' @importFrom lifecycle deprecated +## usethis namespace: end +NULL diff --git a/R/validations.R b/R/validations.R index 1ac4f99..f1f07e5 100644 --- a/R/validations.R +++ b/R/validations.R @@ -1,7 +1,7 @@ -#' Generate Validation SQL -#' #' `sql_validate_student` will generate the standard sql query for pulling Student Validations from Edify. #' Validations are done through Edify. +#' `r lifecycle::badge("experimental")` +#' #' #' @param data_source The server you will be full from. Currently, Edify. #' @param name The name you want the SQL file to have in your sql folder. This is a string and must be provided in quotes @@ -25,6 +25,7 @@ sql_validate_student <- function(data_source, name, context) { #' `sql_validate_student_courses` will generate the standard sql query for pulling Student Course Validations from Edify. #' Validations are done through Edify. +#' `r lifecycle::badge("experimental")` #' #' @param data_source The server you will be full from. Currently, Edify. #' @param name The name you want the SQL file to have in your sql folder. This is a string and must be provided in quotes @@ -48,6 +49,7 @@ sql_validate_student_courses <- function(data_source, name, context) { #' `sql_validate_courses` will generate the standard sql query for pulling Course Validations from Edify. #' Validations are done through Edify. +#' `r lifecycle::badge("experimental")` #' #' @param data_source The server you will be full from. Currently, Edify. #' @param name The name you want the SQL file to have in your sql folder. This is a string and must be provided in quotes @@ -71,6 +73,7 @@ sql_validate_courses <- function(data_source, name, context) { #' `sql_validate_graduation` will generate the standard sql query for pulling Graduation Validations from Edify. #' Validations are done through Edify. +#' `r lifecycle::badge("experimental")` #' #' @param data_source The server you will be full from. Currently, Edify. #' @param name The name you want the SQL file to have in your sql folder. This is a string and must be provided in quotes @@ -94,6 +97,7 @@ sql_validate_graduation <- function(data_source, name, context) { #' `sql_validate_rooms` will generate the standard sql query for pulling Rooms Validations from Edify. #' Validations are done through Edify. +#' `r lifecycle::badge("experimental")` #' #' @param data_source The server you will be full from. Currently, Edify. #' @param name The name you want the SQL file to have in your sql folder. This is a string and must be provided in quotes @@ -117,6 +121,7 @@ sql_validate_rooms <- function(data_source, name, context) { #' `sql_validate_buildings` will generate the standard sql query for pulling Building Validations from Edify. #' Validations are done through Edify. +#' `r lifecycle::badge("experimental")` #' #' @param data_source The server you will be full from. Currently, Edify. #' @param name The name you want the SQL file to have in your sql folder. This is a string and must be provided in quotes diff --git a/docs/articles/naming_metrics.html b/docs/articles/naming_metrics.html index b94d9f8..63ec276 100644 --- a/docs/articles/naming_metrics.html +++ b/docs/articles/naming_metrics.html @@ -152,22 +152,22 @@

Metric Name DiagramList of Computations

List of Computations

-
- +
+

List of Computations and Partitions

List of Computations and Partitions

-
- +
+

List of Metrics

List of Computations, Partitions, and Segments

-
- +
+