Skip to content

Conversation

@billdenney
Copy link
Contributor

No description provided.

@billdenney billdenney linked an issue Jun 30, 2025 that may be closed by this pull request
Copy link
Contributor Author

@billdenney billdenney left a comment

Choose a reason for hiding this comment

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

@mattfidler Can you please take a look at these two tests? I think that we may need to change the behavior, but I'm not sure.

)
# `useErrorLine = TRUE` and `returnAllLines = FALSE`
# no lines with `a` on the LHS are returned
## TODO: Is this the intended behavior? I expected line 1 to be returned.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattfidler, Can you please take a look at this? I think it may be a bug.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think it is a bug, I think this is used in modelExtract(), but I could be wrong.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps I don't understand what you are trying to do enough to say.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What I'm trying to do immediately is have simpler tests to understand the methods used. Then, with simpler tests, I can make modifications knowing that I won't accidentally break anything (and I don't have to wait for the full test suite to run).

So, overall right now, I'm adding tests for code behavior and logically checking that there aren't any accidental bugs. (I did find one where model(a ~ NULL) would not remove the line.) It sounds like this one is intended as-is.


# `useErrorLine = TRUE` and `returnAllLines = FALSE`; altExpr gives the actual value
# `d` is never an LHS value so NULL is returned
# TODO: It's unclear why the warning "with single endpoint model prediction 'a' is changed to 'd'" occurs.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattfidler, Can you please take a look at this? The output makes sense to me, but the warning suggests that the model is changed when it is not. I'm not sure what the intent of the warning is.

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.

Cannot remove an if() block via model piping

3 participants