You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/api/tests/unit_tests
QuantumGhost 2c1ab4879f
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025)
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025)

This PR addresses serialization issues in the VariablePool model by separating the `value_type` tags for `IntegerSegment`/`FloatSegment` and `IntegerVariable`/`FloatVariable`. Previously, both Integer and Float types shared the same `SegmentType.NUMBER` tag, causing conflicts during serialization.

Key changes:
- Introduce distinct `value_type` tags for Integer and Float segments/variables
- Add `VariableUnion` and `SegmentUnion` types for proper type discrimination
- Leverage Pydantic's discriminated union feature for seamless serialization/deserialization
- Enable accurate serialization of data structures containing these types

Closes #22024.
8 months ago
..
configs chore: add SQLALCHEMY_POOL_USE_LIFO option and missing SQLALCHEMY_POOL_PRE_PING env default value. (#22371) 8 months ago
controllers test: add comprehensive unit tests for console authentication and authorization decorators (#22439) 8 months ago
core refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 8 months ago
extensions feat: add redis fallback mechanism #21043 (#21044) 9 months ago
factories refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 8 months ago
libs test: add comprehensive unit tests for login decorator (#22294) 8 months ago
models feat(libs): Introduce `extract_tenant_id` (#22086) 9 months ago
oss chore(lint): correct allowed-unused-imports settings for cleanup unused imports in tests (#11922) 1 year ago
repositories refactor(workflow): Rename workflow node execution models (#20458) 10 months ago
services feat(api/repo): Allow to config repository implementation (#21458) 8 months ago
utils chore: bump ruff to 0.12.x (#22259) 8 months ago
.gitignore Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 11 months ago
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2 years ago
conftest.py Feature:Refactor batch update document status for #21324 (#21325) 9 months ago