-
Notifications
You must be signed in to change notification settings - Fork 31
Add compatibility with PrettyTable v3.0 #498
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
base: main
Are you sure you want to change the base?
Conversation
Hi @gragusa thanks for this PR! This is very helpful. Could I ask you to add a test for this please? I think the most sensible place is in |
formatters = formatter, | ||
tf = isdefined(PrettyTables, :borderless) ? PrettyTables.borderless : PrettyTables.tf_borderless, | ||
) | ||
if pkgversion(PrettyTables) < v"3.0" |
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.
if pkgversion(PrettyTables) < v"3.0" | |
@static if pkgversion(PrettyTables) < v"3.0" |
I'm not sure it really makes a difference, but it probably can't hurt.
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.
pkgversion
is not supported on Julia < 1.9. IMO the easiest (for the compiler and for maintenance) would be to just require PrettyTables 3 and not introduce any code that is conditional on the loaded PrettyTables version.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #498 +/- ##
==========================================
- Coverage 88.33% 87.98% -0.35%
==========================================
Files 20 20
Lines 1354 1315 -39
==========================================
- Hits 1196 1157 -39
Misses 158 158 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
MCMCChains currently targets the PrettyTables.jl 2.x API. This PR adds compatibility with PrettyTables.jl 3.x while preserving the existing 2.x behavior. Downstream packages that still depend on PrettyTables 2.x will continue to work, and environments that can upgrade to 3.x will automatically use the new API.