Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,36 @@ We welcome contributions via:
- ✅ **Update Documentation:** If your change affects functionality or usage, update relevant documentation.
- ✅ **Confirm Licensing:** By submitting a PR, you agree to license your contribution under the project's license.

## Formatting, linting and testing requirements

1. Build the project and verify internal links:

```bash
npm run build
```

2. Run formatting, linting, and type‑checking:

```bash
npm run format && npm run lint && npm run typecheck
```

3. Validate external links using [lychee](https://github.com/lycheeverse/lychee):

```bash
lychee --config lychee.toml .
```

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.
See the example’s `README.md` for more instructions, e.g.:

```bash
cd examples/developer-hub-rust/
cargo build
cargo fmt && cargo clippy --fix
cargo test
```

## Diagrams Style Guide

For consistency, follow these styles when creating or updating diagrams:
Expand Down
8 changes: 8 additions & 0 deletions automations/check_new_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ def prettify_coin(coin: dict[str, Any]) -> str:
)


def parse_volume(vol_str: str) -> int:
"""Parse volume string and return it as an integer."""
if not vol_str[0] == "$":
raise ValueError(f"Invalid volume string: {vol_str}")
return int(vol_str.strip("$").replace(",", ""))


def write_issue(coins: list[dict[str, Any]]) -> None:
"""Write the Markdown issue file."""
body = ["Coins matching criteria:\n"]
Expand Down Expand Up @@ -169,6 +176,7 @@ def main() -> None:
c["item"]
for c in trending
if c["item"].get("market_cap_rank", float("inf")) < MAX_MARKET_CAP_RANK
and parse_volume(c["item"]["data"]["total_volume"]) > 100_000_000
and c["item"]["symbol"] not in current_feeds
]
if not candidates:
Expand Down