Skip to content

Commit baa6de4

Browse files
committed
fixed imports
1 parent 5aaae62 commit baa6de4

13 files changed

+51
-65
lines changed

osbot_aws/aws/bedrock/cache/html/Bedrock_Cache__Html.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
from osbot_aws.aws.bedrock.cache.Bedrock__Cache import Bedrock__Cache
2-
from osbot_utils.helpers.html.Tag__Base import Tag__Base
3-
from osbot_utils.helpers.html.Tag__Div import Tag__Div
4-
from osbot_utils.helpers.html.Tag__H import Tag__H
5-
from osbot_utils.helpers.html.Tag__HR import Tag__HR
6-
from osbot_utils.helpers.html.Tag__Head import Tag__Head
7-
from osbot_utils.helpers.html.Tag__Html import Tag__Html
1+
from osbot_utils.helpers.html.tags.Tag__Head import Tag__Head
2+
from osbot_utils.helpers.html.tags.Tag__Base import Tag__Base
3+
from osbot_utils.helpers.html.tags.Tag__HR import Tag__HR
4+
from osbot_utils.helpers.html.tags.Tag__H import Tag__H
5+
from osbot_utils.helpers.html.tags.Tag__Div import Tag__Div
6+
from osbot_utils.helpers.html.tags.Tag__Html import Tag__Html
7+
from osbot_aws.aws.bedrock.cache.Bedrock__Cache import Bedrock__Cache
8+
89

910

1011
class Bedrock_Cache__Html:

osbot_aws/aws/bedrock/cache/html/Bedrock_Cache__Html_Table.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
from osbot_aws.aws.bedrock.cache.html.Bedrock_Cache__Html import Bedrock_Cache__Html
2-
from osbot_utils.helpers.html.Tag__Base import Tag__Base
3-
from osbot_utils.helpers.html.Tag__H import Tag__H
4-
from osbot_utils.utils.Dev import pprint
5-
from osbot_utils.utils.Json import json_loads, json_dumps
6-
from osbot_utils.utils.Misc import list_set, word_wrap, timestamp_to_str_date
1+
from osbot_utils.helpers.html.tags.Tag__Base import Tag__Base
2+
from osbot_aws.aws.bedrock.cache.html.Bedrock_Cache__Html import Bedrock_Cache__Html
3+
from osbot_utils.utils.Json import json_loads, json_dumps
4+
from osbot_utils.utils.Misc import list_set, word_wrap, timestamp_to_str_date
75

86

97
class Bedrock_Cache__Html_Table(Bedrock_Cache__Html):

osbot_aws/aws/bedrock/cache/html/Bedrock_Cache__Html_With_Images.py

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
from osbot_aws.aws.bedrock.cache.Bedrock__Cache import Bedrock__Cache
2-
from osbot_aws.aws.bedrock.cache.html.Bedrock_Cache__Html import Bedrock_Cache__Html
3-
from osbot_utils.helpers.html.Tag__Base import Tag__Base
4-
from osbot_utils.helpers.html.Tag__Div import Tag__Div
5-
from osbot_utils.helpers.html.Tag__H import Tag__H
6-
from osbot_utils.helpers.html.Tag__HR import Tag__HR
7-
from osbot_utils.helpers.html.Tag__Head import Tag__Head
8-
from osbot_utils.helpers.html.Tag__Html import Tag__Html
9-
from osbot_utils.utils.Dev import pprint
10-
from osbot_utils.utils.Misc import list_set
1+
from osbot_utils.helpers.html.tags.Tag__Base import Tag__Base
2+
from osbot_utils.helpers.html.tags.Tag__HR import Tag__HR
3+
from osbot_utils.helpers.html.tags.Tag__Div import Tag__Div
4+
from osbot_aws.aws.bedrock.cache.html.Bedrock_Cache__Html import Bedrock_Cache__Html
115

126

137
class Bedrock_Cache__Html_With_Images(Bedrock_Cache__Html):
@@ -45,16 +39,16 @@ def create__amazon_titan(self):
4539
images = response_data.get('images')
4640
image_base64 = images[0]
4741

48-
div_image = Tag__Div(tag_classes = ['col', 'col-md-3', 'text-center'])
49-
div_badge = Tag__Div(tag_classes=['badge','bg-primary'], inner_html = f"{task_type} #{request_id}")
50-
hr = Tag__HR()
51-
div_text_title = Tag__Div(tag_classes=['var_name'], inner_html="Text:" )
52-
div_text_value = Tag__Div(inner_html=f"<strong>{image_text}</strong>" )
53-
div_negative_title = Tag__Div(tag_classes=['var_name'], inner_html="Negative Text:" )
54-
div_negative_value = Tag__Div(inner_html=f"<strong>{image_negative_text}</strong>" )
55-
div_comments_title = Tag__Div(tag_classes=['var_name' ], inner_html="Comments:" )
56-
div_comments_value = Tag__Div(tag_classes=['comments_value'], inner_html=request_comments )
57-
img = Tag__Base(tag_name="img", tag_classes=['base64-image','img-fluid'])
42+
div_image = Tag__Div(tag_classes = ['col', 'col-md-3', 'text-center'])
43+
div_badge = Tag__Div(tag_classes=['badge','bg-primary'], inner_html = f"{task_type} #{request_id}")
44+
hr = Tag__HR()
45+
div_text_title = Tag__Div(tag_classes=['var_name'], inner_html="Text:" )
46+
div_text_value = Tag__Div(inner_html=f"<strong>{image_text}</strong>" )
47+
div_negative_title = Tag__Div(tag_classes=['var_name'], inner_html="Negative Text:" )
48+
div_negative_value = Tag__Div(inner_html=f"<strong>{image_negative_text}</strong>" )
49+
div_comments_title = Tag__Div(tag_classes=['var_name' ], inner_html="Comments:" )
50+
div_comments_value = Tag__Div(tag_classes=['comments_value'], inner_html=request_comments )
51+
img = Tag__Base(tag_name="img", tag_classes=['base64-image','img-fluid'])
5852
img.attributes['src'] = f"data:image/jpeg;base64,{image_base64}"
5953
div_image.append(div_badge, hr,
6054
img,

osbot_aws/aws/lambda_/dependencies/Lambda__Dependency__Base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from osbot_utils.utils.Files import current_temp_folder
2-
from osbot_utils.type_safe.primitives.safe_str.filesystem.Safe_Str__File__Path import Safe_Str__File__Path
3-
from osbot_aws.AWS_Config import AWS_Config
4-
from osbot_aws.aws.lambda_.schemas.Safe_Str__File__Name__Python_Package import Safe_Str__File__Name__Python_Package
5-
from osbot_utils.type_safe.Type_Safe import Type_Safe
1+
from osbot_utils.type_safe.primitives.domains.files.safe_str.Safe_Str__File__Path import Safe_Str__File__Path
2+
from osbot_utils.utils.Files import current_temp_folder
3+
from osbot_aws.AWS_Config import AWS_Config
4+
from osbot_aws.aws.lambda_.schemas.Safe_Str__File__Name__Python_Package import Safe_Str__File__Name__Python_Package
5+
from osbot_utils.type_safe.Type_Safe import Type_Safe
66

77

88
DEFAULT__TEMP_FOLDER = Safe_Str__File__Path(current_temp_folder())

osbot_aws/aws/lambda_/dependencies/Lambda__Dependency__Local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from osbot_aws.aws.lambda_.schemas.Safe_Str__File__Path__Python_Package import Safe_Str__File__Path__Python_Package
55
from osbot_aws.aws.lambda_.schemas.Schema__Lambda__Dependency__Local_Install__Data import Schema__Lambda__Dependency__Local_Install__Data
66
from osbot_utils.utils.Json import json_file_load, json_file_save
7-
from osbot_utils.type_safe.primitives.safe_str.filesystem.Safe_Str__File__Path import Safe_Str__File__Path
7+
from osbot_utils.type_safe.primitives.domains.files.safe_str.Safe_Str__File__Path import Safe_Str__File__Path
88
from osbot_utils.helpers.duration.decorators.capture_duration import capture_duration
99
from osbot_utils.utils.Files import path_combine, files_list__virtual_paths, file_exists, file_delete, folder_delete_recursively, current_temp_folder, create_folder
1010
from osbot_utils.utils.Process import Process

osbot_aws/aws/lambda_/schemas/Safe_Str__File__Name__Python_Package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import re
2-
from osbot_utils.type_safe.primitives.safe_str.filesystem.Safe_Str__File__Name import Safe_Str__File__Name
2+
from osbot_utils.type_safe.primitives.domains.files.safe_str.Safe_Str__File__Name import Safe_Str__File__Name
33

44
TYPE_SAFE_STR__FILE__PATH__PYTHON_PACKAGE__REGEX = re.compile(r'[^a-zA-Z0-9_\-. =]') # Allow alphanumerics, underscores, hyphens, dots, slashes, spaces and equal
55

osbot_aws/aws/lambda_/schemas/Safe_Str__File__Path__Python_Package.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import re
2-
from osbot_utils.type_safe.primitives.safe_str.filesystem.Safe_Str__File__Path import Safe_Str__File__Path
2+
from osbot_utils.type_safe.primitives.domains.files.safe_str.Safe_Str__File__Path import Safe_Str__File__Path
3+
34

45
TYPE_SAFE_STR__FILE_PATH__PYTHON_PACKAGE__REGEX = re.compile(r'[^a-zA-Z0-9_\-./\\ =]') # Allow alphanumerics, underscores, hyphens, dots, slashes, spaces and equal
56

osbot_aws/aws/lambda_/schemas/Schema__Lambda__Dependency__Local_Install__Data.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from typing import List
2-
from osbot_utils.type_safe.primitives.safe_int.Timestamp_Now import Timestamp_Now
3-
from osbot_utils.type_safe.primitives.safe_str.filesystem.Safe_Str__File__Path import Safe_Str__File__Path
4-
from osbot_utils.type_safe.Type_Safe import Type_Safe
5-
from osbot_aws.aws.lambda_.schemas.Safe_Str__File__Path__Python_Package import Safe_Str__File__Path__Python_Package
6-
from osbot_aws.aws.lambda_.schemas.Safe_Str__File__Name__Python_Package import Safe_Str__File__Name__Python_Package
1+
from typing import List
2+
from osbot_utils.type_safe.Type_Safe import Type_Safe
3+
from osbot_aws.aws.lambda_.schemas.Safe_Str__File__Path__Python_Package import Safe_Str__File__Path__Python_Package
4+
from osbot_aws.aws.lambda_.schemas.Safe_Str__File__Name__Python_Package import Safe_Str__File__Name__Python_Package
5+
from osbot_utils.type_safe.primitives.domains.identifiers.Timestamp_Now import Timestamp_Now
6+
from osbot_utils.type_safe.primitives.domains.files.safe_str.Safe_Str__File__Path import Safe_Str__File__Path
77

88
class Schema__Lambda__Dependency__Local_Install__Data(Type_Safe):
99
package_name : Safe_Str__File__Name__Python_Package = None

osbot_aws/aws/s3/S3__Virtual_Storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from osbot_aws.aws.s3.S3__DB_Base import S3__DB_Base
33
from osbot_utils.decorators.methods.cache_on_self import cache_on_self
44
from osbot_utils.helpers.llms.cache.Virtual_Storage__Local__Folder import Virtual_Storage__Local__Folder
5-
from osbot_utils.type_safe.primitives.safe_str.filesystem.Safe_Str__File__Path import Safe_Str__File__Path
5+
from osbot_utils.type_safe.primitives.domains.files.safe_str.Safe_Str__File__Path import Safe_Str__File__Path
66
from osbot_utils.utils.Files import path_combine_safe
77

88
VIRTUAL_STORAGE__DEFAULT__ROOT_FOLDER = Safe_Str__File__Path("s3-virtual-storage/")

tests/integration/aws/bedrock/cache/html/test_Bedrock_Cache__Html.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from unittest import TestCase
2-
1+
from unittest import TestCase
32
from osbot_aws.aws.bedrock.cache.Bedrock__Cache import Bedrock__Cache, SQLITE_TABLE__BEDROCK_REQUESTS
43
from osbot_aws.aws.bedrock.cache.html.Bedrock_Cache__Html import Bedrock_Cache__Html
54
from osbot_utils.helpers.sqlite.cache.Sqlite__Cache__Requests__Table import Sqlite__Cache__Requests__Table

0 commit comments

Comments
 (0)