Commit
·
23330c3
1
Parent(s):
b8956ed
added data dir and .gitkeep files
Browse files- .gitignore +15 -0
- data/.gitkeep +0 -0
- data/test/.gitkeep +0 -0
- data/test/DS_test_set/.gitkeep +0 -0
- data/test/DS_test_set/DS_100/.gitkeep +0 -0
- data/test/DS_test_set/DS_150/.gitkeep +0 -0
- data/test/DS_test_set/DS_200/.gitkeep +0 -0
- data/test/DS_test_set/DS_250/.gitkeep +0 -0
- data/test/DS_test_set/DS_300/.gitkeep +0 -0
- data/test/DS_test_set/DS_350/.gitkeep +0 -0
- data/test/DS_test_set/DS_50/.gitkeep +0 -0
- data/test/MDS_test_set/.gitkeep +0 -0
- data/test/MDS_test_set/DOP_1000/.gitkeep +0 -0
- data/test/MDS_test_set/DOP_1200/.gitkeep +0 -0
- data/test/MDS_test_set/DOP_1400/.gitkeep +0 -0
- data/test/MDS_test_set/DOP_200/.gitkeep +0 -0
- data/test/MDS_test_set/DOP_400/.gitkeep +0 -0
- data/test/MDS_test_set/DOP_600/.gitkeep +0 -0
- data/test/MDS_test_set/DOP_800/.gitkeep +0 -0
- data/test/SNR_test_set/.gitkeep +0 -0
- data/test/SNR_test_set/SNR_0/.gitkeep +0 -0
- data/test/SNR_test_set/SNR_10/.gitkeep +0 -0
- data/test/SNR_test_set/SNR_15/.gitkeep +0 -0
- data/test/SNR_test_set/SNR_20/.gitkeep +0 -0
- data/test/SNR_test_set/SNR_25/.gitkeep +0 -0
- data/test/SNR_test_set/SNR_30/.gitkeep +0 -0
- data/test/SNR_test_set/SNR_5/.gitkeep +0 -0
- data/train/.gitkeep +0 -0
- data/val/.gitkeep +0 -0
- scripts/add_gitkeep.py +55 -0
.gitignore
CHANGED
|
@@ -1,2 +1,17 @@
|
|
| 1 |
.idea/
|
| 2 |
+**/__pycache__/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
.idea/
|
| 2 |
+**/__pycache__/
|
| 3 |
+
|
| 4 |
+
# Ignore data files but keep directory structure
|
| 5 |
+
data/**/*.mat
|
| 6 |
+
data/**/*.npy
|
| 7 |
+
data/**/*.pkl
|
| 8 |
+
data/**/*.h5
|
| 9 |
+
data/**/*.hdf5
|
| 10 |
+
data/**/*.csv
|
| 11 |
+
data/**/*.json
|
| 12 |
+
data/**/*.txt
|
| 13 |
+
data/**/*.bin
|
| 14 |
+
data/**/*.dat
|
| 15 |
+
|
| 16 |
+
# But don't ignore .gitkeep files
|
| 17 |
+
!data/**/.gitkeep
|
data/.gitkeep
ADDED
|
File without changes
|
data/test/.gitkeep
ADDED
|
File without changes
|
data/test/DS_test_set/.gitkeep
ADDED
|
File without changes
|
data/test/DS_test_set/DS_100/.gitkeep
ADDED
|
File without changes
|
data/test/DS_test_set/DS_150/.gitkeep
ADDED
|
File without changes
|
data/test/DS_test_set/DS_200/.gitkeep
ADDED
|
File without changes
|
data/test/DS_test_set/DS_250/.gitkeep
ADDED
|
File without changes
|
data/test/DS_test_set/DS_300/.gitkeep
ADDED
|
File without changes
|
data/test/DS_test_set/DS_350/.gitkeep
ADDED
|
File without changes
|
data/test/DS_test_set/DS_50/.gitkeep
ADDED
|
File without changes
|
data/test/MDS_test_set/.gitkeep
ADDED
|
File without changes
|
data/test/MDS_test_set/DOP_1000/.gitkeep
ADDED
|
File without changes
|
data/test/MDS_test_set/DOP_1200/.gitkeep
ADDED
|
File without changes
|
data/test/MDS_test_set/DOP_1400/.gitkeep
ADDED
|
File without changes
|
data/test/MDS_test_set/DOP_200/.gitkeep
ADDED
|
File without changes
|
data/test/MDS_test_set/DOP_400/.gitkeep
ADDED
|
File without changes
|
data/test/MDS_test_set/DOP_600/.gitkeep
ADDED
|
File without changes
|
data/test/MDS_test_set/DOP_800/.gitkeep
ADDED
|
File without changes
|
data/test/SNR_test_set/.gitkeep
ADDED
|
File without changes
|
data/test/SNR_test_set/SNR_0/.gitkeep
ADDED
|
File without changes
|
data/test/SNR_test_set/SNR_10/.gitkeep
ADDED
|
File without changes
|
data/test/SNR_test_set/SNR_15/.gitkeep
ADDED
|
File without changes
|
data/test/SNR_test_set/SNR_20/.gitkeep
ADDED
|
File without changes
|
data/test/SNR_test_set/SNR_25/.gitkeep
ADDED
|
File without changes
|
data/test/SNR_test_set/SNR_30/.gitkeep
ADDED
|
File without changes
|
data/test/SNR_test_set/SNR_5/.gitkeep
ADDED
|
File without changes
|
data/train/.gitkeep
ADDED
|
File without changes
|
data/val/.gitkeep
ADDED
|
File without changes
|
scripts/add_gitkeep.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
Script to add .gitkeep files to all subdirectories in the data folder.
|
| 4 |
+
This ensures that empty directories are tracked by git even when the data folder is in .gitignore.
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
import os
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
|
| 10 |
+
def add_gitkeep_to_directories(root_path: str | Path):
|
| 11 |
+
"""
|
| 12 |
+
Recursively add .gitkeep files to all subdirectories.
|
| 13 |
+
|
| 14 |
+
Args:
|
| 15 |
+
root_path: Path to the root directory to process
|
| 16 |
+
"""
|
| 17 |
+
root = Path(root_path)
|
| 18 |
+
|
| 19 |
+
if not root.exists():
|
| 20 |
+
print(f"Error: {root_path} does not exist")
|
| 21 |
+
return
|
| 22 |
+
|
| 23 |
+
if not root.is_dir():
|
| 24 |
+
print(f"Error: {root_path} is not a directory")
|
| 25 |
+
return
|
| 26 |
+
|
| 27 |
+
gitkeep_count = 0
|
| 28 |
+
|
| 29 |
+
# Walk through all subdirectories
|
| 30 |
+
for dirpath, dirnames, filenames in os.walk(root):
|
| 31 |
+
dir_path = Path(dirpath)
|
| 32 |
+
|
| 33 |
+
# Skip if .gitkeep already exists
|
| 34 |
+
gitkeep_file = dir_path / ".gitkeep"
|
| 35 |
+
if gitkeep_file.exists():
|
| 36 |
+
print(f" Skipping {dir_path} (already has .gitkeep)")
|
| 37 |
+
continue
|
| 38 |
+
|
| 39 |
+
# Add .gitkeep file
|
| 40 |
+
gitkeep_file.touch()
|
| 41 |
+
print(f" Added .gitkeep to {dir_path}")
|
| 42 |
+
gitkeep_count += 1
|
| 43 |
+
|
| 44 |
+
print(f"\nTotal .gitkeep files added: {gitkeep_count}")
|
| 45 |
+
|
| 46 |
+
if __name__ == "__main__":
|
| 47 |
+
# Add .gitkeep to all subdirectories in the data folder
|
| 48 |
+
data_path = Path("data")
|
| 49 |
+
|
| 50 |
+
print(f"Adding .gitkeep files to subdirectories in {data_path.absolute()}")
|
| 51 |
+
print("=" * 60)
|
| 52 |
+
|
| 53 |
+
add_gitkeep_to_directories(data_path)
|
| 54 |
+
|
| 55 |
+
print("\nDone!")
|