rahgadda commited on
Commit
c5f8f0a
·
1 Parent(s): df628b2

Initial Draft

Browse files
dto/release_notes.py CHANGED
@@ -11,6 +11,16 @@ class Enhancement(BaseModel):
11
  benefits: str = Field(description="The benefit or impact on the user or system as a result of the enhancement")
12
  reason: str = Field(description="The reason for implementing the change.")
13
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  class ReleaseNotes(BaseModel):
16
  """Release Notes Pydantic Schema"""
@@ -18,4 +28,14 @@ class ReleaseNotes(BaseModel):
18
  release_date: str = Field(description="Provide release date",default=datetime.now().strftime('%d-%b-%Y').upper(), const=True)
19
  product_name: str = Field(description="Provide product name",default="Oracle Banking Retail Lending", const=True)
20
  summary: str = Field(description="A brief introduction highlighting the key focus of this release")
21
- enhancements: List[Enhancement] = Field(description="List of enhancements in this release")
 
 
 
 
 
 
 
 
 
 
 
11
  benefits: str = Field(description="The benefit or impact on the user or system as a result of the enhancement")
12
  reason: str = Field(description="The reason for implementing the change.")
13
 
14
+ def get_json_template(model: BaseModel):
15
+ """helper function to get the json schema from the pydantic model"""
16
+
17
+ schema = model.model_json_schema()
18
+ json_schema = json.dumps(schema)
19
+ json_schema = Template(json_schema).substitute(
20
+ {"defs": "definitions", "ref": "$ref"}
21
+ )
22
+ return json.loads(json_schema)
23
+
24
 
25
  class ReleaseNotes(BaseModel):
26
  """Release Notes Pydantic Schema"""
 
28
  release_date: str = Field(description="Provide release date",default=datetime.now().strftime('%d-%b-%Y').upper(), const=True)
29
  product_name: str = Field(description="Provide product name",default="Oracle Banking Retail Lending", const=True)
30
  summary: str = Field(description="A brief introduction highlighting the key focus of this release")
31
+ enhancements: List[Enhancement] = Field(description="List of enhancements in this release")
32
+
33
+ def get_json_template(model: BaseModel):
34
+ """helper function to get the json schema from the pydantic model"""
35
+
36
+ schema = model.model_json_schema()
37
+ json_schema = json.dumps(schema)
38
+ json_schema = Template(json_schema).substitute(
39
+ {"defs": "definitions", "ref": "$ref"}
40
+ )
41
+ return json.loads(json_schema)
dto/requirement_gathering.py CHANGED
@@ -11,8 +11,28 @@ class RequirementGathering(BaseModel):
11
  priority: str = Field(description="The priority of the requirement. Return only one from list of values [High, Medium and Low]. Ground result based on the document.")
12
  tags: List[str] = Field(description="List of tags for the requirement to identify into relevant categories(e.g., Product Specifications, Validations and Quality Standards)")
13
 
 
 
 
 
 
 
 
 
 
 
14
  class RequirementGatheringDetails(BaseModel):
15
  """Requirement Gathering Details Pydantic Schema"""
16
 
17
  header: str = Field(description="Provide the header of the document.")
18
- requirements: List[RequirementGathering] = Field(description="List of requirements gathered from the document.")
 
 
 
 
 
 
 
 
 
 
 
11
  priority: str = Field(description="The priority of the requirement. Return only one from list of values [High, Medium and Low]. Ground result based on the document.")
12
  tags: List[str] = Field(description="List of tags for the requirement to identify into relevant categories(e.g., Product Specifications, Validations and Quality Standards)")
13
 
14
+ def get_json_template(model: BaseModel):
15
+ """helper function to get the json schema from the pydantic model"""
16
+
17
+ schema = model.model_json_schema()
18
+ json_schema = json.dumps(schema)
19
+ json_schema = Template(json_schema).substitute(
20
+ {"defs": "definitions", "ref": "$ref"}
21
+ )
22
+ return json.loads(json_schema)
23
+
24
  class RequirementGatheringDetails(BaseModel):
25
  """Requirement Gathering Details Pydantic Schema"""
26
 
27
  header: str = Field(description="Provide the header of the document.")
28
+ requirements: List[RequirementGathering] = Field(description="List of requirements gathered from the document.")
29
+
30
+ def get_json_template(model: BaseModel):
31
+ """helper function to get the json schema from the pydantic model"""
32
+
33
+ schema = model.model_json_schema()
34
+ json_schema = json.dumps(schema)
35
+ json_schema = Template(json_schema).substitute(
36
+ {"defs": "definitions", "ref": "$ref"}
37
+ )
38
+ return json.loads(json_schema)
dto/user_story.py CHANGED
@@ -8,6 +8,16 @@ class UserStoryScenarios(BaseModel):
8
  pre_conditions: str = Field(description="Provide a precondition details")
9
  action_details: str = Field(description="Provide action details to be taken in business application by the user role specified")
10
  expected_outcome: str = Field(description="Provide list of activities to be allowed by business user role")
 
 
 
 
 
 
 
 
 
 
11
 
12
  class UserStory(BaseModel):
13
  """User Story Pydantic Schema"""
@@ -17,3 +27,13 @@ class UserStory(BaseModel):
17
  feature: str = Field(description="Provide application feature/functionality")
18
  benefit: str = Field(description="Provide benefits of the feature to the user role")
19
  user_story_scenarios : List[UserStoryScenarios] = Field(description="Provide list of user story scenarios")
 
 
 
 
 
 
 
 
 
 
 
8
  pre_conditions: str = Field(description="Provide a precondition details")
9
  action_details: str = Field(description="Provide action details to be taken in business application by the user role specified")
10
  expected_outcome: str = Field(description="Provide list of activities to be allowed by business user role")
11
+
12
+ def get_json_template(model: BaseModel):
13
+ """helper function to get the json schema from the pydantic model"""
14
+
15
+ schema = model.model_json_schema()
16
+ json_schema = json.dumps(schema)
17
+ json_schema = Template(json_schema).substitute(
18
+ {"defs": "definitions", "ref": "$ref"}
19
+ )
20
+ return json.loads(json_schema)
21
 
22
  class UserStory(BaseModel):
23
  """User Story Pydantic Schema"""
 
27
  feature: str = Field(description="Provide application feature/functionality")
28
  benefit: str = Field(description="Provide benefits of the feature to the user role")
29
  user_story_scenarios : List[UserStoryScenarios] = Field(description="Provide list of user story scenarios")
30
+
31
+ def get_json_template(model: BaseModel):
32
+ """helper function to get the json schema from the pydantic model"""
33
+
34
+ schema = model.model_json_schema()
35
+ json_schema = json.dumps(schema)
36
+ json_schema = Template(json_schema).substitute(
37
+ {"defs": "definitions", "ref": "$ref"}
38
+ )
39
+ return json.loads(json_schema)
pdf-data/The Servicemembers Civil Relief Act (SCRA).pdf DELETED
Binary file (434 kB)