@@ -164,6 +164,10 @@ def __init__(self, package_info: Dict[str, Any]):
164164 self ._next_version = None
165165 self .version_suggestion = ""
166166
167+ @property
168+ def pprint_name (self ) -> str :
169+ return " " .join ([word .capitalize () for word in self .package_name .split ("-" )])
170+
167171 @property
168172 def next_version (self ) -> str :
169173 if self ._next_version is None :
@@ -186,7 +190,7 @@ def check_file_with_packaging_tool(self):
186190 os .chdir (Path (f"sdk/{ self .sdk_folder } " ))
187191 # add `title` and update `is_stable` in sdk_packaging.toml
188192 toml = Path (self .whole_package_name ) / "sdk_packaging.toml"
189- stable_config = " is_stable = " + ( " true" if self .tag_is_stable else "false" ) + " \n "
193+ stable_config = f' is_stable = { " true" if self .tag_is_stable and self . next_version != "1.0.0b1" else "false" } \n '
190194 if toml .exists ():
191195
192196 def edit_toml (content : List [str ]):
@@ -214,25 +218,24 @@ def sdk_code_path(self) -> str:
214218 return str (Path (f"sdk/{ self .sdk_folder } /{ self .whole_package_name } " ))
215219
216220 def check_pprint_name (self ):
217- pprint_name = self .package_name .capitalize ()
218221
219222 def edit_file_for_pprint_name (content : List [str ]):
220223 for i in range (0 , len (content )):
221- content [i ] = content [i ].replace ("MyService" , pprint_name )
224+ content [i ] = content [i ].replace ("MyService" , self . pprint_name )
222225
223226 for file in os .listdir (self .sdk_code_path ()):
224227 file_path = str (Path (self .sdk_code_path ()) / file )
225228 if os .path .isfile (file_path ):
226229 modify_file (file_path , edit_file_for_pprint_name )
227- _LOGGER .info (f' replace "MyService" with "{ pprint_name } " successfully ' )
230+ _LOGGER .info (f' replace "MyService" with "{ self . pprint_name } " successfully ' )
228231
229232 def check_sdk_readme (self ):
230233 sdk_readme = str (Path (f"sdk/{ self .sdk_folder } /{ self .whole_package_name } /README.md" ))
231234
232235 def edit_sdk_readme (content : List [str ]):
233236 for i in range (0 , len (content )):
234237 if content [i ].find ("MyService" ) > 0 :
235- content [i ] = content [i ].replace ("MyService" , self .package_name . capitalize () )
238+ content [i ] = content [i ].replace ("MyService" , self .pprint_name )
236239
237240 modify_file (sdk_readme , edit_sdk_readme )
238241
@@ -325,7 +328,7 @@ def edit_changelog_proc(content: List[str]):
325328
326329 def check_dev_requirement (self ):
327330 file = Path (f"sdk/{ self .sdk_folder } /{ self .whole_package_name } /dev_requirements.txt" )
328- content = ["-e ../../../tools/azure-sdk-tools\n " , "../../identity/azure-identity\n " ]
331+ content = ["-e ../../../tools/azure-sdk-tools\n " , "../../identity/azure-identity\n aiohttp \ n " ]
329332 if not file .exists ():
330333 with open (file , "w" ) as file_out :
331334 file_out .writelines (content )
0 commit comments