@@ -216,7 +216,7 @@ def __call__(self, args: argparse.Namespace) -> None:
216216 # Test if init is valid in current folder
217217 self .test_initialization ()
218218
219- sc .echo (f"Starting to initialize HERMES in { self .folder_info .absolute_path } ... " )
219+ sc .echo (f"Starting to initialize HERMES in { self .folder_info .absolute_path } " )
220220 sc .max_steps = 7
221221
222222 sc .next_step ("Configure deposition platform and setup method" )
@@ -247,6 +247,8 @@ def __call__(self, args: argparse.Namespace) -> None:
247247
248248 def test_initialization (self ) -> None :
249249 """Test if init is possible and wanted. If not: sys.exit()"""
250+ sc .echo ("Preparing HERMES initialization\n " )
251+
250252 # Abort if git is not installed
251253 if not git_info .is_git_installed ():
252254 sc .echo ("Git is currently not installed. It is recommended to use HERMES with git." ,
@@ -274,20 +276,26 @@ def test_initialization(self) -> None:
274276 if len (remotes ) > 1 :
275277 remote_index = sc .choose (
276278 "Your git project has multiple remotes. For which remote do you want to setup HERMES?" ,
277- remotes
279+ [ f" { remote } ( { git_info . get_remote_url ( remote ) } )" for remote in remotes ]
278280 )
279281 self .git_remote = remotes [remote_index ]
280282
281283 # Get url & hoster from remote
282284 if self .git_remote :
283285 self .git_remote_url = git_info .get_remote_url (self .git_remote )
284286 self .git_hoster = get_git_hoster_from_url (self .git_remote_url )
287+ # Abort with no remote
288+ else :
289+ sc .echo ("Your git project does not have a remote. It is recommended for HERMES to "
290+ "use either GitHub or GitLab as hosting service." , formatting = sc .Formats .WARNING )
291+ self .no_git_setup ()
292+ sys .exit ()
285293
286294 # Abort if neither GitHub nor gitlab is used
287295 if self .git_hoster == GitHoster .Empty :
288296 project_url = " (" + self .git_remote_url + ")" if self .git_remote_url else ""
289297 sc .echo ("Your git project{} is not connected to GitHub or GitLab. It is recommended for HERMES to "
290- "use one of those hosting services." .format (project_url ),
298+ "use one of these hosting services." .format (project_url ),
291299 formatting = sc .Formats .WARNING )
292300 self .no_git_setup ()
293301 sys .exit ()
@@ -590,7 +598,8 @@ def connect_deposit_platform(self) -> None:
590598 def no_git_setup (self , start_question : str = "" ) -> None :
591599 """Makes the init for a gitless project (basically just creating hermes.toml)"""
592600 if start_question == "" :
593- start_question = "Do you want to initialize HERMES anyways? (No CI/CD files will be created)"
601+ start_question = ("Do you want to initialize HERMES anyways? (CI/CD files for automated publishing will "
602+ "NOT be created)" )
594603 if sc .confirm (start_question ):
595604 sc .max_steps = 2
596605
@@ -600,7 +609,7 @@ def no_git_setup(self, start_question: str = "") -> None:
600609 sc .next_step ("Create CITATION.cff file" )
601610 self .create_citation_cff ()
602611
603- sc .echo ("\n HERMES is now initialized (without git integration).\n " ,
612+ sc .echo ("\n HERMES is now initialized (without git integration or CI/CD files ).\n " ,
604613 formatting = sc .Formats .OKGREEN )
605614
606615 def choose_push_branch (self ) -> None :
0 commit comments