Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions snakedeploy/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ def deploy_profile(self):

returns a boolean "no_profile" to indicate if there is not a profile (True)
"""
# Handle the profile/
# Check for profiles directory at root level first
profile_dir = Path(self.repo_clone) / "profiles"

# If not found at root, check under workflow directory
if not profile_dir.exists():
profile_dir = Path(self.repo_clone) / "workflow" / "profiles"

no_profile = not profile_dir.exists()
if no_profile:
logger.warning(
Expand All @@ -91,7 +96,13 @@ def deploy_profile(self):
"need or provide any profiles."
)
else:
logger.info("Writing template profiles")
logger.info(
f"Writing template profiles from {profile_dir.relative_to(self.repo_clone)}"
)
logger.info(
"If you adapt this profile for your HPC or VM cluster consider "
"contributing this profile to the original repository."
)
shutil.copytree(profile_dir, self.profiles, dirs_exist_ok=self.force)
return no_profile

Expand Down