Skip to content

Commit c1023b8

Browse files
Dev (#5)
* edits and test attempts * flexing with tests * refactor(tests): update private API tests and pytest config - Refactor private API tests to use manual server/client creation - Add proper cleanup with try/finally blocks - Ensure server is closed after each test - Set explicit asyncio_default_fixture_loop_scope in pytest config The changes improve test isolation and follow the integration tests pattern. Each test now creates its own server and client instances, making tests more reliable and easier to debug. The pytest configuration update removes deprecation warning by explicitly setting the event loop scope to "function". * chore(lint): enable Ruff unsafe fixes Enable unsafe fixes in Ruff configuration to allow automatic fixing of docstring formatting and other similar issues. This will help maintain consistent code style with less manual intervention. * remomve unused * ruff check finished * preparation for 1st release * removed private client removed multiexchange changed config for pyright * changes for pyright * edits for starting stdio or sse * claude desktop client not working for now * update packages * chore: update dependencies to latest versions - Updated aiowhitebit from 0.2.3 to 0.2.4 - Updated fastmcp from 2.5.1 to 2.8.1 - Updated pydantic from ~2.11.5 to ~2.11.7 - Updated aiohttp from ~3.12.0 to ~3.12.13 - Updated setuptools from ~80.8.0 to ~80.9.0 - Updated pytest from ~8.3.5 to ~8.4.0 - Updated pytest-cov from 6.1.1 to 6.2.1 - Updated ruff from 0.11.11 to 0.11.13 - Updated pyright from 1.1.401 to 1.1.402 - Fixed docstring linting issue in server.py - All tests passing (40/40) - Version bump to 0.2.6
1 parent d95c094 commit c1023b8

File tree

7 files changed

+34
-37
lines changed

7 files changed

+34
-37
lines changed

pyproject.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "aiowhitebit-mcp"
7-
version = "0.2.5"
7+
version = "0.2.6"
88
description = "MCP server and client for WhiteBit cryptocurrency exchange API"
99
readme = "README.md"
1010
authors = [
@@ -25,20 +25,20 @@ classifiers = [
2525
keywords = ["whitebit", "cryptocurrency", "exchange", "api", "mcp", "claude"]
2626
requires-python = ">=3.10"
2727
dependencies = [
28-
"aiowhitebit==0.2.3",
29-
"fastmcp==2.5.1",
30-
"pydantic>=2.0.0",
31-
"aiohttp>=3.8.0",
28+
"aiowhitebit==0.2.4",
29+
"fastmcp==2.8.1",
30+
"pydantic>=2.11.7",
31+
"aiohttp>=3.12.13",
3232
]
3333

3434
[project.optional-dependencies]
3535
dev = [
36-
"pytest>=7.4.3",
37-
"pytest-asyncio>=0.23.5",
38-
"pytest-cov>=4.1.0",
39-
"ruff>=0.11.5",
40-
"pyright>=1.1.399",
41-
"pre-commit>=3.6.2",
36+
"pytest>=8.4.0",
37+
"pytest-asyncio>=1.0.0",
38+
"pytest-cov>=6.2.1",
39+
"ruff>=0.11.13",
40+
"pyright>=1.1.402",
41+
"pre-commit>=4.2.0",
4242
]
4343

4444
[project.urls]

requirements-dev.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Development dependencies
2-
pytest~=8.3.5
2+
pytest~=8.4.0
33
pytest-asyncio~=1.0.0
4-
pytest-cov==6.1.1
5-
ruff==0.11.11
6-
pyright==1.1.401
4+
pytest-cov==6.2.1
5+
ruff==0.11.13
6+
pyright==1.1.402
77
pre-commit==4.2.0
88

99
# Project dependencies

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
aiowhitebit==0.2.3
2-
fastmcp==2.5.1
1+
aiowhitebit==0.2.4
2+
fastmcp==2.8.1
33

4-
pydantic~=2.11.5
5-
aiohttp~=3.12.0
6-
setuptools~=80.8.0
4+
pydantic~=2.11.7
5+
aiohttp~=3.12.13
6+
setuptools~=80.9.0

setup.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313

1414
# Define development requirements
1515
development_requires = [
16-
"pytest>=7.4.3",
17-
"pytest-asyncio>=0.23.5",
18-
"pytest-cov>=4.1.0",
19-
"ruff>=0.11.5",
20-
"pyright>=1.1.399",
21-
"pre-commit>=3.6.2",
16+
"pytest>=8.4.0",
17+
"pytest-asyncio>=1.0.0",
18+
"pytest-cov>=6.2.1",
19+
"ruff>=0.11.13",
20+
"pyright>=1.1.402",
21+
"pre-commit>=4.2.0",
2222
]
2323

2424
setup(
2525
name="aiowhitebit-mcp",
26-
version="0.2.5",
26+
version="0.2.6",
2727
description="MCP server and client for WhiteBit cryptocurrency exchange API",
2828
long_description=long_description,
2929
long_description_content_type="text/markdown",
@@ -33,10 +33,10 @@
3333
packages=find_packages(where="src"),
3434
package_dir={"": "src"},
3535
install_requires=[
36-
"aiowhitebit==0.2.3",
37-
"fastmcp==2.5.1",
38-
"pydantic>=2.0.0",
39-
"aiohttp>=3.8.0",
36+
"aiowhitebit==0.2.4",
37+
"fastmcp==2.8.1",
38+
"pydantic>=2.11.7",
39+
"aiohttp>=3.12.13",
4040
],
4141
entry_points={
4242
"console_scripts": [

src/aiowhitebit_mcp/client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ async def get_orderbook(self, market: str) -> str:
8181
Args:
8282
market: Market pair (e.g., 'BTC_USDT')
8383
"""
84-
result = await self.client.call_tool(
85-
"get_orderbook", {"market": market}
86-
)
84+
result = await self.client.call_tool("get_orderbook", {"market": market})
8785
return self._extract_text(result)
8886

8987
async def get_recent_trades(self, market: str, trade_type: str = "buy") -> str:

src/aiowhitebit_mcp/server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ async def get_recent_trades(market: MarketPair, trade_type: str = "buy") -> dict
248248
249249
Args:
250250
market: Market pair (e.g., 'BTC_USDT')
251-
:param market:
252-
:param trade_type:
251+
trade_type: Type of trades to retrieve ('buy' or 'sell')
253252
"""
254253
result = await self.public_v4.get_recent_trades(market.market, trade_type)
255254
return {"trades": list(result)} # Convert RecentTrades to a regular list and wrap in dict

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pytest
77

88
from aiowhitebit_mcp.client import WhiteBitMCPClient
9-
from aiowhitebit_mcp.server import create_server, MarketPair
9+
from aiowhitebit_mcp.server import MarketPair, create_server
1010

1111
# Set up logging
1212
logging.basicConfig(level=logging.INFO)

0 commit comments

Comments
 (0)