Skip to content

Maintenance branch#877

Draft
jbousquin wants to merge 44 commits intodevelopfrom
maintenance-branch
Draft

Maintenance branch#877
jbousquin wants to merge 44 commits intodevelopfrom
maintenance-branch

Conversation

@jbousquin
Copy link
Collaborator

Maintenance & Data Refresh

@jbousquin
Copy link
Collaborator Author

Failures seem consistently related to:

::TADA_IDCensoredData(.data)
 13.     └─EPATADA::TADA_FlagMeasureQualifierCode(.data, clean = FALSE)

@jbousquin
Copy link
Collaborator Author

@cristinamullin feel free to take over this branch to resolve maintenance-bug (tests failing) as discussed on today's call

Review and fix TADA_IDCensoredData, TADA_SimpleCensoredMethods and TADA_FlagMeasureQualifierCode
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

air

[air] reported by reviewdog 🐶

"ResultDetectionConditionText missing"


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

conds <- unique(cens$ResultDetectionConditionText[!is.na(cens$ResultDetectionConditionText)])
if (length(conds) > 0 && any(!conds %in% cond.ref$ResultDetectionConditionText)) {


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

limits <- unique(cens$DetectionQuantitationLimitTypeName[!is.na(cens$DetectionQuantitationLimitTypeName)])
if (length(limits) > 0 && any(!limits %in% limtype.ref$DetectionQuantitationLimitTypeName)) {


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

cens$TADA.Detection_Type %in% c("Non-Detect") &


[air] reported by reviewdog 🐶

cens$TADA.Detection_Type %in% c("Over-Detect") &


[air] reported by reviewdog 🐶

cens$TADA.Detection_Type %in% c("Other") &


[air] reported by reviewdog 🐶

cens$TADA.Detection_Type %in% c("Non-Detect", "Over-Detect", "Other") &


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

if ("Conflict between Condition and Limit" %in% cens$TADA.CensoredData.Flag) {


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

cens$TADA.CensoredData.Flag


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

idx_conflict <- cens.check$TADA.CensoredData.Flag == "Conflict between Condition and Limit"
cens.check$TADA.ResultMeasureValueDataTypes.Flag[idx_conflict] <- "Result Value/Unit Cannot Be Estimated From Detection Limit"


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

.data,
nd_method = "multiplier",
nd_multiplier = 0.5,
od_method = "as-is",
od_multiplier = "null"


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

if (nd_method == "multiplier" & (!is.numeric(nd_multiplier) || length(nd_multiplier) != 1)) {


[air] reported by reviewdog 🐶

if (od_method == "multiplier" & (!is.numeric(od_multiplier) || length(od_multiplier) != 1)) {


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

suppressWarnings(nd$TADA.ResultMeasureValue <- as.numeric(nd$TADA.ResultMeasureValue))


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

suppressWarnings(od$TADA.ResultMeasureValue <- as.numeric(od$TADA.ResultMeasureValue))


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

.data,
clean = FALSE,
flaggedonly = FALSE,
define = TRUE


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

if (isTRUE(define)) TADA_CheckColumns(.data, "ResultIdentifier")


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

any(.x %in% flag.lists$suspect, na.rm = TRUE) ~ "Suspect",
any(.x %in% flag.lists$nondetect, na.rm = TRUE) ~ "Non-Detect",
any(.x %in% flag.lists$overdetect, na.rm = TRUE) ~ "Over-Detect",
any(.x %in% flag.lists$pass, na.rm = TRUE) ~ "Pass",


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

codes <- codes[!is.na(codes)] # drop NA to avoid if(NA) error


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶


[air] reported by reviewdog 🐶

if (sum(final.data$TADA.MeasureQualifierCode.Flag != "Suspect", na.rm = TRUE) == 0) {


[air] reported by reviewdog 🐶

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

coverage-report

File Coverage Missing
All files 38%
R/ATTAINSCrosswalks.R 24% 72-884 1094-1109 1113-1117 1122-1127 1132 1138-1158 1164-1167 1172-1193 1204-1219 1272-1275 1448-1504 1511-1774 1959-1971 1975-1978 1983 2011-2014 2026-2029 2037-2041 2057-2061 2077-2083 2091-2106 2111 2117-2130 2150-2153 2306-2315 2320-2330 2490-2763 2960-3491 3646-3665 3669-3672 3681-3694 3701-3721 3729-3733 3746-3750 3781-3891 3943-4100 4105-4108 4115-4258
R/ATTAINSRefTables.R 0% 17-150
R/autoClean.R 89% 152-153 248-254 413-414 424-428
R/autoFilter.R 45% 31-228 346-348 354 384 416-428
R/CensoredDataSuite.R 88% 126-127 245-246 605-606 611-613 619 622-624 630 637 688-695 698-699 706-720 726-729
R/CriteriaComparison.R 87% 173-177 182 191-193 240-265
R/CriteriaMethods.R 15% 227-238 242-244 261-263 268-270 275-277 287-300 308-335 505-509 525-529 635-961 979-1158 1186-1235 1269-1829 1847-2162
R/CriteriaRefTables.R 35% 65-292 308 344 348 352 358-368 373-378 405-470 509 519-521 527 570-572 578 611 621-623 629
R/DataDiscoveryRetrieval.R 31% 199 210-213 230-233 246-249 255 259 276-751 765-767 775 777 782-789 797 803 805 809 811 817 821 823 833 835 839 845 847 851 853 858 860 864 871-878 886 898-916 927-933 962-980 994-1012 1031 1128-1159 1264-1271 1369-1405 1498-1501 1570-1748
R/DepthProfile.R 0% 102-2020
R/Figures.R 0% 64-1521
R/GeospatialFunctions.R 55% 115-119 194-196 224-226 310 372-373 376-378 444-446 501-503 517 583-585 725 804-809 813 871-873 879-882 949-953 964-969 975-980 986-991 998-1002 1049-1050 1057-1062 1066 1074-1244 1386-1392 1399-1681 1785-1788 1793-1816 1861-1864 1933 1990-1998 2103-2106 2151-2155 2207-2238 2453-2463 2510-2520 2555-2557 2623 2627 2656-2658 2662 2666-2691 2783-2871 3019-3048 3175 3196-3780
R/GeospatialUtilities.R 9% 108 132 188-1748 1808-1810 1846
R/MaintenanceScheduled.R 0% 42-433
R/Maps.R 5% 26-640 752 761-905
R/RequiredCols.R 30% 405-648
R/ResultFlagsDependent.R 59% 60-62 67 110-119 144-151 254 291-295 317-320 327-330 346-362 423 446-448 454-455 461 509-520 526-533 596-599 611 623-634 656-658 671-677 748-875 944-947 1085-1087 1101-1108
R/ResultFlagsIndependent.R 69% 70-72 78 123-157 265-267 272 276 280 290 388-391 403-435 525-527 532-534 543 663-681 696-721 810-812 817-819 828 948-966 981-1168 1213 1235-1254 1267-1272 1412 1416 1474-1489 1494 1498-1505 1569-1570 1665-1681 1753-1758 1879-1893
R/Tables.R 93% 19-30
R/TADAGeospatialRefLayers.R 0% 8-13
R/TADARefTables.R 10% 86-88 105-111 234 268-772 837 846-1210
R/Transformations.R 86% 76-77 82-84 221-232 394-395 444-447 515 792 822-837 924-925 942 973-984 987-1004 1008-1016
R/UnitConversions.R 81% 147 307-315 421 428 435 442-444 451 458-460 469-472 482-484 634-716 738-784 807 855 868-882 1115-1119 1199 1276-1279 1321
R/Utilities.R 58% 12-16 504 622-623 627 632-634 729 858-869 1013-1015 1049-1050 1080-1084 1194-1195 1199-1200 1210-1214 1219-1224 1266-1625 1651-1652 1665-1668 1739-2109 2136-2140 2149-2153 2370 2423 2429-2432 2436 2447 2466-2467 2469-2484 2486 2488 2490-2491 2493-2494 2496-2499 2501 2503 2506 2521 2527 2535 2540 2548-2553 2558-2563 2582 2592-2593
R/WQPWQXRefTables.R 70% 92-141 164-200 241-330 340 363-383 747-749 1033-1042 1052-1061 1064-1074 1088-1154 1176-1178 1199-1208 1235 1256-1265 1292 1313-1322 1346 1367-1376 1398-1403 1424-1502 1532-1534 1555-1564 1584 1613 1617 1626 1637 1648 1664 1667 1680 1686-1700 1714-1723

Minimum allowed coverage is 10%

Generated by 🐒 cobertura-action against ac115b6

@cristinamullin
Copy link
Collaborator

It's Thursday so the WQX/WQP data retrieval is failing. Will try the tests again tomorrow.

@cristinamullin
Copy link
Collaborator

No longer working on this branch, continuing the work here: #878

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants