refactor: rename chain_dag → chain_let for semantic clarity#712
Closed
lmeyerov wants to merge 27 commits into
Closed
refactor: rename chain_dag → chain_let for semantic clarity#712lmeyerov wants to merge 27 commits into
lmeyerov wants to merge 27 commits into
Conversation
- Add ASTQueryDAG for DAG composition with named bindings - Add ASTRemoteGraph for loading remote graph datasets - Add ASTChainRef for referencing bindings within DAGs - Add ExecutionContext for managing variable bindings - Update from_json() dispatcher to handle new AST types - Add comprehensive validation and serialization support 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add chain_dag() function for executing QueryDAGs - Implement topological sort with cycle detection - Add ExecutionContext integration for variable bindings - Support ASTChainRef resolution and execution - Add comprehensive error handling with clear messages - Support both ASTNode and ASTEdge operations - Add 64 comprehensive tests including GPU tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add g.gfql() method as unified entrypoint for chains and DAGs - Auto-detects query type and dispatches appropriately - Remove chain_dag from public API (use gfql instead) - Add deprecation warning to chain() method - Support convenience features (dict->DAG, single ASTObject) - Add comprehensive API migration tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add clear error messages for malformed JSON input - Enhance from_json() validation with helpful context - Add comprehensive error handling test suite - Ensure backward compatibility maintained 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Extend schema validation for new AST types (QueryDAG, ChainRef, RemoteGraph) - Implement ASTRemoteGraph execution using chain_remote - Add integration test framework with TEST_REMOTE_INTEGRATION=1 - Rename gfql directory to avoid import conflicts - Add comprehensive tests for all new validation Co-Authored-By: Claude <noreply@anthropic.com>
- Add 'dag' alias for ASTQueryDAG - Add 'remote' alias for ASTRemoteGraph - Add 'ref' alias for ASTChainRef - Export new aliases from compute module - Update documentation examples to use aliases This makes the API more accessible by removing 'AST' prefix from user-facing classes, following the pattern established with 'n' for ASTNode and 'e' for ASTEdge. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fix newline at end of file issues - Fix E226 missing whitespace around arithmetic operator - Fix E712 comparison to True should use 'is True' - Fix F841 local variables assigned but not used - Fix F811 redefinition of unused imports - Fix F541 f-string missing placeholders - Add proper type annotations for mypy - Update tests to match new error types (GFQLSyntaxError) - Fix RemoteGraph tests to expect authentication error 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fix E712: comparison to True should use 'is True' - Fix mypy union-attr errors: check for None before iterating - Fix mypy operator error: handle None in string concatenation
- Fix E226: missing whitespace around arithmetic operator
- Change f'n{i-1}' to f'n{i - 1}' for flake8 7.3.0 compliance
- Fix ModuleNotFoundError in test_chain_schema_validation.py - Change from graphistry.compute.validate_schema to graphistry.compute.validate.validate_schema
- Rename class ASTQueryDAG to ASTLet to better reflect functional programming concepts - Update wire protocol to use 'Let' instead of 'QueryDAG' type - Add backward compatibility in from_json to support both types - Change public API alias from 'dag' to 'let' BREAKING CHANGE: Public API now uses 'let' instead of 'dag' for creating let bindings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update __init__.py to export 'let' instead of 'dag' - Update chain_dag.py to import and use ASTLet throughout - Update validate_schema.py to handle ASTLet validation - Update gfql.py to accept ASTLet and use 'let' in docs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Rename file to match new ASTLet class name - Update all test class and method names - Update docstrings to refer to Let instead of QueryDAG 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update test_ast.py serialization tests for Let type - Update test_chain_dag.py to use ASTLet throughout - Update test_chain_schema_validation.py for Let validation - Update test_gfql.py for new API - Fix test_ast_errors.py error message assertion - Update GPU and remote integration tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace `is True` checks with truthiness checks for numpy.bool_ compatibility - Fix mock path from chain_dag.chain_remote_impl to chain_remote.chain_remote 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add ASTCall node type for safe method execution - Create safelist framework with method allowlists - Implement parameter validation for exposed methods - Add call execution support in chain_dag - Include core graph methods (get_degrees, filter_by_dict, etc) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add 'call' alias for ASTCall to make the API more accessible - Export 'call' from compute module - Follows the pattern of other AST aliases (n, e, dag, ref, remote) This completes the user-friendly aliasing for all public AST classes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Expand safelist with more Plottable methods (transformations, visual encoding, metadata) - Add schema_effects metadata to track columns added/required by each method - Implement _validate_call_op in validate_schema.py - Hook Call validation into existing schema validation protocol - Add comprehensive tests for Call schema validation - Support dry-run validation with empty DataFrames Methods now track: - adds_node_cols: Columns added to nodes - adds_edge_cols: Columns added to edges - requires_node_cols: Node columns that must exist - requires_edge_cols: Edge columns that must exist 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…tions - Add detailed docstrings to all functions in call_safelist.py - Add comprehensive docstrings to call_executor.py - Add docstrings to ASTCall class and its methods in ast.py - Add docstrings to _validate_call_op in validate_schema.py - Create comprehensive GPU test coverage in test_call_operations_gpu.py - Fix failing test that incorrectly used Call operations in chains - Fix all linting issues (W292, E501) The documentation now clearly explains: - Purpose and behavior of each function - Parameter types and validation rules - Return values and exceptions - Schema effects for static analysis 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Move call_executor.py and call_safelist.py to compute/gfql/ for better organization - Update all imports to use new location - All tests pass
- Move call_executor.py and call_safelist.py back to compute directory - Update all imports to use original paths - Remove empty gfql subdirectory that conflicted with gfql.py - Fix ASTLet alias and type annotations - Fix lint issues (newlines, comparison operators)
- Rename chain_dag.py → chain_let.py for better semantic clarity - Rename test files to match: test_chain_dag* → test_chain_let* - Update all imports and references from chain_dag to chain_let - Rename chain_dag_impl → chain_let_impl for consistency - Update parameter names from 'dag' to 'let_bindings' where appropriate - Update docstrings and comments to use 'let bindings' terminology - Maintain backward compatibility in wire protocol and public API - Update test method names and class names consistently This rename improves code clarity by using 'let bindings' terminology throughout, which better describes the functional programming pattern being implemented. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…TRemoteGraph and ASTChainRef - Add comprehensive docstrings explaining expected behavior and usage - Replace generic TODO error messages with specific, actionable feedback - ASTRemoteGraph: Clarify that remote loading functionality is not yet implemented - ASTChainRef: Explain that it requires let bindings context to resolve references - Maintain NotImplementedError behavior while providing better developer experience 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
Triggering CI after import fixes |
Contributor
Author
|
Replaced by PR #713 which preserves the gfql/ subdirectory structure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
• Rename
chain_dag→chain_letthroughout codebase for semantic clarity• Update all imports, functions, and test files
• Maintain backward compatibility in wire protocol
• Preserve existing functionality while improving naming consistency
Changes
• Renamed
chain_dag.py→chain_let.py• Updated
chain_dag_impl→chain_let_impl• Fixed imports in
gfql.pyandComputeMixin.py• Updated all test files and function references
• Added comments about deprecation path
Test plan
🤖 Generated with Claude Code