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

- Corrected usage of grepl in an if-statement in validateIsOfType #123

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

PavelBal
Copy link
Member

@PavelBal PavelBal commented Jan 6, 2023

This was causing test fails when locally performing "check" for ospsuite-r.

@PavelBal PavelBal requested review from msevestre and Yuri05 January 6, 2023 14:00
@@ -81,7 +81,7 @@ validateIsOfType <- function(object, type, nullAllowed = FALSE) {
callStack <- as.character(sys.call(-1)[[1]])

# Object name is one frame further for functions such as ValidateIsNumeric
if ((length(callStack) > 0) && grepl(pattern = "validateIs", x = callStack)) {
if ((length(callStack) > 0) && any(grepl(pattern = "validateIs", x = callStack))) {
Copy link
Member Author

Choose a reason for hiding this comment

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

grepl returns a list of booleans if callStack is larger than 1, but we need a single boolean here.

@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2023

Codecov Report

Base: 99.50% // Head: 99.50% // No change to project coverage 👍

Coverage data is based on head (421a655) compared to base (409d238).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #123   +/-   ##
========================================
  Coverage    99.50%   99.50%           
========================================
  Files           18       18           
  Lines          202      202           
========================================
  Hits           201      201           
  Misses           1        1           
Impacted Files Coverage Δ
R/validation-type.R 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@PavelBal
Copy link
Member Author

PavelBal commented Jan 9, 2023

@Yuri05 test-coverage / test-coverage (pull_request) fails because it cannot install R 4.2.2 (for whatever reason...)

R-CMD-check / windows-latest (devel) (pull_request) because it uses R 4.3 (for whatever reason) which has not been released yet and maybe something has been changed there.

@Yuri05
Copy link
Member

Yuri05 commented Jan 9, 2023

R-CMD-check / windows-latest (devel) (pull_request) because it uses R 4.3 (for whatever reason) which has not been released yet and maybe something has been changed there.

I would suggest to remove all devel checks from the action

@Yuri05
Copy link
Member

Yuri05 commented Jan 9, 2023

I restarted the test coverage and it worked - was just a temporary glitch for sure.

@PavelBal
Copy link
Member Author

PavelBal commented Jan 9, 2023

@Yuri05 removed checks for devel version of R.

Ubuntu job fails with

Error: Failed to get R 4.1.3: Failed to get R 4.1.3: Failed to install R: Error: The process '/usr/bin/sudo' failed with exit code 1

No idea why.

@Yuri05
Copy link
Member

Yuri05 commented Jan 9, 2023

Ubuntu job fails with

@PavelBal Restarted the job with success. Again, seems to be a temporary problem of GitHub(?)

@PavelBal PavelBal merged commit c9f6463 into develop Jan 9, 2023
@PavelBal PavelBal deleted the validateIsOfType-use-of-grepl branch January 9, 2023 12:54
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.

3 participants