-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject_structure.py
More file actions
38 lines (31 loc) · 1.15 KB
/
project_structure.py
File metadata and controls
38 lines (31 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# pip install cookiecutter
# cookiecutter -c v1 https://github.com/jesussantana/cookiecutter-data-science
# or create folders recursively
import os
src = ['preparation' ,'procesing', 'modeling']
test = ['test']
model = ['model']
data = ['raw', 'processed']
notebook = ['eda', 'poc', 'modeling', 'evaluation']
main_dir = [src, test, model, data, notebook]
root_dir = 'Master'
main_dir_names = ['src', 'test', 'model', 'data','notebook']
def main():
# Create directory
for i in range(0, len(main_dir)):
for j in range(0,len(main_dir[i])):
dirName = str(root_dir) + '/' + str(main_dir_names[i]) +'/' + str(main_dir[i][j])
try:
# Create target Directory
os.makedirs(dirName)
print("Directory " , dirName , " Created ")
except FileExistsError:
print("Directory " , dirName , " already exists")
# Create target Directory if don't exist
if not os.path.exists(dirName):
os.makedirs(dirName)
print("Directory " , dirName , " Created ")
else:
print("Directory " , dirName , " already exists")
if __name__ == '__main__':
main()