Skip to content
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

Improve CompilationException messaging for generic test Jinja rendering #5393

Merged
merged 7 commits into from
Jul 27, 2022

Commits on Jun 17, 2022

  1. feat: Improve generic test UndefinedMacroException message

    The error message rendered from the `UndefinedMacroException` when
    raised by a TestBuilder is very vague as to where the problem is
    and how to resolve it. This commit adds a basic amount of
    information about the specific model and column that is
    referencing an undefined macro.
    
    Note: All custom macros referenced in a generic test config will
    raise an UndefinedMacroException as of v0.20.0.
    nicholasyager committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    2aaf967 View commit details
    Browse the repository at this point in the history
  2. feat: Bubble CompilationException into schemas.py

    I realized that this exception information would be better if
    CompilationExceptions inclulded the file that raised the exception.
    To that end, I created a new exception handler in `_parse_generic_test`
    to report on CompilationExceptions raised during the parsing of
    generic tests. Along the way I reformatted the message returned
    from TestBuilder to play nicely with the the existing formatting of
    `_parse_generic_test`'s exception handling code.
    nicholasyager committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    cc69bca View commit details
    Browse the repository at this point in the history
  3. feat: Add tests to confirm CompileException

    I've added a basic test to confirm that the approriate
    CompilationException when a custom macro is referenced
    in a generic test config.
    nicholasyager committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    d45875d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    72b1d3e View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2022

  1. Update .changes/unreleased/Under the Hood-20220617-150744.yaml

    Thanks to @emmyoop for the recommendation that this be listed as a Fix change instead of an "Under the Hood" change!
    
    Co-authored-by: Emily Rockman <[email protected]>
    nicholasyager and emmyoop authored Jul 21, 2022
    Configuration menu
    Copy the full SHA
    ebf6ee3 View commit details
    Browse the repository at this point in the history
  2. fix: Simplified Compliation Error message

    I've simplified the error message raised during a Compilation Error
    sourced from a test config. Mainly by way of removing tabs and newlines
    where not required.
    nicholasyager committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    2d3ce8e View commit details
    Browse the repository at this point in the history
  3. fix: Convert format to fstring in schemas

    This commit moves a format call to a multiline fstring in the
    schemas.py file for CompilationExceptions.
    nicholasyager committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    e82ceff View commit details
    Browse the repository at this point in the history