Skip to content

Commit a8b3176

Browse files
committed
Merge pull request #88 from CaliLuke/feat/typedb-3.8.0-support
TypeDB 3.8.0 support: iid(), label() built-ins, Unicode identifiers
2 parents 9162f4b + fd2df6e commit a8b3176

29 files changed

Lines changed: 1640 additions & 437 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ jobs:
105105
runs-on: ubuntu-latest
106106
strategy:
107107
matrix:
108-
test-group: [crud, queries, schema]
108+
test-group: [crud, queries, schema, expressions]
109109

110110
# Start TypeDB as a service container (runs first, before steps)
111111
services:
112112
typedb:
113-
image: typedb/typedb:3.7.0-rc0
113+
image: typedb/typedb:3.8.0-rc0
114114
ports:
115115
- 1729:1729
116116

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ packages/typescript/dist/
2121

2222
# Temporary
2323
tmp/
24+
25+
# Reference repos
26+
typeql-ref/

CHANGELOG.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,74 @@
22

33
All notable changes to TypeBridge will be documented in this file.
44

5+
## [1.2.4] - 2026-01-30
6+
7+
### New Features
8+
9+
#### TypeDB 3.8.0 Built-in Functions (PR #88)
10+
- **Added support for TypeDB 3.8.0 built-in functions**
11+
- Identity functions: `iid()`, `label()`
12+
- Math functions: `abs_()`, `ceil()`, `floor()`, `round_()`
13+
- Collection functions: `len_()`, `max_()`, `min_()`
14+
- Location: `type_bridge/expressions/builtins.py`
15+
16+
**Usage Example:**
17+
```python
18+
from type_bridge.expressions import iid, label, abs_, ceil, floor
19+
20+
# Get entity IID
21+
query = Person.manager(db).filter(iid() == "0x1a2b3c").execute()
22+
23+
# Use math functions
24+
query = Person.manager(db).filter(abs_(Age.value) > 18).execute()
25+
```
26+
27+
#### Unicode XID Identifier Validation (PR #88)
28+
- **Added Unicode identifier validation for TypeDB 3.8.0 compatibility**
29+
- Validates identifiers follow Unicode XID_Start/XID_Continue rules
30+
- Ensures TypeQL identifiers are compatible with TypeDB 3.8.0
31+
- Clear error messages for invalid identifiers
32+
- Location: `type_bridge/validation.py`
33+
34+
### Bug Fixes
35+
36+
#### Value Extraction Fix (PR #88)
37+
- **Fixed value extraction for `_Value` concepts**
38+
- Changed from `.as_value()` to `.get()` for proper value extraction
39+
- Fixes issues with function return values and aggregations
40+
- Location: `type_bridge/session.py`
41+
42+
#### Driver Initialization Warning Fix (PR #88)
43+
- **Fixed "Failed to initialize logging" warning**
44+
- Suppresses fd 2 (stderr) during TypeDB driver initialization
45+
- Eliminates spurious warning messages on startup
46+
- Location: `type_bridge/typedb_driver.py`
47+
48+
### Documentation
49+
50+
- **Added AI Assistant Skill Documentation** (`docs/SKILL.md`)
51+
- Guidelines for using TypeBridge with AI code assistants
52+
53+
### Testing
54+
55+
- 32 new unit tests for builtin expressions
56+
- 7 new integration tests for `iid()` and `label()` functions
57+
- All existing tests pass with TypeDB 3.8.0-rc0
58+
- Fixed hardcoded port 1729 in tests to use TEST_DB_ADDRESS
59+
60+
### CI/CD
61+
62+
- **Updated CI to TypeDB 3.8.0-rc0**
63+
- All tests now run against TypeDB 3.8.0-rc0
64+
65+
### Key Files Modified
66+
67+
- `type_bridge/expressions/builtins.py` - New built-in function expressions
68+
- `type_bridge/session.py` - Value extraction fix
69+
- `type_bridge/typedb_driver.py` - Driver initialization fix
70+
- `type_bridge/validation.py` - Unicode identifier validation
71+
- `docs/SKILL.md` - New AI assistant documentation
72+
573
## [1.2.3] - 2025-12-28
674

775
### New Features

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ generate_models("schema.tql", "./myapp/models/")
234234

235235
This generates a complete Python package:
236236

237-
```
237+
```text
238238
myapp/models/
239239
├── __init__.py # Package exports, SCHEMA_VERSION, schema_text()
240240
├── attributes.py # Attribute class definitions
@@ -245,6 +245,7 @@ myapp/models/
245245
```
246246

247247
The generator supports:
248+
248249
- Entity/relation/attribute inheritance (`sub` keyword)
249250
- `@key`, `@unique`, `@card` constraints (including on `plays` and `relates`)
250251
- `@regex` and `@values` constraints
@@ -265,6 +266,7 @@ See [docs/api/generator.md](docs/api/generator.md) for full documentation.
265266
- **[docs/TYPEDB.md](docs/TYPEDB.md)** - TypeDB concepts, driver API, and TypeQL syntax
266267
- **[docs/ABSTRACT_TYPES.md](docs/ABSTRACT_TYPES.md)** - Abstract types and interface hierarchies in TypeDB
267268
- **[docs/INTERNALS.md](docs/INTERNALS.md)** - Internal type system and architecture
269+
- **[docs/SKILL.md](docs/SKILL.md)** - AI assistant skill for using type-bridge (for Claude, GPT, etc.)
268270

269271
### API Reference
270272

@@ -372,17 +374,6 @@ uv run pytest -m "" -v # Run all tests
372374
- jinja2>=3.1.0 (for code generation)
373375
- typer>=0.15.0 (for CLI)
374376

375-
## What's New in v1.2.2 (2025-12-25)
376-
377-
**Critical Bug Fixes:**
378-
- 🐛 **Fixed RelationManager IID correlation** (Issue #78) - `RelationManager.all()` now correctly assigns unique IIDs to role players instead of duplicating the same IIDs across all relations
379-
- 🐛 **Fixed stack overflow in `__in` lookups** (Issue #76) - Large `__in` queries (75+ values) now work reliably without causing TypeDB query planner crashes
380-
381-
**Previous Releases:**
382-
- v1.2.0 - TypeDB 3.0 Structs Support & Batch Query Optimizations
383-
- v1.1.0 - Polymorphic Entity Instantiation
384-
- v1.0.0 - Initial stable release
385-
386377
## Release Notes
387378

388379
See the [CHANGELOG.md](CHANGELOG.md) for detailed release notes and version history.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
typedb:
3-
image: typedb/typedb:3.7.0
3+
image: typedb/typedb:3.8.0-rc0
44
container_name: typedb_test
55
ports:
66
- "${TYPEDB_PORT:-1730}:1729"

0 commit comments

Comments
 (0)