Created
September 11, 2023 14:34
-
-
Save alastori/d8e6c73ec538d0df04730a6a1a397a4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Display the directory structure | |
cat <<EOL | |
This script will create the following directory structure: | |
project_name/ | |
│ | |
├── notebooks/ # Jupyter notebooks for analysis, exploration, etc. | |
│ ├── exploratory/ # Initial explorations, drafts, experiments. | |
│ └── report/ # Polished, finalized notebooks for presentation. | |
│ | |
├── data/ | |
│ ├── raw/ # Raw, immutable data dump. | |
│ ├── processed/ # Cleaned, transformed data. | |
│ └── external/ # External data sources, if any. | |
│ | |
├── src/ # Source code. | |
│ ├── __init__.py # Makes src a Python module. | |
│ ├── data/ # Scripts to fetch, clean or transform data. | |
│ ├── features/ # Feature engineering scripts. | |
│ ├── models/ # Model definitions, training scripts etc. | |
│ └── visualization/ # Visualization scripts, plotting functions. | |
│ | |
├── reports/ # Generated reports and associated files. | |
│ ├── figures/ # Graphs, static visualizations, etc. | |
│ └── tables/ # Tables, data summaries, etc. | |
│ | |
├── environment.yml # Conda environment file. | |
├── requirements.txt # Pip requirements file. | |
│ | |
├── .gitignore # Specify unwanted files/folders for git. | |
├── README.md # Project description, setup, and instructions. | |
└── LICENSE # Licensing information. | |
EOL | |
# Get project name from the user | |
read -p "Enter your project name: " project_name | |
# Check if directory exists | |
if [ -d "$project_name" ]; then | |
echo "Directory $project_name already exists. Exiting..." | |
exit 1 | |
fi | |
# Create the directory structure and files | |
mkdir -p "$project_name"/notebooks/exploratory | |
mkdir -p "$project_name"/notebooks/report | |
mkdir -p "$project_name"/data/raw | |
mkdir -p "$project_name"/data/processed | |
mkdir -p "$project_name"/data/external | |
mkdir -p "$project_name"/src/data | |
mkdir -p "$project_name"/src/features | |
mkdir -p "$project_name"/src/models | |
mkdir -p "$project_name"/src/visualization | |
mkdir -p "$project_name"/reports/figures | |
mkdir -p "$project_name"/reports/tables | |
# Create the required files | |
touch "$project_name"/src/__init__.py | |
touch "$project_name"/environment.yml | |
touch "$project_name"/requirements.txt | |
touch "$project_name"/.gitignore | |
touch "$project_name"/README.md | |
touch "$project_name"/LICENSE | |
echo "Directory structure created successfully!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment