Clean up unused files, organize structure, update docs
- Delete obsolete files: data_fetcher_old.py, market_old.py, base_strategy.py (root), strategy_sma_cross.py, and old architecture remnants (address_monitor.py, position_monitor.py, trade_log.py, wallet_data.py, whale_tracker.py) - Delete zero-byte Docker artifacts and runtime files (clp_hedger.log, clp_hedger/hedge_status.json) - Move one-off utility scripts to scripts/ directory - Move example/template files to .temp/ directory - Update .gitignore: add entries for clp_hedger.log, clp_hedger/hedge_status.json, Docker layer hash files, Using, Running, and backups/ - Update .dockerignore: add clp_hedger.log, clp_hedger/hedge_status.json, backups/ - Create example config files: _data/strategies.json.example, _data/backtesting_conf.json.example, _data/coin_precision.json.example - Update GEMINI.md: remove outdated session summaries and duplicate review section - Update review.md: add cleanup status section, update remaining recommendations - Update MIGRATION_PLAN.md: mark completed phases, update file references - Update DOCKER_MIGRATION_GUIDE.md: update import_csv.py path reference
This commit is contained in:
90
review.md
90
review.md
@ -8,7 +8,56 @@ The following sections detail recommendations for improving configuration manage
|
||||
|
||||
---
|
||||
|
||||
## Proposed Code Changes
|
||||
## Cleanup Status
|
||||
|
||||
The following cleanup actions have been completed:
|
||||
|
||||
### Deleted (Obsolete / Old Versions):
|
||||
- `data_fetcher_old.py`
|
||||
- `market_old.py`
|
||||
- `base_strategy.py` (root; `strategies/base_strategy.py` is used)
|
||||
- `strategy_sma_cross.py` (standalone old version; `strategies/ma_cross_strategy.py` is used)
|
||||
|
||||
### Deleted (Old Architecture Remnants):
|
||||
- `address_monitor.py`
|
||||
- `position_monitor.py`
|
||||
- `trade_log.py`
|
||||
- `wallet_data.py`
|
||||
- `whale_tracker.py`
|
||||
|
||||
### Deleted (Zero-byte Docker Artifacts):
|
||||
- `1a749d1ce7c2`, `37e7cf58e0c3`, `466c0182639b`, `65740cddd0af`, `6d00d75e1dce`, `851f9bf4c3cc`, `9dd58c972c63`, `d1611986dd76`, `d22d67dc5558`
|
||||
- `Running`, `Using`
|
||||
|
||||
### Deleted (Runtime Artifacts):
|
||||
- `clp_hedger.log`
|
||||
- `clp_hedger/hedge_status.json`
|
||||
|
||||
### Moved to `scripts/`:
|
||||
- `!migrate_to_sqlite.py` → `scripts/migrate_to_sqlite.py`
|
||||
- `import_csv.py` → `scripts/import_csv.py`
|
||||
- `del_market_cap_tables.py` → `scripts/del_market_cap_tables.py`
|
||||
- `fix_timestamps.py` → `scripts/fix_timestamps.py`
|
||||
- `list_coins.py` → `scripts/list_coins.py`
|
||||
- `create_agent.py` → `scripts/create_agent.py`
|
||||
- `check_wtioil.py` → `scripts/check_wtioil.py`
|
||||
|
||||
### Moved to `.temp/`:
|
||||
- `strategy_template.py` → `.temp/strategy_template.py`
|
||||
- `basic_ws.py` → `.temp/basic_ws.py`
|
||||
- `backtester.py` → `.temp/backtester.py`
|
||||
|
||||
### `.gitignore` Updated:
|
||||
- Added entries for `clp_hedger.log`, `clp_hedger/hedge_status.json`, `Using`, `Running`, and Docker layer hash files (`/[0-9a-f]{12}`)
|
||||
|
||||
### Example Config Files Created:
|
||||
- `_data/strategies.json.example`
|
||||
- `_data/backtesting_conf.json.example`
|
||||
- `_data/coin_precision.json.example`
|
||||
|
||||
---
|
||||
|
||||
## Remaining Proposed Code Changes
|
||||
|
||||
### 1. Centralize Configuration
|
||||
|
||||
@ -29,9 +78,8 @@ The following sections detail recommendations for improving configuration manage
|
||||
|
||||
### 3. Improve Project Structure
|
||||
|
||||
- **Issue:** The root directory is cluttered with numerous Python scripts, making it difficult to distinguish between core application files, utility scripts, and old/example files.
|
||||
- **Issue:** The root directory is still somewhat cluttered with Python scripts.
|
||||
- **Proposal:**
|
||||
- Create a `scripts/` directory and move all one-off utility and maintenance scripts into it.
|
||||
- Consider creating a `src/` or `app/` directory to house the core application source code (`main_app.py`, `trade_executor.py`, etc.), separating it clearly from configuration, data, and documentation.
|
||||
- **Benefit:** A cleaner, more organized project structure that is easier for new developers to understand.
|
||||
|
||||
@ -41,39 +89,3 @@ The following sections detail recommendations for improving configuration manage
|
||||
- **Proposal:**
|
||||
- Explicitly define the agent names and their corresponding environment variable keys in the proposed `_data/config.json` file. The `trade_executor` would then load only the agents specified in the configuration.
|
||||
- **Benefit:** Makes agent configuration more explicit and less prone to errors from stray environment variables.
|
||||
|
||||
---
|
||||
|
||||
## Identified Unused/Utility Files
|
||||
|
||||
The following files were identified as likely being unused by the core application, being obsolete, or serving as one-off utilities. It is recommended to **move them to a `scripts/` directory** or **delete them** if they are obsolete.
|
||||
|
||||
### Obsolete / Old Versions:
|
||||
- `data_fetcher_old.py`
|
||||
- `market_old.py`
|
||||
- `base_strategy.py` (The one in the root directory; the one in `strategies/` is used).
|
||||
|
||||
### One-Off Utility Scripts (Recommend moving to `scripts/`):
|
||||
- `!migrate_to_sqlite.py`
|
||||
- `import_csv.py`
|
||||
- `del_market_cap_tables.py`
|
||||
- `fix_timestamps.py`
|
||||
- `list_coins.py`
|
||||
- `create_agent.py`
|
||||
|
||||
### Examples / Unused Code:
|
||||
- `basic_ws.py` (Appears to be an example file).
|
||||
- `backtester.py`
|
||||
- `strategy_sma_cross.py` (A strategy file in the root, not in the `strategies` folder).
|
||||
- `strategy_template.py`
|
||||
|
||||
### Standalone / Potentially Unused Core Files:
|
||||
The following files seem to have their logic already integrated into the main multi-process application. They might be remnants of a previous architecture and may not be needed as standalone scripts.
|
||||
- `address_monitor.py`
|
||||
- `position_monitor.py`
|
||||
- `trade_log.py`
|
||||
- `wallet_data.py`
|
||||
- `whale_tracker.py`
|
||||
|
||||
### Data / Log Files (Recommend archiving or deleting):
|
||||
- `hyperliquid_wallet_data_*.json` (These appear to be backups or logs).
|
||||
|
||||
Reference in New Issue
Block a user