Skip to content

v0.0.12 - Parser Fixes and CI/CD Pipeline

Latest

Choose a tag to compare

@brunovcosta brunovcosta released this 19 Oct 18:20
b6a6b5a

πŸ› Bug Fixes

Parser and Lexer Improvements

  • Fixed lexer keyword matching: Keywords are no longer incorrectly identified within valid identifiers

    • Example: inventory is now correctly parsed instead of being split into IN + ventory
    • This resolves parsing errors for table/column names containing SQL keywords
  • Fixed operator precedence: Expression parsing now correctly respects operator precedence

    • Logical operators (AND, OR) now have lower precedence than comparison operators
    • price > 10 AND stock > 0 is now correctly parsed as (price > 10) AND (stock > 0)
    • Fixes "Unsupported types for AND" errors
  • Added pydantic to requirements.txt: Resolves missing dependency for Pydantic model support

✨ New Features

CI/CD Pipeline

  • GitHub Actions workflow with automated quality checks on every PR
  • Multi-version testing: Tests run on Python 3.9, 3.10, 3.11, and 3.12
  • Code linting: Ruff enforces consistent code style and PEP 8 compliance
  • Type checking: Pyright catches type-related bugs
  • Coverage reporting: Optional Codecov integration

Development Tools

  • Added requirements-dev.txt with pytest, pytest-cov, ruff, and pyright
  • Added ruff.toml configuration for linting and formatting
  • Added pyrightconfig.json for type checking

πŸ”§ Configuration Changes

  • Minimum Python version: Set to 3.9+ (was 3.8+)

    • Required due to modern type hint syntax in the codebase
  • Branch protection: Configured for main branch

    • Blocks direct pushes (PRs only)
    • Requires 7 status checks to pass before merge
    • Auto-deletes branches after merge

πŸ“Š Test Coverage

  • βœ… 190 tests passing across 4 Python versions
  • βœ… All code passes linting (Ruff)
  • βœ… All code passes type checking (Pyright)

πŸ”— Related PRs

  • #1 - Fix operator precedence and lexer keyword matching
  • #2 - Add CI/CD pipeline with pytest, ruff, and pyright

πŸ“¦ Installation

pip install abstra-json-sql==0.0.12

πŸ™ Credits

πŸ€– Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com