Skip to content

Commit 91d5849

Browse files
Rick7264tosoham
authored andcommitted
chore: setup project structure with Poetry, dependencies, and pre-commit hooks
1 parent b9c3098 commit 91d5849

16 files changed

Lines changed: 923 additions & 78 deletions

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 25.1.0
4+
hooks:
5+
- id: black
6+
7+
- repo: https://github.com/pre-commit/mirrors-isort
8+
rev: v5.10.1
9+
hooks:
10+
- id: isort

app/__init__.py

Whitespace-only changes.

app/api/__init__.py

Whitespace-only changes.

app/api/routes.py

Whitespace-only changes.

app/models/__init__.py

Whitespace-only changes.

app/models/base.py

Whitespace-only changes.

app/services/__init__.py

Whitespace-only changes.

app/services/base.py

Whitespace-only changes.

client/fetch_data.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import os
21
import json
2+
import os
3+
34
import requests
45

56
YIELD_API_URL = "https://yields.llama.fi/pools"
@@ -10,6 +11,7 @@
1011

1112
os.makedirs(YIELD_DIR, exist_ok=True)
1213

14+
1315
def save_json(data, filepath):
1416
try:
1517
with open(filepath, "w") as file:
@@ -18,6 +20,7 @@ def save_json(data, filepath):
1820
except IOError as e:
1921
print(f"❌ Error saving {filepath}: {e}")
2022

23+
2124
def fetch_yield_data():
2225

2326
try:
@@ -39,6 +42,7 @@ def fetch_yield_data():
3942
except (requests.exceptions.RequestException, IOError, json.JSONDecodeError) as e:
4043
print(f"❌ Error fetching yield data: {e}")
4144

45+
4246
def fetch_token_data():
4347
try:
4448
response = requests.get(TOKEN_API_URL, timeout=10)
@@ -51,5 +55,6 @@ def fetch_token_data():
5155
except (requests.exceptions.RequestException, IOError, json.JSONDecodeError) as e:
5256
print(f"❌ Error fetching token data: {e}")
5357

58+
5459
fetch_yield_data()
5560
fetch_token_data()

poetry.lock

Lines changed: 786 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)