Skip to content

Commit 2be9de5

Browse files
committed
Cleaning all over the codebase to remove orphans variables and old documentation.
1 parent 25480c0 commit 2be9de5

File tree

13 files changed

+35
-432
lines changed

13 files changed

+35
-432
lines changed

AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
| **Tutorial & CLI usage** | [docs/TUTORIAL.md](docs/TUTORIAL.md) |
1414
| **CryptoCompare API details** | [docs/DATA_SOURCES.md](docs/DATA_SOURCES.md) |
1515
| **TOTAL2/TOTAL2b calculation** | [docs/TOTAL2_CALCULATION.md](docs/TOTAL2_CALCULATION.md) |
16-
| **Edge cases & solutions** | [docs/EDGE_CASES.md](docs/EDGE_CASES.md) |
1716
| **Deployment (GitHub Pages)** | [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) |
1817

1918
---

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ poetry run python -m main status
4545

4646
### 📋 References
4747
- **[AI Agent Context](AGENTS.md)** - Full project specification for AI agents and developers
48-
- **[Data Sources](docs/DATA_SOURCES.md)** - CryptoCompare API details, rate limits, caching
48+
- **[Data Sources](docs/DATA_SOURCES.md)** - CryptoCompare API details, rate limits, caching, data pipeline
4949
- **[TOTAL2 Calculation](docs/TOTAL2_CALCULATION.md)** - How the TOTAL2 market index is calculated
5050
- **[Deployment](docs/DEPLOYMENT.md)** - Charts generation and GitHub Pages deployment workflow
5151
- **[Changelog](CHANGELOG.md)** - Version history and release notes

docs/DATA_SOURCES.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Halvix uses **CryptoCompare** as its single data source:
1515
| **Top coins by market cap** | `/data/top/mktcapfull` endpoint |
1616
| **Historical prices** | `/data/v2/histoday` endpoint |
1717
| **Volume data** | Included in historical data for TOTAL2 weighting |
18-
| **Rate limit** | 10 calls/second (free tier) |
18+
| **Rate limit** | Free tier: 10/sec; Halvix uses conservative 2/sec (120/min) |
1919
| **Historical depth** | **Unlimited** - full history available |
2020

2121
This single-source approach provides:
@@ -41,15 +41,17 @@ This single-source approach provides:
4141

4242
| Tier | Rate Limit | Notes |
4343
|------|------------|-------|
44-
| **Free** | 10 calls/second | No API key required |
44+
| **Free** | 10 calls/second (600/min) | No API key required |
45+
| **Halvix default** | 2 calls/second (120/min) | Conservative to avoid issues |
4546
| Professional | 50 calls/second | Paid |
4647
| Enterprise | Custom | Contact sales |
4748

4849
### Halvix Configuration
4950

5051
```python
5152
# src/config.py
52-
CRYPTOCOMPARE_API_CALLS_PER_MINUTE = 30 # Conservative (could go to 600)
53+
# Free tier allows 10/sec (600/min), we use conservative 2/sec (120/min)
54+
CRYPTOCOMPARE_API_CALLS_PER_MINUTE = 120
5355
CRYPTOCOMPARE_MAX_DAYS_PER_REQUEST = 2000 # Max days per request
5456
```
5557

@@ -272,13 +274,17 @@ All API settings are in `src/config.py`:
272274
# CryptoCompare
273275
CRYPTOCOMPARE_BASE_URL = "https://min-api.cryptocompare.com"
274276
CRYPTOCOMPARE_COIN_URL = "https://www.cryptocompare.com/coins"
275-
CRYPTOCOMPARE_API_CALLS_PER_MINUTE = 30 # Very conservative
277+
# Free tier allows 10/sec (600/min), we use conservative 2/sec (120/min)
278+
CRYPTOCOMPARE_API_CALLS_PER_MINUTE = 120
276279
CRYPTOCOMPARE_MAX_DAYS_PER_REQUEST = 2000 # Days per request
277280

278281
# Retry configuration
279282
API_MAX_RETRIES = 5
280283
API_RETRY_MIN_WAIT = 1 # seconds
281284
API_RETRY_MAX_WAIT = 60 # seconds
285+
286+
# Data completeness - this is a fixed constant ensuring only complete daily data is fetched
287+
USE_YESTERDAY_AS_END_DATE = True
282288
```
283289

284290
---

docs/EDGE_CASES.md

Lines changed: 0 additions & 213 deletions
This file was deleted.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ python = "^3.13"
1919
pandas = "^2.1"
2020
numpy = "^2.0"
2121
plotly = "^5.18"
22-
scipy = "^1.14"
2322
requests = "^2.31"
2423
tqdm = "^4.65"
2524
pyarrow = "^18.0"

src/analysis/filters.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ def __init__(self):
7171
re.compile(pattern, re.IGNORECASE) for pattern in EXCLUDED_PATTERNS
7272
]
7373

74-
# Property for backwards compatibility
75-
@property
76-
def filtered_tokens(self) -> list[SkippedCoin]:
77-
"""Backwards compatibility alias for skipped_coins."""
78-
return self.skipped_coins
79-
8074
def reset(self):
8175
"""Clear the skipped coins list."""
8276
self.skipped_coins = []
@@ -279,16 +273,6 @@ def should_skip_download(
279273

280274
return (False, "")
281275

282-
# Backwards compatibility alias
283-
def should_exclude_from_download(
284-
self,
285-
coin_id: str,
286-
name: str = "",
287-
symbol: str = "",
288-
) -> tuple[bool, str]:
289-
"""Backwards compatibility alias for should_skip_download."""
290-
return self.should_skip_download(coin_id, name, symbol)
291-
292276
def should_exclude_from_total2(
293277
self,
294278
coin_id: str,
@@ -377,15 +361,6 @@ def get_coins_to_download(
377361

378362
return to_download
379363

380-
# Backwards compatibility alias
381-
def filter_coins_for_download(
382-
self,
383-
coins: list[dict],
384-
record_filtered: bool = True,
385-
) -> list[dict]:
386-
"""Backwards compatibility alias for get_coins_to_download."""
387-
return self.get_coins_to_download(coins, record_skipped=record_filtered)
388-
389364
def filter_coins_for_total2(
390365
self,
391366
coins: list[dict],
@@ -440,11 +415,6 @@ def export_skipped_coins_csv(self, filepath: Path | None = None) -> Path:
440415

441416
return filepath
442417

443-
# Backwards compatibility alias
444-
def export_rejected_coins_csv(self, filepath: Path | None = None) -> Path:
445-
"""Backwards compatibility alias for export_skipped_coins_csv."""
446-
return self.export_skipped_coins_csv(filepath)
447-
448418
def get_skipped_summary(self) -> dict:
449419
"""
450420
Get a summary of skipped coins by reason.
@@ -457,8 +427,3 @@ def get_skipped_summary(self) -> dict:
457427
reason = coin.reason
458428
summary[reason] = summary.get(reason, 0) + 1
459429
return summary
460-
461-
# Backwards compatibility alias
462-
def get_filtered_summary(self) -> dict:
463-
"""Backwards compatibility alias for get_skipped_summary."""
464-
return self.get_skipped_summary()

0 commit comments

Comments
 (0)