Skip to content

Commit 1f261e4

Browse files
authored
fix(check-feeds): improve volume filtering (#783)
2 parents b7a6c13 + 38bb806 commit 1f261e4

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,36 @@ We welcome contributions via:
6363
- ✅ **Update Documentation:** If your change affects functionality or usage, update relevant documentation.
6464
- ✅ **Confirm Licensing:** By submitting a PR, you agree to license your contribution under the project's license.
6565
66+
## Formatting, linting and testing requirements
67+
68+
1. Build the project and verify internal links:
69+
70+
```bash
71+
npm run build
72+
```
73+
74+
2. Run formatting, linting, and type‑checking:
75+
76+
```bash
77+
npm run format && npm run lint && npm run typecheck
78+
```
79+
80+
3. Validate external links using [lychee](https://github.com/lycheeverse/lychee):
81+
82+
```bash
83+
lychee --config lychee.toml .
84+
```
85+
86+
4. (Optional) If you’ve added or modified scripts under any `examples/developer-hub-*/` directory, navigate into that example’s folder and run its formatter and test suite.
87+
See the example’s `README.md` for more instructions, e.g.:
88+
89+
```bash
90+
cd examples/developer-hub-rust/
91+
cargo build
92+
cargo fmt && cargo clippy --fix
93+
cargo test
94+
```
95+
6696
## Diagrams Style Guide
6797
6898
For consistency, follow these styles when creating or updating diagrams:

automations/check_new_feed.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ def prettify_coin(coin: dict[str, Any]) -> str:
131131
)
132132

133133

134+
def parse_volume(vol_str: str) -> int:
135+
"""Parse volume string and return it as an integer."""
136+
if not vol_str[0] == "$":
137+
raise ValueError(f"Invalid volume string: {vol_str}")
138+
return int(vol_str.strip("$").replace(",", ""))
139+
140+
134141
def write_issue(coins: list[dict[str, Any]]) -> None:
135142
"""Write the Markdown issue file."""
136143
body = ["Coins matching criteria:\n"]
@@ -169,6 +176,7 @@ def main() -> None:
169176
c["item"]
170177
for c in trending
171178
if c["item"].get("market_cap_rank", float("inf")) < MAX_MARKET_CAP_RANK
179+
and parse_volume(c["item"]["data"]["total_volume"]) > 100_000_000
172180
and c["item"]["symbol"] not in current_feeds
173181
]
174182
if not candidates:

0 commit comments

Comments
 (0)