-
Notifications
You must be signed in to change notification settings - Fork 31
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
rip out formula parsing and replace it with something sane #54
Merged
Merged
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
38a5134
drop in new parsing code
kleinschmidt 6ed79ba
use typemax(Int) instead of Inf
kleinschmidt 2c72081
fix onesided formulae
kleinschmidt 969c5bc
more tests are broken
kleinschmidt b162f95
guess debug macro isn't exported
kleinschmidt 94acf5b
get rid of debugging code
kleinschmidt ff277c8
using argcheck in formula: cut the crap and indent
kleinschmidt 0f88bfa
forgot a Compat.findfirst
kleinschmidt 5918628
remove argcheck dependency
kleinschmidt d2e0ba0
updating tests
kleinschmidt 99a411b
actually just use Terms to get functional version of formula
kleinschmidt e28da1b
rewrite rule for interactions with number terms
kleinschmidt c96f6e4
make revise-friendly, deleteat ex.args, missing ||
kleinschmidt e379f25
typo
kleinschmidt cca0e6f
docstrings for new rewrites and update tests
kleinschmidt 0090e78
remove dead code
kleinschmidt 8da82bc
add (deprecated) 2-arg Formula constructor, and tests
kleinschmidt 643bc8c
use different warning tests depending on the version
kleinschmidt bc8c314
use @ static for version check
kleinschmidt f1b98c2
check version against 0.7.0-DEV.2988
kleinschmidt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ julia 0.6 | |
DataFrames 0.11.5 | ||
StatsBase 0.20.1 | ||
Compat 0.63 | ||
ArgCheck | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function Formula(lhs, rhs) | ||
Base.depwarn("Formula(lhs, rhs) is deprecated. Use @eval(@formula($lhs ~ $rhs)) if " * | ||
"parsing is required, or Formula(ex_orig, ex, lhs, rhs) if not", | ||
:Formula) | ||
Formula(:(), :($lhs ~ $rhs), lhs, rhs) | ||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd really prefer we not add a dependency on ArgCheck, since
@argcheck thing "ahhh"
is identical tothing || throw(ArgumentError("ahhh"))
, and the latter is both clearer (IMO) and will provide a cleaner backtrace (nothing about inlined macro expansion from@argcheck
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more of a habit than anything for me so I'm fine to do the checks manually. At this point that wouldn't add too much boilerplate. Your objection is just that argcheck isn't strictly necessary here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. And I always favor fewer dependencies when possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT you removed all uses of
@argcheck
but still added the dependency.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I caught this right after I tagged a release so I pushed another commit on master to remove it. Thanks attobot for showing the requires diff.