Skip to content

Instantly share code, notes, and snippets.

@abmathewks
Created December 14, 2021 23:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save abmathewks/4d69139f8a267afffed0c45a7720bac3 to your computer and use it in GitHub Desktop.
Save abmathewks/4d69139f8a267afffed0c45a7720bac3 to your computer and use it in GitHub Desktop.
def CreateProjectFiles(PROJECT_PATH):
print("CreateProjectFiles: Function initalized")
if os.path.exists(PROJECT_PATH) and any(os.scandir(PROJECT_PATH)):
folders = ["data", "deploy", "docs", "models", "notebooks",
"scripts", "tests", "utils"]
for each_folder in folders:
os.makedirs(os.path.join(PROJECT_PATH, each_folder))
print("CreateProjectFiles: Function run completed")
elif not os.path.exists(PROJECT_PATH):
print("CreateProjectFiles: Project directory does not exist")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment