Skip to content

PyneCore v6.1.1

Choose a tag to compare

@wallneradam wallneradam released this 25 Jul 17:44
· 126 commits to main since this release

πŸ”§ User Experience Improvements

New Features

  • @pyne Magic Docstring Validation: Added pre-import validation to ensure user scripts contain the required @pyne magic docstring comment at the beginning of the file. This prevents confusing AST transformation errors and provides clear guidance when the magic comment is missing.

  • OHLCV File Format Detection: Added intelligent format detection to prevent CSV files renamed with .ohlcv extension from being read as binary data. The system now detects text files by attempting ASCII decode and shows clear error messages with CLI conversion commands.

Technical Details

  • Script Runner Enhancement: The import_script() function now validates magic docstring presence before attempting module import, reading only the first 1KB for efficient detection
  • OHLCVReader Protection: Binary OHLCV reader now detects text files masquerading as binary format and provides helpful CLI conversion guidance
  • Error Prevention: Both improvements prevent common user errors that previously resulted in confusing error messages or corrupted data

Benefits

  • πŸ›‘οΈ Better Error Prevention: Catches common first-time user mistakes before they cause problems
  • πŸ“š Educational Guidance: Clear error messages teach users the correct workflow
  • πŸ”’ Data Integrity: Prevents CSV files from being interpreted as binary OHLCV data
  • ⚑ User-Friendly: Immediate, actionable feedback for common issues

These improvements specifically address user confusion and data corruption issues reported by early adopters, making PyneCore more robust and user-friendly.