-
Notifications
You must be signed in to change notification settings - Fork 75
Refactor formula parsing #1118
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
Open
leostimpfle
wants to merge
63
commits into
master
Choose a base branch
from
formula
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor formula parsing #1118
Changes from 26 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
e6a7587
Bypass FormulaParser
leostimpfle f94a814
Reverse order to match hard-coded targets
leostimpfle 3118d18
Fix pre-commit
leostimpfle d0a8821
Freeze _MultipleEstimation
leostimpfle 100c357
Sort independents by default for tests against fixest
leostimpfle f4b2ea0
Encode no fixed effects as None instead of '0'
leostimpfle 2e93cbe
Fix if fixed effects are None
leostimpfle bf82eb6
Fix encoding for multiple estimation of fixed effects
leostimpfle a928a6b
Replace typing.Optional with union type
leostimpfle ce13140
Close #1117
leostimpfle c4d750a
Reorder checks to comply with test failurs
leostimpfle 8e8e5fe
Add new model matrix functionality
leostimpfle f75da04
Add singleton warning
leostimpfle 761ea08
Various fixes (did2s and i()-syntax still failing)
leostimpfle d79f4e9
Fix pre-commit
leostimpfle c24f969
Retain nulls in fixed effect encoding
leostimpfle 972eb66
Refactor fixest::i, closes #782, fixes #921, fixes #1109
leostimpfle 415f5bc
Fix pre-commit
leostimpfle e23e7b2
Deal with log-related infinities
leostimpfle 9219a81
Drop intercept after matrix construction for fixed effects
leostimpfle f3b7e67
Monkey patch formulaic
leostimpfle 986d21d
Encode fixed effects only when non-numeric
leostimpfle be7aa93
Fix inference of reduced_rank
leostimpfle 0e0402d
Use to_numpy
leostimpfle 0e7facf
fix binning to keep values not specified in binning as is instead of NaN
s3alfisc 31714ea
adjust tests for i-interaction
s3alfisc 9aef7c6
Drop first level in factor-factor interaction
leostimpfle ab5695a
explain in docstrings why no fixed effects in formula first and secon…
s3alfisc b8ab4c5
Merge branch 'formula' of https://github.com/py-econometrics/pyfixest…
leostimpfle 51142b0
Rewrite ModelMatrix
leostimpfle 8a1ec74
Add documentation for new ModelMatrix, fix MyPy
leostimpfle e601780
Fix fixed effect encoding
leostimpfle d6d9943
fix circular import
s3alfisc 6cde256
Update saturated with new i synatx
leostimpfle f8e575b
Fix pre-commit
leostimpfle 1a736db
drop use of model_matrix_fixest in did2s & run tests against cached v…
s3alfisc f97e286
all did2s tests marked as pytest.against_r_core
s3alfisc 2f878e9
add new formula functions to docs
s3alfisc 318248f
add deprecation warning for model_matrix_fixest - remove it in future…
s3alfisc 2e70f66
Fix linting and small clean-ups
leostimpfle af3f36a
deprecation warning for FormulaParser
s3alfisc 9543547
move QuantregMulti from FormulaParser to parse()
s3alfisc 5fa7e00
add unit tests for parser, similar to what exists for the legacy Fixe…
s3alfisc 7b62030
add unit tests for parser, similar to what exists for the legacy Fixe…
s3alfisc 148ba50
pacify mypy
s3alfisc 5a69e10
Clean factor_interaction, add tests with null values
leostimpfle ec30160
Fix pre-commit
leostimpfle 3395ce5
Improve docs and function/attribute names
leostimpfle 5661b85
Merge branch 'master' into formula
leostimpfle e67810e
fix incorrect test expectation with IV and fixed effects
s3alfisc 0b4de2d
fix incorrect ordering of fixed effect and IV part of formula
s3alfisc 7065321
test for expected behavior of 0 fixed effects in formula syntax
s3alfisc aa093f6
clarification on overlap between independent, endogenous, instruments
s3alfisc 292b496
clarifications on overlap of dependent, endogenous, instruments
s3alfisc a520f06
fix silent pass through of incorrect syntax of Y ~ X | f1 | f2 by cat…
s3alfisc 4ce3c29
only one tilde in part 2 permitted (same motif as before)
s3alfisc 532049b
is_multiple only checks dependent, independent, fixed effects for mul…
s3alfisc 3704dd9
consolidate multiple estimation flag setting & checks
s3alfisc 1ee80af
add examples to specifications
s3alfisc c21b0e9
Fix pre-commit
leostimpfle 65da109
Remove sort
leostimpfle 647ad27
Remove FORMULAIC_FEATURE_FLAG
leostimpfle 5731196
Fix #1137
leostimpfle 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,7 @@ | ||
| from typing import Final | ||
|
|
||
| from formulaic.parser import DefaultFormulaParser | ||
|
|
||
| FORMULAIC_FEATURE_FLAG: Final[DefaultFormulaParser.FeatureFlags] = ( | ||
| DefaultFormulaParser.FeatureFlags.DEFAULT | ||
| ) |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.