Skip to content

feat(gfql): add temporal predicates and type system#673

Merged
lmeyerov merged 24 commits into
masterfrom
fix/temporal-type-errors-clean
Jun 24, 2025
Merged

feat(gfql): add temporal predicates and type system#673
lmeyerov merged 24 commits into
masterfrom
fix/temporal-type-errors-clean

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Jun 23, 2025

Copy link
Copy Markdown
Contributor
  • Add temporal value classes (DateTime, Date, Time) with timezone support
  • Extend comparison predicates (GT, LT, GE, LE, EQ, NE, Between) for temporal values
  • Enhance IsIn predicate to support temporal values with type validation
  • Add comprehensive GFQL type system with guards and coercions
  • Include temporal value serialization and wire format support
  • Add comprehensive test coverage for temporal operations

Enables date/time comparisons and filtering in GFQL queries.

Related PRs

🤖 Generated with Claude Code

lmeyerov and others added 10 commits June 23, 2025 23:27
- Add temporal value classes (DateTime, Date, Time) with timezone support
- Extend comparison predicates (GT, LT, GE, LE, EQ, NE, Between) for temporal values
- Enhance IsIn predicate to support temporal values with type validation
- Add comprehensive GFQL type system with guards and coercions
- Include temporal value serialization and wire format support
- Add comprehensive test coverage for temporal operations

Enables date/time comparisons and filtering in GFQL queries.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add TypeGuard import with proper Python version handling
- Add TypeGuard annotation to is_basic_scalar for type narrowing
- Include TemporalValue in ComparisonInput and IsInElementInput unions
- Enables proper type checking for temporal predicates

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unnecessary type: ignore comment
- Add proper handling for TemporalValue in _normalize_value
- Type narrowing now works correctly with TypeGuard

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove monolithic _temporal_comparison method with operator dispatch
- Add focused helper methods for series preparation and value extraction
- Inline comparison logic directly in each operator (GT, LT, GE, LE, EQ, NE)
- Eliminate all type: ignore and cast statements
- Each operator now clearly shows both numeric and temporal comparison logic

🤖 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>
🤖 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>
- Use version check for TypeGuard import only during TYPE_CHECKING
- Remove pd.Series[T] generic syntax not supported in Python 3.8
- Ensures mypy passes on all supported Python versions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Move Any import from method-level to module-level
- Move DateTimeWire, DateWire, TimeWire imports to module-level
- Fixes dynamic import issue flagged during code review

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@lmeyerov lmeyerov force-pushed the fix/temporal-type-errors-clean branch from edf8508 to a98a273 Compare June 24, 2025 06:28
lmeyerov and others added 12 commits June 23, 2025 23:28
- Add temporal_predicates.ipynb demo notebook with TOC and examples
- Add datetime_filtering.md with imports, standards, and duration notes
- Update wire_protocol_examples.md with clearer structure
- Documentation for GFQL temporal predicate features

Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive datetime filtering guide
- Add temporal predicates notebook with examples
- Add wire protocol examples for temporal values
- Update GFQL overview with temporal examples
- Update predicates quick reference with temporal operators
- Add temporal modules to API documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add temporal value classes to changelog
- Add wire protocol support mention
- Add documentation references (datetime guide, wire protocol, notebook)

📤 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…links

- Add datetime_filtering and wire_protocol_examples to GFQL toctree
- Use relative HTML links that work across all hosting environments
- Links go up two levels from demos/gfql/ to reach gfql/ documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Change from non-existent temporal_values module to ast_temporal
- Fixes autodoc import error during documentation build

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Streamline datetime filtering guide with concise examples
- Add clear links to Python/Pandas datetime documentation
- Improve notebook imports with explanatory comments
- Fix broken chain.rst link to use correct path
- Make documentation more actionable with direct type links

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove "recommended" verbiage in favor of direct documentation
- Keep examples factual without good/bad judgments
- Let ordering and examples guide usage naturally

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Document that wire protocol dicts are a supported input type
- Show how to use ISO strings via wire protocol dicts
- Clarify that only raw strings raise ValueError

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace bad_filter/good_filter with factual variable names
- Keep error handling examples factual without judgments
- Align with direct documentation style

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add missing execution_count field to all code cells
- Remove invalid outputs field from markdown cell
@lmeyerov lmeyerov removed the WIP label Jun 24, 2025
…-updated

Merging temporal predicates documentation
@lmeyerov lmeyerov merged commit f6cb340 into master Jun 24, 2025
57 checks passed
@lmeyerov lmeyerov deleted the fix/temporal-type-errors-clean branch June 24, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant