cudf
cudf copied to clipboard
Ensure IR.do_evaluate signature is correct
Description
This updates the signature of our IR.do_evaluate nodes to follow our convention of being a classmethod with *non_child_args, *children, *, context
It also adds a new pre-commit hook to validate that our subclasses meet this requirement, by parsing the AST of our files defining IR nodes. Doing it incorrectly will result in errors like
❯ pre-commit run cudf-polars-ir-signatures --all-files (base)
cudf-polars-ir-signatures................................................Failed
- hook id: cudf-polars-ir-signatures
- duration: 0.09s
- exit code: 1
Found errors in IR node signatures:
python/cudf_polars/cudf_polars/dsl/ir.py:1534: Rolling: Mismatch between 'self._non_child_args' and 'cls._non_child' argument '_non_child_args'
Closes https://github.com/rapidsai/cudf/issues/20481
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.
Contributors can view more details about this message here.
/ok to test fb31b44
/ok to test 1c66ed3