File tree Expand file tree Collapse file tree 4 files changed +18
-9
lines changed
python/example_code/scheduler Expand file tree Collapse file tree 4 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ scheduler_ScheduledEventsWorkflow:
151151 genai : some
152152 snippet_tags :
153153 - python.example_code.scheduler.FeatureScenario
154- - description : Define a class that wraps &EVlong; Scheduler actions.
154+ - description : SchedulerWrapper class that wraps &EVlong; Scheduler actions.
155155 genai : some
156156 snippet_tags :
157157 - python.example_code.scheduler.EventSchedulerWrapper.class
Original file line number Diff line number Diff line change 1- boto3 >= 1.35.38
2- pytest >= 8.3.3
3- botocore >= 1.35.38
1+ boto3 >= 1.35.38
Original file line number Diff line number Diff line change 1515from boto3 .resources .base import ServiceResource
1616from boto3 import resource
1717
18+ script_dir = os .path .dirname (os .path .abspath (__file__ ))
19+
1820# Add relative path to include SchedulerWrapper.
19- sys .path .append ('..' )
21+ sys .path .append (os . path . dirname ( script_dir ) )
2022from scheduler_wrapper import SchedulerWrapper
2123
2224# Add relative path to include demo_tools in this code example without need for setup.
23- sys .path .append ("../../.." )
25+ sys .path .append (os . path . join ( script_dir , "../../.." ) )
2426import demo_tools .question as q
2527
2628
29+
30+
2731DASHES = "-" * 80
2832
2933sys .path
@@ -93,7 +97,6 @@ def prepare_application(self) -> None:
9397 email_address = q .ask ("Enter an email address to use for event subscriptions: " )
9498 stack_name = q .ask ("Enter a name for the AWS Cloud Formation Stack: " )
9599
96- script_directory = os .path .dirname (os .path .abspath (sys .argv [0 ]))
97100 template_file = SchedulerScenario .get_template_as_string ()
98101
99102 parameters = [{"ParameterKey" : "email" , "ParameterValue" : email_address }]
Original file line number Diff line number Diff line change 99
1010import boto3
1111import pytest
12+ import os
1213
14+
15+ script_dir = os .path .dirname (os .path .abspath (__file__ ))
16+
17+ # Add relative path to include SchedulerWrapper.
18+ sys .path .append (script_dir )
19+ sys .path .append (os .path .dirname (script_dir ))
1320import scheduler_scenario
1421from scheduler_wrapper import SchedulerWrapper
1522
16- # This is needed so Python can find test_tools on the path.
17- sys .path .append ("../.." )
23+ # Add relative path to include demo_tools in this code example without need for setup.
24+ sys .path .append (os .path .join (script_dir , "../../.." ))
25+
1826from test_tools .fixtures .common import *
1927
2028
You can’t perform that action at this time.
0 commit comments