Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

templates.py 943 B

You have to be logged in to leave a comment. Sign In
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
  1. import os
  2. from pathlib import Path
  3. import logging
  4. list_to_files=[
  5. ".github/.gitkeep",
  6. 'config/config.yaml',
  7. 'templates',
  8. 'NoteBooks/Eda.ipynb',
  9. 'src/__init__.py',
  10. 'src/pipline/__init__.py',
  11. 'src/components/__init__.py',
  12. 'src/constant/__init__.py',
  13. 'src/configure/__init__.py',
  14. 'src/entity/__init__.py',
  15. 'src/logging/__init__.py',
  16. 'src/logging/logger.py',
  17. 'src/exception/__init__.py',
  18. 'src/exception/exception.py',
  19. 'src/utils/__init__.py',
  20. 'src/utils/utils.py',
  21. 'params.yaml',
  22. 'schema.yaml',
  23. 'main.py',
  24. 'app.py',
  25. 'requirements.txt',
  26. 'setup.py'
  27. ]
  28. for filepath in list_to_files:
  29. filepath=Path(filepath)
  30. fildir,filename=os.path.split(filepath)
  31. if fildir !='':
  32. os.makedirs(fildir,exist_ok=True)
  33. if (not os.path.exists(filepath)) or (os.path.getsize(filepath) == 0):
  34. with open(filepath, "w") as f:
  35. pass
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...