Skip to content

fix(plots): apply labels without deprecated relabel helpers - #1559

Open
anevolbap wants to merge 6 commits into
py-econometrics:masterfrom
anevolbap:fix/report-utils-deprecations
Open

anevolbap wants to merge 6 commits into
py-econometrics:masterfrom
anevolbap:fix/report-utils-deprecations

Conversation

@anevolbap

@anevolbap anevolbap commented Sep 15, 2026 •

Copy link
Copy Markdown

Summary

Finishes the deprecation of the relabel helpers in pyfixest/report/utils.py (#1123). Each warning now names the function that was called (all said _relabel_expvar before), and _check_label_keys_in_covars warns too.

iplot() and coefplot() no longer call these helpers. On master both ignored labels unless cat_template was set, and emitted one DeprecationWarning per coefficient. labels now matches full coefficient names or each variable of an interaction term, without splitting variable::value names. iplot(cat_template=...) is deprecated: i() coefficients are already named variable::value, so the template never matched. Docs examples drop cat_template and rename_event_study_coefs(), which had no effect on these plots.

Verification

Passed on 393a866 (master merged in): pixi run -e py312 test-py (5792 passed, 336 s); pytest tests/test_plots.py tests/test_visualize.py tests/test_decomposition.py with extended tests (869 passed, 210 s); pixi run ty; prek run ruff-format and ruff-check on changed files; git diff --check. The new tests fail on master.

Deferred to exact-head CI (ci-tests.yaml, waiting for workflow approval): tests/test_did.py, which needs rpy2 and is not in the local py312 env, and docs-render for the changed iplot docstring and docs pages.

🤖 Generated with Claude Code

iplot() and coefplot() ignored labels unless cat_template was set, and emitted one DeprecationWarning per coefficient. cat_template had no effect on i() names and is now deprecated.
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pyfixest/report/visualize.py 95.00% 1 Missing ⚠️
Flag Coverage Δ
core-tests 80.58% <95.23%> (+0.06%) ⬆️
test-r-core-other 48.43% <28.57%> (-0.02%) ⬇️
test-r-extended 23.01% <28.57%> (+0.02%) ⬆️
test-r-fixest ?
tests-extended ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pyfixest/report/utils.py 96.42% <100.00%> (-1.17%) ⬇️
pyfixest/report/visualize.py 88.70% <95.00%> (-6.92%) ⬇️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@s3alfisc

Copy link
Copy Markdown
Member

Hi @anevolbap, thanks so much for the PR! Is it ready for a review from my side? It seems so at a first glimpse =)

@anevolbap
anevolbap marked this pull request as ready for review September 15, 2026 22:09
@anevolbap

Copy link
Copy Markdown
Author

Hi @anevolbap, thanks so much for the PR! Is it ready for a review from my side? It seems so at a first glimpse =)

Now it is, thanks!

…deprecations

# Conflicts:
#	docs/changelog.qmd

This branch has not been deployed

No deployments
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.

2 participants