Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

  • Converts PrettyTables.jl from a hard dependency to a package extension
  • Reduces package load time and dependencies for users who don't need pretty table formatting
  • Maintains backward compatibility with existing API

Changes

  • Made PrettyTables a weak dependency in Project.toml
  • Created SymbolicIndexingInterfacePrettyTablesExt extension module
  • Moved PrettyTables-dependent code to the extension
  • Added fallback implementation for show_params when PrettyTables is not loaded
  • Extension properly overrides the fallback when PrettyTables is available

Test plan

  • Test package loads without PrettyTables
  • Test fallback show_params works correctly
  • Test extension loads when PrettyTables is imported
  • Test PrettyTables formatting works when extension is loaded
  • Format code with JuliaFormatter using SciMLStyle

The package now works without PrettyTables as a hard dependency, but provides enhanced table formatting when PrettyTables is installed.

🤖 Generated with Claude Code

- Made PrettyTables a weak dependency in Project.toml
- Created SymbolicIndexingInterfacePrettyTablesExt extension
- Moved PrettyTables-dependent code to the extension
- Added fallback implementation for show_params when PrettyTables is not loaded
- Extension properly overrides the fallback when PrettyTables is available

The package now works without PrettyTables as a hard dependency,
but provides enhanced table formatting when PrettyTables is installed.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Member

@AayushSabharwal AayushSabharwal left a comment

Choose a reason for hiding this comment

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

Method overwriting is really not the way to do this. The package should define an empty __show_params method which the extension implements. show_params should then check Base.get_extension to see if the extension is loaded, call __show_params if it is and use the fallback if it isn't.

test/downstream/Manifest.toml should not be committed.

@ChrisRackauckas
Copy link
Member

I recommend not spending time to review things right after they come from Claude. It's likely to just get ignored for obvious things like this where it is just starter (or most just get closed)

@ChrisRackauckas ChrisRackauckas merged commit 5f7cd5e into SciML:master Aug 12, 2025
13 of 14 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.

3 participants