Skip to content

Commit

Permalink
reset integ tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anish-palakurthi committed Jun 18, 2024
1 parent 1feb8a2 commit b78ea85
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions integ-tests/python/baml_client/partial_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,25 @@

class Blah(BaseModel):


prop4: Optional[str] = None

class ClassOptionalOutput(BaseModel):


prop1: Optional[str] = None
prop2: Optional[str] = None

class ClassOptionalOutput2(BaseModel):


prop1: Optional[str] = None
prop2: Optional[str] = None
prop3: Optional["Blah"] = None

class ClassWithImage(BaseModel):


myImage: Optional[baml_py.Image] = None
param2: Optional[str] = None
fake_image: Optional["FakeImage"] = None
Expand All @@ -69,6 +73,7 @@ class DynamicOutput(BaseModel):

class Education(BaseModel):


institution: Optional[str] = None
location: Optional[str] = None
degree: Optional[str] = None
Expand All @@ -77,19 +82,22 @@ class Education(BaseModel):

class Email(BaseModel):


subject: Optional[str] = None
body: Optional[str] = None
from_address: Optional[str] = None

class Event(BaseModel):


title: Optional[str] = None
date: Optional[str] = None
location: Optional[str] = None
description: Optional[str] = None

class FakeImage(BaseModel):


url: Optional[str] = None

class InnerClass(BaseModel):
Expand All @@ -107,39 +115,47 @@ class InnerClass2(BaseModel):

class NamedArgsSingleClass(BaseModel):


key: Optional[str] = None
key_two: Optional[bool] = None
key_three: Optional[int] = None

class OptionalTest_Prop1(BaseModel):


omega_a: Optional[str] = None
omega_b: Optional[int] = None

class OptionalTest_ReturnType(BaseModel):

omega_1: "OptionalTest_Prop1"

omega_1: Optional["OptionalTest_Prop1"] = None
omega_2: Optional[str] = None
omega_3: List[Optional[types.OptionalTest_CategoryType]]

class OrderInfo(BaseModel):


order_status: Optional[types.OrderStatus] = None
tracking_number: Optional[str] = None
estimated_arrival_date: Optional[str] = None

class Person(BaseModel):

model_config = ConfigDict(extra='allow')

name: Optional[str] = None
hair_color: Optional[Union[types.Color, str]] = None

class RaysData(BaseModel):


dataType: Optional[types.DataType] = None
value: Optional[Union["Resume", "Event"]] = None

class Resume(BaseModel):


name: Optional[str] = None
email: Optional[str] = None
phone: Optional[str] = None
Expand All @@ -149,6 +165,7 @@ class Resume(BaseModel):

class SearchParams(BaseModel):


dateRange: Optional[int] = None
location: List[Optional[str]]
jobTitle: Optional["WithReasoning"] = None
Expand All @@ -164,6 +181,7 @@ class SomeClassNestedDynamic(BaseModel):

class TestClassAlias(BaseModel):


key: Optional[str] = None
key2: Optional[str] = None
key3: Optional[str] = None
Expand All @@ -178,27 +196,25 @@ class TestClassNested(BaseModel):

class TestClassWithEnum(BaseModel):


prop1: Optional[str] = None
prop2: Optional[types.EnumInClass] = None

class TestOutputClass(BaseModel):

prop1: Optional[str] = None
prop2: Optional[int] = None

class TestOutputClassNested(BaseModel):

prop1: Optional[str] = None
prop2: Optional[int] = None
prop3: "TestOutputClass"

class UnionTest_ReturnType(BaseModel):


prop1: Optional[Union[Optional[str], Optional[bool]]] = None
prop2: List[Optional[Union[Optional[float], Optional[bool]]]]
prop3: Optional[Union[List[Optional[bool]], List[Optional[int]]]] = None

class WithReasoning(BaseModel):


value: Optional[str] = None
reasoning: Optional[str] = None

0 comments on commit b78ea85

Please sign in to comment.