forked from sergts/botnet-traffic-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestmodernizationModernizing code, dependencies, and structureModernizing code, dependencies, and structurerefactorCode refactoring and reorganizationCode refactoring and reorganization
Description
Goal
Restructure project to modern Python package layout with proper separation of concerns.
Current Issues
- Inconsistent naming:
anomaly-detectionvsclassification - Mixed concerns: models, logs, lime outputs in module dirs
- No tests/ directory
- No proper package structure
Target Structure
project/
├── src/ # All source code
│ ├── anomaly_detection/ # Renamed from anomaly-detection
│ │ ├── models/
│ │ ├── training/
│ │ ├── evaluation/
│ │ └── utils/
│ ├── classification/
│ ├── federated_learning/ # NEW
│ ├── data/ # Data utilities
│ │ ├── loaders/
│ │ ├── preprocessing/
│ │ └── validation/
│ ├── common/ # Shared utilities
│ └── analysis/
├── tests/ # NEW
│ ├── unit/
│ └── integration/
├── outputs/ # All outputs (gitignored)
│ ├── models/
│ ├── logs/
│ └── lime_explanations/
└── ...
Migration Tasks
- Create new directory structure
- Create all init.py files
- Migrate anomaly-detection → src/anomaly_detection
- Migrate classification → src/classification
- Create federated_learning module structure
- Create data utilities module
- Create common utilities module
- Move outputs to outputs/ directory
- Update ALL import paths throughout codebase
- Create setup.py / pyproject.toml
- Test that everything still works
Breaking Changes
This will change all import paths:
# OLD
from anomaly-detection.train_autoencoder import train
# NEW
from src.anomaly_detection.training.train import train_autoencoderRelated
- Part of MODERNIZATION_ROADMAP.md Phase 1.2
- Blocks Directory Restructuring - Modern src/ Layout #26 (Dependency Modernization)
- Related to Modernization Roadmap for main branch #17 (Modernization Roadmap)
Priority
HIGH - Required before most other modernization work
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmodernizationModernizing code, dependencies, and structureModernizing code, dependencies, and structurerefactorCode refactoring and reorganizationCode refactoring and reorganization