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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Contributors add user-facing entries under `[Unreleased]` in the same PR. Mainta

### Fixed
- **`novelty_extractor`**: Bundle tests mock fastembed embeddings so CI avoids HuggingFace downloads and rate limits (#159 follow-up).
- **`finance/wallet_screening`**: `WalletScreeningSkill.manifest` loads `manifest.yaml` from the bundle directory (#165).

### Changed
- **CI**: GitHub Actions runs `pytest skills/` then `pytest tests/` after lint (bundle + framework/maintainer tests; closes #90) (#159).
Expand Down
2 changes: 1 addition & 1 deletion skills/finance/wallet_screening/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: wallet_screening
name: finance/wallet_screening
version: 1.0.0
description: |
A comprehensive crypto wallet screening tool. Checks Ethereum addresses against sanctions lists (OFAC, FBI, etc.) and known malicious contracts (Mixers, Scams). analyze transaction history for risk.
Expand Down
5 changes: 5 additions & 0 deletions skills/finance/wallet_screening/skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import re
import requests
import glob
import yaml
from typing import Any, Dict, List, Optional
from datetime import datetime
from skillware.core.base_skill import BaseSkill
Expand Down Expand Up @@ -44,6 +45,10 @@ def __init__(self, config: Optional[Dict[str, Any]] = None):

@property
def manifest(self) -> Dict[str, Any]:
manifest_path = os.path.join(os.path.dirname(__file__), "manifest.yaml")
if os.path.exists(manifest_path):
with open(manifest_path, "r", encoding="utf-8") as f:
return yaml.safe_load(f)
return {}

def execute(self, params: Dict[str, Any]) -> Dict[str, Any]:
Expand Down
7 changes: 4 additions & 3 deletions skills/finance/wallet_screening/test_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ def manifest():
return yaml.safe_load(f)


def test_manifest_schema(manifest):
assert manifest["name"] == "wallet_screening"
assert "address" in manifest["parameters"]["properties"]
def test_skill_manifest_consistency(skill, manifest):
skill_manifest = skill.manifest
assert skill_manifest["name"] == manifest["name"]
assert skill_manifest["version"] == manifest["version"]


def test_invalid_address(skill):
Expand Down
10 changes: 10 additions & 0 deletions tests/skills/finance/test_wallet_screening.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from unittest.mock import patch, MagicMock

from skillware.core.loader import SkillLoader


Expand All @@ -8,6 +9,15 @@ def get_skill():
return bundle["module"].WalletScreeningSkill()


def test_wallet_screening_manifest():
bundle = SkillLoader.load_skill("finance/wallet_screening")
skill = bundle["module"].WalletScreeningSkill()
manifest = bundle["manifest"]
assert skill.manifest["name"] == manifest["name"]
assert skill.manifest["version"] == manifest["version"]
assert skill.manifest["issuer"] == manifest["issuer"]


@patch("skills.finance.wallet_screening.skill.requests.get")
def test_wallet_screening_success(mock_get):
skill = get_skill()
Expand Down
Loading