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

Add keep/drop to coefplot and refactor code to improve maintainability #341

Merged
merged 8 commits into from
Mar 4, 2024

Conversation

Wenzhi-Ding
Copy link
Contributor

Hi Alex,

I now replace coefficients parameter by keep, drop, and exact_match for both coefplot and iplot as mentioned in #323.

In the mean time, I see there are some references to these two functions in FixestMulti and Feols. Changing a parameter in the original function requires changing all functions in these modules if calling them explicitly. So I also do a refactor to these codes use functools.partial so we don't need to bother syncing the changes all across codebase now.

Please feel free to comment or change the code!

Best regards,
Dave

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 76.78571% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 86.13%. Comparing base (35b47e9) to head (823ac89).
Report is 23 commits behind head on master.

Files Patch % Lines
pyfixest/utils/dev_utils.py 20.00% 4 Missing ⚠️
pyfixest/multcomp.py 0.00% 3 Missing ⚠️
pyfixest/summarize.py 0.00% 3 Missing ⚠️
pyfixest/visualize.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #341      +/-   ##
==========================================
+ Coverage   85.79%   86.13%   +0.33%     
==========================================
  Files          38       52      +14     
  Lines        3421     4060     +639     
==========================================
+ Hits         2935     3497     +562     
- Misses        486      563      +77     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@s3alfisc s3alfisc left a comment

Choose a reason for hiding this comment

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

Looks excellent, thank you Dave! I really appreciate the use of functools and the docstring operator - it makes the code base even more compact!

@@ -78,6 +78,7 @@ ignore = [
"D104", # missing docstring in public package
"SIM110", # Use all instead of `for` loop
"TRY003", # Avoid specifying long messages outside the exception class
"D205", # 1 blank line required between summary line and description
Copy link
Member

Choose a reason for hiding this comment

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

Yes, I also did not love that one ... 😄

@s3alfisc s3alfisc merged commit 547e0bc into py-econometrics:master Mar 4, 2024
8 of 9 checks passed
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.

Replace coef argument in plotting functions with drop and keep arguments
2 participants