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

feat: expr method signatures #3600

Draft
wants to merge 68 commits into
base: main
Choose a base branch
from
Draft

feat: expr method signatures #3600

wants to merge 68 commits into from

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    a60e8cc View commit details
    Browse the repository at this point in the history
  2. chore: Add imports

    dangotbanned committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    e7dca1c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    49d328d View commit details
    Browse the repository at this point in the history
  4. feat: Define constants

    dangotbanned committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    11d759d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0109c8c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1f736be View commit details
    Browse the repository at this point in the history
  7. feat: Adds VegaExprParam

    Similar idea to `inspect.Parameter`
    dangotbanned committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    e26083a View commit details
    Browse the repository at this point in the history
  8. feat: Adds VegaExprNode

    Similar to `inspect.Signature`
    dangotbanned committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    6bb4c27 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d1bf708 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3e62bd9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    67c6a1e View commit details
    Browse the repository at this point in the history
  12. feat(DRAFT): Adds VegaExprNode.to_signature

    - Only the most common case
    - no docs
    - No method body
    dangotbanned committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    815404e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    51e569e View commit details
    Browse the repository at this point in the history
  14. feat(DRAFT): Add render_expr_method

    Currently just collects the pieces, but doesn't render the final str
    dangotbanned committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    b3006bc View commit details
    Browse the repository at this point in the history
  15. refactor: FunctionExpression -> Expression for annotation only

    Also renamed constant `EXPR_ANNOTATION` -> `INPUT_ANNOTATION`
    dangotbanned committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    54f7db0 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Configuration menu
    Copy the full SHA
    328cc98 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e1897d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb33243 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1ce1567 View commit details
    Browse the repository at this point in the history
  5. feat(DRAFT): Full expr module generation

    - Contains all the functionality
    - Needs a lot of tidying up
    dangotbanned committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    b88221f View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2024

  1. Configuration menu
    Copy the full SHA
    0a09936 View commit details
    Browse the repository at this point in the history
  2. feat: Split doc summary, wrap body

    - Uses the same config as `indent_docstring`
    - Can't truly be `numpydoc` though without a parameters section
    dangotbanned committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    9377598 View commit details
    Browse the repository at this point in the history
  3. chore: Remove some notes

    dangotbanned committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    8e88cd2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f5b3717 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7ec0505 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. Configuration menu
    Copy the full SHA
    29f08dc View commit details
    Browse the repository at this point in the history
  2. feat: Replace all Vega function refs in code blocks

    - Renamed `name_safe` -> `title`
    - Perform an eager pass to extract replacement pairs
    
    #3600 (comment)
    dangotbanned committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    f6cc776 View commit details
    Browse the repository at this point in the history
  3. docs: Update doc for is_overloaded

    I've identified multiple kinds of overloads.
    If we want to further improve accuracy, then these would need to be considered separately
    dangotbanned committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    321a0cd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    90f7b0a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    36ac45a View commit details
    Browse the repository at this point in the history
  6. refactor: Simplify VegaExprNode._split_signature_tokens

    - Separates the token vs string iteration
    - Improve doc, w/ example
    dangotbanned committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    56dfa27 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9cab1a1 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    283eff6 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. feat: Refine ReplaceMany

    - Renaming
    - Allow refreshing on any call
    - Auto refresh if first call did not
    dangotbanned committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    497f2fd View commit details
    Browse the repository at this point in the history
  2. docs: Add doc for ReplaceMany

    - Already general enough to be used in other areas of `tools`.
    - E.g. for `vega-lite` docs using `true`, `false`, `null` -> `True`, `False`, `None`
    dangotbanned committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b0b1952 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d5271e View commit details
    Browse the repository at this point in the history
  4. refactor: Tidy up "clamprange" -> "clampRange" special case

    - Was previously being handled in multiple places
    - Now the correct name is set during the first access to `self.name`
    dangotbanned committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    849f428 View commit details
    Browse the repository at this point in the history
  5. refactor: Reorder with_ methods, add docs

    Little bit easier to see how they relate
    dangotbanned committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    bed8d0f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    264e4a6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7c24e46 View commit details
    Browse the repository at this point in the history
  8. feat: Adds initial vega_expr api

    There are more things I want to change, but ideally keep `write_expr_module` consistent
    dangotbanned committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    051bcb2 View commit details
    Browse the repository at this point in the history
  9. build: run generate-schema-wrapper

    - Need to do some experimenting with a new test suite for `expr`
    - Temporarily isolating this to `expr.dummy.py`
    - Will later replace `expr.__init__.py`
    dangotbanned committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    5e75051 View commit details
    Browse the repository at this point in the history
  10. chore: Add note to test_expr.py

    Need to make a change here to start a GH thread
    dangotbanned committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    222d03e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f7a47a5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9238fb6 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. test: Refactor test_expr

    - Combined some single use functions
    - `signature_n_params`
      - Collect the signature here, since the function is prefixed with `signature_`
      - Use a cheaper method of calculating number of target params
    - Reordered, renamed, prepare `test_expr_methods` for the new `expr` type
    
    #3600 (comment)
    dangotbanned committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7311fdf View commit details
    Browse the repository at this point in the history
  2. fix: Move some imports to TYPE_CHECKING block

    `ruff` was warning that `TYPE_CHECKING` was unused
    dangotbanned committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6077075 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0094596 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    16a92a4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    17da9d0 View commit details
    Browse the repository at this point in the history
  6. fix(typing): Resolve some revealed issues

    - `IntoExpression` change I'll add in a new fix PR
    - `OperatorMixin` todo needs an issue
    dangotbanned committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    21d13e7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7364605 View commit details
    Browse the repository at this point in the history
  8. refactor: Move .md, .rst utils to tools.markup.py

    Also some rearranging in `vega_expr.py`
    dangotbanned committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7e0db68 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9aaf862 View commit details
    Browse the repository at this point in the history
  10. refactor: Replace render_expr_method with a method

    Also moved some static content to template and simplified
    
    #3600 (comment), #3600 (comment), #3600 (comment)
    dangotbanned committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    9215d7d View commit details
    Browse the repository at this point in the history
  11. refactor: Add signature template, rename others

    The `EXPR_` prefix is meaningless when all use it
    dangotbanned committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7a10e3d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e3273f6 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    1a7d241 View commit details
    Browse the repository at this point in the history
  14. refactor: Align VegaExpr(Node|Param) apis

    - Both have a `.from_..()` iterator classmethod
    - Both output via `.render()`
    
    #3600 (comment)
    dangotbanned committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    cfb676f View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Configuration menu
    Copy the full SHA
    6fd32e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8fb9341 View commit details
    Browse the repository at this point in the history
  3. feat: Strip template markup earlier

    - Moves a replacement that previously occured in two places (rendering & signatuyre parsing)
    - Now the tokens returned by `read_ast_tokens` do not contain this at all
    
    #3600 (comment)
    dangotbanned committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    b2aeecb View commit details
    Browse the repository at this point in the history
  4. refactor: Move unescape to render_tokens

    Step is unrelated to parsed attributes of a definition
    dangotbanned committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    fde31e2 View commit details
    Browse the repository at this point in the history
  5. refactor: Move _doc_post_process -> with_doc

    This method was always intended to be temorary and is no longer helpful
    dangotbanned committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    d4d9145 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    433611b View commit details
    Browse the repository at this point in the history
  7. refactor: Assign names to literals in _doc_fmt

    Related to (but doesn't resolve) #3600 (comment)
    dangotbanned committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    c2af5f4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e7e79c9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e20490b View commit details
    Browse the repository at this point in the history