Skip to content

Commit 862c9c2

Browse files
committed
update Coding Best Practices
1 parent a2e9391 commit 862c9c2

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

notebooks/CodingBestPractices.ipynb

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,57 @@
10651065
"```"
10661066
]
10671067
},
1068+
{
1069+
"cell_type": "markdown",
1070+
"metadata": {},
1071+
"source": []
1072+
},
1073+
{
1074+
"cell_type": "markdown",
1075+
"metadata": {},
1076+
"source": [
1077+
"## Project Structure\n",
1078+
"\n",
1079+
"- it's best practice to organize code into a well-defined project structure\n",
1080+
"- a well-defined project structure helps in:\n",
1081+
" - better organization of code\n",
1082+
" - easier navigation and understanding of the codebase\n",
1083+
" - better collaboration among team members\n",
1084+
" - easier testing and deployment of the code\n",
1085+
"- most common project structure in python uses **src layout**\n",
1086+
"\n",
1087+
"```markdown\n",
1088+
"project-name/\n",
1089+
"\n",
1090+
"├── pyproject.toml\n",
1091+
"├── README.md\n",
1092+
"├── LICENSE\n",
1093+
"├── .gitignore\n",
1094+
"\n",
1095+
"├── src/\n",
1096+
"│ └── project_name/\n",
1097+
"│ ├── __init__.py\n",
1098+
"│ ├── cli.py\n",
1099+
"│ ├── core.py\n",
1100+
"│ └── utils/\n",
1101+
"│ ├── __init__.py\n",
1102+
"│ └── file_helpers.py\n",
1103+
"\n",
1104+
"├── tests/\n",
1105+
"│ ├── test_core.py\n",
1106+
"│ └── utils/\n",
1107+
"│ └── test_file_helpers.py\n",
1108+
"\n",
1109+
"├── docs/\n",
1110+
"│ └── index.md\n",
1111+
"| |__ installation.md\n",
1112+
"| |__ usage.md\n",
1113+
"\n",
1114+
"└── scripts/\n",
1115+
" └── dev_setup.sh\n",
1116+
"```"
1117+
]
1118+
},
10681119
{
10691120
"cell_type": "markdown",
10701121
"metadata": {},

0 commit comments

Comments
 (0)