chore: smoke test fixes and code quality improvements (#88)
* fix: replace deprecated datetime.utcnow() and websockets.legacy APIs - Replace datetime.utcnow() with datetime.now(UTC) in Orderbook model - Use websockets.asyncio.client.connect instead of legacy websockets.connect - Import ConnectionClosed from websockets.exceptions directly - Update test mocks to patch the new import paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve ruff lint errors in alembic migration - Replace typing.Union with X | Y syntax (UP007) - Import Sequence from collections.abc instead of typing (UP035) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: remove deprecated version key from docker-compose.yml The top-level 'version' key is obsolete in modern Docker Compose and produces a warning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: fix README to match actual project structure and tooling - Replace pip commands with uv equivalents - Fix run command from 'python -m src.main' to 'python -m polymarket_insider_tracker' - Update project structure tree to reflect actual src/polymarket_insider_tracker/ layout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
7c494c38a6
commit
232680a760
@@ -126,13 +126,13 @@ docker compose up -d
|
||||
docker compose ps
|
||||
|
||||
# Install Python dependencies
|
||||
pip install -e .
|
||||
uv sync --all-extras
|
||||
|
||||
# Run database migrations
|
||||
alembic upgrade head
|
||||
uv run alembic upgrade head
|
||||
|
||||
# Run the tracker
|
||||
python -m src.main
|
||||
uv run python -m polymarket_insider_tracker
|
||||
```
|
||||
|
||||
### Docker Services
|
||||
@@ -188,24 +188,16 @@ LIQUIDITY_IMPACT_THRESHOLD=0.02
|
||||
```
|
||||
polymarket-insider-tracker/
|
||||
├── src/
|
||||
│ ├── ingestor/ # Real-time market data ingestion
|
||||
│ │ ├── clob_client.py # Polymarket CLOB API wrapper
|
||||
│ │ └── websocket.py # WebSocket event handler
|
||||
│ ├── profiler/ # Wallet analysis
|
||||
│ │ ├── analyzer.py # Core wallet profiling logic
|
||||
│ │ ├── chain.py # Polygon blockchain client
|
||||
│ │ └── funding.py # Funding chain tracer
|
||||
│ ├── detector/ # Anomaly detection engines
|
||||
│ │ ├── fresh_wallet.py
|
||||
│ │ ├── size_anomaly.py
|
||||
│ │ ├── sniper.py # DBSCAN clustering
|
||||
│ │ └── scorer.py # Composite risk scoring
|
||||
│ ├── alerter/ # Notification dispatch
|
||||
│ │ ├── formatter.py # Alert message formatting
|
||||
│ │ └── dispatcher.py # Multi-channel delivery
|
||||
│ └── storage/ # Persistence layer
|
||||
│ ├── models.py # SQLAlchemy models
|
||||
│ └── repos.py # Repository pattern
|
||||
│ └── polymarket_insider_tracker/
|
||||
│ ├── __main__.py # CLI entry point
|
||||
│ ├── pipeline.py # Core detection pipeline
|
||||
│ ├── ingestor/ # Real-time market data ingestion
|
||||
│ │ ├── clob_client.py # Polymarket CLOB API wrapper
|
||||
│ │ └── websocket.py # WebSocket event handler
|
||||
│ ├── profiler/ # Wallet analysis
|
||||
│ ├── detector/ # Anomaly detection engines
|
||||
│ ├── alerter/ # Notification dispatch
|
||||
│ └── storage/ # Persistence layer
|
||||
├── tests/ # Test suite
|
||||
├── scripts/
|
||||
│ └── backtest.py # Historical analysis
|
||||
@@ -289,16 +281,16 @@ Contributions are welcome! Please read our Contributing Guide before submitting
|
||||
|
||||
```bash
|
||||
# Install dev dependencies
|
||||
pip install -e ".[dev]"
|
||||
uv sync --all-extras
|
||||
|
||||
# Run tests
|
||||
pytest
|
||||
uv run pytest
|
||||
|
||||
# Run linting
|
||||
ruff check src/
|
||||
uv run ruff check src/
|
||||
|
||||
# Run type checking
|
||||
mypy src/
|
||||
uv run mypy src/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user