Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove required from yamls and associated functions #1951

Merged
merged 10 commits into from
Nov 26, 2024
Merged

Remove required from yamls and associated functions #1951

merged 10 commits into from
Nov 26, 2024

Conversation

lauramaxwell
Copy link
Contributor

@lauramaxwell lauramaxwell commented Nov 18, 2024

Overview

Remove the required field from yaml specs and assume that all columns specified in the spec are required. Adjusts checkSpec() and CombineSpec() appropriately.

Also changes experimental flags to stable for FlagOverTime and report table creation functions

Test Notes/Sample Code

Connected Issues

R/util-CombineSpecs.R Outdated Show resolved Hide resolved
@@ -81,7 +81,7 @@ CheckSpec <- function(lData, lSpec) {
}
# check that required exist in data, if _all required is not specified
if (!isTRUE(lSpec[[strDataFrame]]$`_all`$required)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping required on _all?

R/util-checkSpec.R Outdated Show resolved Hide resolved
Copy link
Contributor

@samussiah samussiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makese sense to me - noticed a few unquoted data types. I'm wondering if the _all$required scenario needs to be reconsidered. It basically just tells ApplySpec to keep everything, but the specification is a little esoteric. That said, if it works it works.

Mapped_STUDY:
_all:
required: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were these meant to be removed? And does it need to be done on:

3_reporting/Bounds.yaml
4_modules/report_kri_country.yaml
4_modules/report_kri_site.yaml

inst/examples/2_AdverseEventWorkflow.R

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we went back and forth, but for the moment, we are leaving the _all specs as is, and will handle them later via #1952

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, added a commit to remove a couple lines of inst/examples/2_AdverseEventWorkflow.R where it was last stragglers for not-_all: required

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice- thanks for catching that!

Copy link
Collaborator

@zdz2101 zdz2101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, depending on which PR we merge first, the additional removal of required: true for study yaml will be needed as well

@lauramaxwell
Copy link
Contributor Author

LGTM, depending on which PR we merge first, the additional removal of required: true for study yaml will be needed as well

Thanks, @zdz2101 - i'm going to merge this in first and then remove the required: true fields for #1957

Copy link
Contributor

@samussiah samussiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very thorough 💯

@samussiah samussiah merged commit 748d78e into dev Nov 26, 2024
6 checks passed
@samussiah samussiah deleted the fix-1936 branch November 26, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants