@@ -123,8 +123,8 @@ def get_workflow_path_from_name(workflow_name: str):
123
123
@click .option (
124
124
"--workflow-dir" ,
125
125
default = "." ,
126
- help = "Output directory for saving the created workflow. A new folder with the workflow name will be created within. "
127
- "Defaults to the present working directory." )
126
+ help = "Output directory for saving the created workflow. A new folder with the workflow name will be created "
127
+ "within. Defaults to the present working directory." )
128
128
@click .option (
129
129
"--description" ,
130
130
default = "AIQ Toolkit function template. Please update the description." ,
@@ -170,6 +170,8 @@ def create_command(workflow_name: str, install: bool, workflow_dir: str, descrip
170
170
(new_workflow_dir / 'src' / package_name ).mkdir (parents = True )
171
171
# Create config directory
172
172
(new_workflow_dir / 'src' / package_name / 'configs' ).mkdir (parents = True )
173
+ # Create package level configs directory
174
+ (new_workflow_dir / 'configs' ).mkdir (parents = True )
173
175
174
176
# Initialize Jinja2 environment
175
177
env = Environment (loader = FileSystemLoader (str (template_dir )))
@@ -196,7 +198,6 @@ def create_command(workflow_name: str, install: bool, workflow_dir: str, descrip
196
198
'python_safe_workflow_name' : workflow_name .replace ("-" , "_" ),
197
199
'package_name' : package_name ,
198
200
'rel_path_to_repo_root' : rel_path_to_repo_root ,
199
- # 'workflow_class_name': f"{workflow_name.capitalize().replace("-", "").replace("_", "")}WorkflowConfig",
200
201
'workflow_class_name' : f"{ _generate_valid_classname (workflow_name )} FunctionConfig" ,
201
202
'workflow_description' : description
202
203
}
@@ -207,6 +208,11 @@ def create_command(workflow_name: str, install: bool, workflow_dir: str, descrip
207
208
with open (output_path , 'w' , encoding = "utf-8" ) as f :
208
209
f .write (content )
209
210
211
+ # Create symlink for config.yml
212
+ config_source = new_workflow_dir / 'src' / package_name / 'configs' / 'config.yml'
213
+ config_link = new_workflow_dir / 'configs' / 'config.yml'
214
+ os .symlink (config_source , config_link )
215
+
210
216
if install :
211
217
# Install the new package without changing directories
212
218
click .echo (f"Installing workflow '{ workflow_name } '..." )
0 commit comments