Repository navigation
Restore installed scoring generics with development S7 - #183
franceslinyc merged 4 commits into
Conversation
|
Thanks for maintaining filtro! I'm planning to submit the next version of S7 to CRAN on November 16 (see RConsortium/S7#786). Would you be able to merge these compatibility changes and submit an updated version of filtro to CRAN before then? Please let me know if you need more time or if there’s anything I can help with. |
|
@t-kalinowski Truly sorry for missing this, but thanks! This branch is now merged. I am on to submitting to CRAN next. |
There was a problem hiding this comment.
🔵 Needs a closer look
The fix relies on S7 build/load/unload hooks and installed-namespace behavior that cannot be validated here against both older and pretest S7 releases.
No open issues 🎉
What changed in this PR
This PR addresses installed scoring-generic failures with development S7, restoring compatibility for filtro and downstream callers.
Changes:
- Calls S7’s build hook after method registration and uses load/unload hooks when available, retaining the older registration fallback.
- Quotes vector-valued score defaults for compatibility with S7 1.0.0.
- Adds a compatibility note to the changelog.
| File | Description |
|---|---|
| R/zzz.R | Adds conditional S7 lifecycle hooks while preserving older-release support. |
| R/class_score.R | Quotes outcome and predictor type defaults. |
| NEWS.md | Documents compatibility updates for S7 > 0.2.2. |
Review effort: Balanced
The S7 1.0.0 reverse-dependency checks found failures in filtro's examples and vignettes and in important's predictor-step tests. The following call from an important test fails with
attempt to apply non-functionwhen filtro 0.2.0 is built with the pretest version of S7. It returns the fitted score with the fix. CRAN pretest resultsWhen filtro registers its methods, temporary bindings shadow imported generics in the installed package.
Run
S7_on_build()after method registration to restore the imported generics. Use the S7 load and unload hooks when available and keepmethods_register()for older releases. Quote the score class's vector defaults so they remain valid constructor defaults with S7 1.0.0.