-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_project.py
More file actions
50 lines (42 loc) · 1.89 KB
/
setup_project.py
File metadata and controls
50 lines (42 loc) · 1.89 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
39
40
41
42
43
44
45
46
47
48
49
50
import os
def create_project_structure():
# প্রজেক্টের নাম
project_name = "Student-Performance-Prediction"
# যে ফোল্ডারগুলো তৈরি করতে হবে
folders = [
os.path.join(project_name, 'data'),
os.path.join(project_name, 'notebooks'),
os.path.join(project_name, 'src'),
os.path.join(project_name, 'models'),
os.path.join(project_name, 'outputs'),
os.path.join(project_name, 'images'),
]
# যে ফাইলগুলো তৈরি করতে হবে
files = [
os.path.join(project_name, 'src', 'preprocessing.py'),
os.path.join(project_name, 'src', 'model_dev.py'),
os.path.join(project_name, 'main.py'),
os.path.join(project_name, 'requirements.txt'),
os.path.join(project_name, 'README.md'),
os.path.join(project_name, '.gitignore'),
]
print(f"🚀 Creating structure for: {project_name}...")
# ফোল্ডার তৈরি
for folder in folders:
if not os.path.exists(folder):
os.makedirs(folder)
print(f"📁 Folder Created: {folder}")
# ফাইল তৈরি (ফাঁকা ফাইল)
for file in files:
if not os.path.exists(file):
with open(file, 'w') as f:
if 'requirements.txt' in file:
f.write("pandas\nnumpy\nscikit-learn\nxgboost\nplotly\njoblib\nfastapi\nuvicorn")
elif '.gitignore' in file:
f.write("data/\nmodels/*.pkl\nmodels/*.joblib\n__pycache__/\n.env\noutputs/*.html")
else:
f.write(f"# {os.path.basename(file)} file")
print(f"📄 File Created: {file}")
print("\n✅ Project structure is ready! Now you can start coding.")
if __name__ == "__main__":
create_project_structure()