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

refactor: Reduce SchemaValidationError traceback length #3530

Merged
merged 31 commits into from
Aug 31, 2024

Commits on Aug 8, 2024

  1. refactor: Move comment to SchemaValidationError.__init__

    No information is lost, still available on hover.
    The comment itself is not helpful to users and would be presented on every validation error
    dangotbanned committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    8aa59d8 View commit details
    Browse the repository at this point in the history
  2. docs: Reduce repetition and rearrange SchemaBase.to_dict

    Moved repeat info to *Notes*, which should come last https://numpydoc.readthedocs.io/en/latest/format.html#notes
    Removed redundant *Returns*
    Minor changes to improve readability
    dangotbanned committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    1f60847 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90b0a03 View commit details
    Browse the repository at this point in the history
  4. refactor: Use genexpr instead of dictcomp

    Saves 2 lines, identical result, maybe faster due to not allocating an intermediate dict
    dangotbanned committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    f700cff View commit details
    Browse the repository at this point in the history
  5. refactor: Use ternary exprs for context, ignore

    All `...ChannelMixin` already use this form. Saves 2 lines
    dangotbanned committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    0c2e216 View commit details
    Browse the repository at this point in the history
  6. refactor: Alias kwds filter to exclude

    Saves only 1 line, but collapses the dict comp.
    The `:=` expr doesn't reduce lines, but does reduce characters
    dangotbanned committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    7a121df View commit details
    Browse the repository at this point in the history
  7. refactor: Call _to_dict from a single site

    Saves 2 lines, avoids repeating the 3 kwargs - but allows modified `context`
    dangotbanned committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    502140b View commit details
    Browse the repository at this point in the history
  8. wip

    dangotbanned committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    fca2e62 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    01a8ae3 View commit details
    Browse the repository at this point in the history
  10. refactor: Factor out large block to _replace_parsed_shorthand

    As with the change to `SchemaValidationError`, the information is available in a docstring if needed.
    But no longer is displayed to the user on a validation error
    dangotbanned committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    4943c34 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2024

  1. refactor: Factor out optional imports to _get_optional_modules

    Removes 5 lines.
    Has the additional benefit of replacing an identical block in `SchemaBase.validate_property`.
    Therefore reduces the maintenance burden of keeping comments in sync
    dangotbanned committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    44d2873 View commit details
    Browse the repository at this point in the history
  2. feat(typing): Update api._top_schema_base to work with `super(..., …

    …copy)`
    
    The call to `.to_dict`, and 3 line comment also appeared in the traceback for validation errors on `ChartType`s.
    This removes the need for the comment and type ignore that it is describing.
    See vega#3480 for more info on the introduction of `_top_schema_base`
    dangotbanned committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    1a51948 View commit details
    Browse the repository at this point in the history
  3. fix: Use class name instead of metaclass name in error

    Discovered during debugging that the rhs always evaluated as `type`, which was not intentional
    dangotbanned committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    48162ed View commit details
    Browse the repository at this point in the history
  4. docs: Propagate to_dict changes to from_dict, to_json

    Just to keep things consistent
    dangotbanned committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    788dca4 View commit details
    Browse the repository at this point in the history
  5. docs: Propagate changes to api.(TopLevelMixin|Chart)

    Should achieve greater consistency across the public API
    dangotbanned committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    b86bd2f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f7f6ac2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    16e70d3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0cae615 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2024

  1. Configuration menu
    Copy the full SHA
    8462279 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2024

  1. Configuration menu
    Copy the full SHA
    abb3d76 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. Configuration menu
    Copy the full SHA
    ed0f872 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. Configuration menu
    Copy the full SHA
    d8c25b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    39969e3 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2024

  1. Configuration menu
    Copy the full SHA
    b5625fd View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. Configuration menu
    Copy the full SHA
    df788b0 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Configuration menu
    Copy the full SHA
    f8a59c6 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. Configuration menu
    Copy the full SHA
    7356e67 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2024

  1. Configuration menu
    Copy the full SHA
    b42364b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf7d5e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    481790c View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2024

  1. Configuration menu
    Copy the full SHA
    ae8ee45 View commit details
    Browse the repository at this point in the history