rosemariafontana commited on
Commit
5fe18d9
·
verified ·
1 Parent(s): dcb6733

Update schema_classes.py

Browse files
Files changed (1) hide show
  1. schema_classes.py +16 -16
schema_classes.py CHANGED
@@ -4,23 +4,23 @@ from enum import Enum
4
 
5
  # These are the necessary components that make up the Trials
6
  class Variables(BaseModel):
7
- controlled: Union[List[str], None] = Field(..., title="Controlled Variables", description="A list of controlled variables, which will be constant (controlled) across all trials")
8
- independent: Union[List[str], None] = Field(..., title="Independent Variables", description="A list of independent variables (ie treatments), which will be intentionally varied across one or more trials")
9
- outcome: Union[List[str], None] = Field(..., title="Outcome Variables", description="A list of outcome variables (ie dependent or response variables)")
10
 
11
  class Treatment(BaseModel):
12
  name: Union[str, None] = Field(..., title="Name", description="The treatment name")
13
  description: Union[str, None] = Field(..., title="Description", description="The treatment description, including the conditions within this treatment")
14
- crops: Union[List[str], None] = Field(..., title="Crops", description="A list of crops being tested in this treatment")
15
- fields: Union[List[str], None] = Field(..., title="Fields", description="A list of fields in which this treatment has occured or will occur")
16
- learnings: Union[List[str], None] = Field(..., title="Learnings", description="A list of lessons learned from this experiment")
17
  variables: Union[Variables, None] = Field(..., title="Variables", description="Variables (ie factors) in this experiment. Some variables are constant (controlled) and some will vary in order to learn something (independent)")
18
- confoundingFactors: Union[List[str], None] = Field(..., title="Confounding Factors", description="A list of factors which may impact the outcomes of the experiment that were not planned for")
19
 
20
  class Trial(BaseModel):
21
  name: Union[str, None] = Field(..., title="Name", description="The name of this trial")
22
  description: Union[str, None] = Field(..., title="Description", description="A description of this trial")
23
- treatments: Union[List[Treatment], None] = Field(..., title="Treatments", description="A list of different treatments (strips or blocks with the same conditions applied) performed by the partner")
24
 
25
  class TrialLite(BaseModel):
26
  name: Union[str, None] = Field(..., title="Name", description="The name of this trial")
@@ -40,10 +40,10 @@ class Person(BaseModel):
40
  role: Union[Role, None] = Field(..., title="Role", description="Role of this person")
41
 
42
  class Interactions(BaseModel):
43
- people: Union[List[Person], None] = Field(..., title="People", description="People involved or mentioned during interaction")
44
  date: Union[str, None] = Field(..., title="Date", description="Date of the interaction in ISO 8601 format (YYYY-MM-DD)", example="2024-10-05")
45
- nextMeeting: Union[str, None] = Field(..., title="Date of next meeting", description="Proposed date of the next future interaction")
46
- nextSteps: Union[List[str], None] = Field(..., title="Next Steps", description="List of individual next steps derived from the interaction")
47
  summary: Union[str, None] = Field(..., title="Summary", description="Summary of the interaction")
48
 
49
  class InteractionsLite(BaseModel):
@@ -114,14 +114,14 @@ class Planting(BaseModel):
114
  status: Union[Status, None] = Field(..., title="Status", description="The status of the planting. \"active\" is a planting which is currently still in the field. \"archived\" is a planting which is no longer in the field (has been terminated or harvested)")
115
  crop: Union[List[str], None] = Field(..., title="Crop", description="A list of the crops in this planting")
116
  variety: Union[List[str], None] = Field(..., title="Variety", description="A list of the crop varieties in this planting")
117
- logs: Union[List[Log], None] = Field(..., title="Logs", description="A list of all the logs that are associated with the farm activities")
118
- soil: Union[List[Soil], None] = Field(..., title="Soil", description="A single soil profile for this planting, containing only one soil description")
119
  yield_: Union[List[Yield], None] = Field(..., title="Yield", description="One set of quantitative and qualitative yield observations for this planting")
120
 
121
  class FarmActivities(BaseModel):
122
  name: Union[str, None] = Field(..., title="Name", description="The name of the agricultural field.")
123
  description: Union[str, None] = Field(..., title="Description", description="The description of the agricultural field.")
124
- plantings: Union[List[Planting], None] = Field(..., title="Plantings", description="All of the plantings which have occurred on this field.")
125
 
126
  # These are extra for the modular approach (step-wise)
127
  class FarmActivitiesLite(BaseModel):
@@ -131,6 +131,6 @@ class FarmActivitiesLite(BaseModel):
131
  class PlantingLite(BaseModel):
132
  name: Union[str, None] = Field(..., title="Name", description="The name of the planting")
133
  status: Union[Status, None] = Field(..., title="Status", description="The status of the planting. \"active\" is a planting which is currently still in the field. \"archived\" is a planting which is no longer in the field (has been terminated or harvested)")
134
- crop: Union[List[str], None] = Field(..., title="Crop", description="A list of the crops in this planting")
135
- variety: Union[List[str], None] = Field(..., title="Variety", description="A list of the crop varieties in this planting")
136
 
 
4
 
5
  # These are the necessary components that make up the Trials
6
  class Variables(BaseModel):
7
+ controlled: Union[List[str], None] = Field(..., title="Controlled Variables", description="An array of controlled variables, which will be constant (controlled) across all trials")
8
+ independent: Union[List[str], None] = Field(..., title="Independent Variables", description="An array of independent variables (ie treatments), which will be intentionally varied across one or more trials")
9
+ outcome: Union[List[str], None] = Field(..., title="Outcome Variables", description="An array of outcome variables (ie dependent or response variables) which is hypothesized to change across the trials")
10
 
11
  class Treatment(BaseModel):
12
  name: Union[str, None] = Field(..., title="Name", description="The treatment name")
13
  description: Union[str, None] = Field(..., title="Description", description="The treatment description, including the conditions within this treatment")
14
+ crops: Union[List[str], None] = Field(..., title="Crops", description="An array of crops being tested in this treatment")
15
+ fields: Union[List[str], None] = Field(..., title="Fields", description="An array of fields in which this treatment has occurred or will occur")
16
+ learnings: Union[List[str], None] = Field(..., title="Learnings", description="An array of lessons learned from this experiment")
17
  variables: Union[Variables, None] = Field(..., title="Variables", description="Variables (ie factors) in this experiment. Some variables are constant (controlled) and some will vary in order to learn something (independent)")
18
+ confoundingFactors: Union[List[str], None] = Field(..., title="Confounding Factors", description="An array of factors which may impact the outcomes of the experiment that were not planned for.")
19
 
20
  class Trial(BaseModel):
21
  name: Union[str, None] = Field(..., title="Name", description="The name of this trial")
22
  description: Union[str, None] = Field(..., title="Description", description="A description of this trial")
23
+ treatments: Union[List[Treatment], None] = Field(..., title="Treatments", description="An array of different treatments (strips or blocks with the same conditions applied) performed by the partner")
24
 
25
  class TrialLite(BaseModel):
26
  name: Union[str, None] = Field(..., title="Name", description="The name of this trial")
 
40
  role: Union[Role, None] = Field(..., title="Role", description="Role of this person")
41
 
42
  class Interactions(BaseModel):
43
+ people: Union[List[Person], None] = Field(..., title="People", description="An array of people involved in or mentioned in this interaction")
44
  date: Union[str, None] = Field(..., title="Date", description="Date of the interaction in ISO 8601 format (YYYY-MM-DD)", example="2024-10-05")
45
+ nextMeeting: Union[str, None] = Field(..., title="Date of next meeting", description="Proposed date of the next future interaction in ISO 8601 format (YYYY-MM-DD)", example="2024-10-05")
46
+ nextSteps: Union[List[str], None] = Field(..., title="Next Steps", description="Array containing a list of next steps from the interaction")
47
  summary: Union[str, None] = Field(..., title="Summary", description="Summary of the interaction")
48
 
49
  class InteractionsLite(BaseModel):
 
114
  status: Union[Status, None] = Field(..., title="Status", description="The status of the planting. \"active\" is a planting which is currently still in the field. \"archived\" is a planting which is no longer in the field (has been terminated or harvested)")
115
  crop: Union[List[str], None] = Field(..., title="Crop", description="A list of the crops in this planting")
116
  variety: Union[List[str], None] = Field(..., title="Variety", description="A list of the crop varieties in this planting")
117
+ logs: Union[List[Log], None] = Field(..., title="Logs", description="An array of all logs that are associated with this individual planting")
118
+ soil: Union[List[Soil], None] = Field(..., title="Soil", description="Information about the soil associated with or observed during the time of this planting")
119
  yield_: Union[List[Yield], None] = Field(..., title="Yield", description="One set of quantitative and qualitative yield observations for this planting")
120
 
121
  class FarmActivities(BaseModel):
122
  name: Union[str, None] = Field(..., title="Name", description="The name of the agricultural field.")
123
  description: Union[str, None] = Field(..., title="Description", description="The description of the agricultural field.")
124
+ plantings: Union[List[Planting], None] = Field(..., title="Plantings", description="An array of all the plantings which have occurred on this field")
125
 
126
  # These are extra for the modular approach (step-wise)
127
  class FarmActivitiesLite(BaseModel):
 
131
  class PlantingLite(BaseModel):
132
  name: Union[str, None] = Field(..., title="Name", description="The name of the planting")
133
  status: Union[Status, None] = Field(..., title="Status", description="The status of the planting. \"active\" is a planting which is currently still in the field. \"archived\" is a planting which is no longer in the field (has been terminated or harvested)")
134
+ crop: Union[List[str], None] = Field(..., title="Crop", description="An array of the crops in this planting")
135
+ variety: Union[List[str], None] = Field(..., title="Variety", description="An array of the varieties in this planting")
136