Skip to content

Commit

Permalink
Fix some typos and add a TODO.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirEven committed Nov 2, 2024
1 parent 529c99b commit 98992a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Appart from that it is a tool for anybody who needs historic and current candle
## Contribute
To contribute, just make pull requests on main.

There are COLLABORATION markers throughout the test suite to mark and explain places that are relevant for new implementations. The general idea is to not require new implementations to come up with their unit and/or integration tests, but rather include their mock and production implementations through parametrization and fixtures in the existing test suite. This has the advantage of not having to write tests again and again but also enforces the behavior of new implemntations to be identical to existing ones.
There are COLLABORATION markers throughout the test suite to mark and explain places that are relevant for new implementations. The general idea is to not require new implementations to come up with their unit and/or integration tests, but rather include their mock and production implementations through parametrization and fixtures in the existing test suite. This has the advantage of not having to write tests again and again but also enforces the behavior of new implementations to be identical to existing ones.

For example if we implement a new candle fetcher for the 1inch API, it can be implemented in what ever way is best - but it should behave exactly the same as the existing dydx implementations, which is enforced by the typing annotations and then verified by the parametrized test suite.

Of course if new test cases are arise, they most certainly should be implemented for all existing implementations as well or at least deserve their own test file per exchange implementation.
Of course if new test cases arise, they most certainly should be implemented for all existing implementations as well or at least deserve their own test file per exchange implementation.
1 change: 1 addition & 0 deletions tests/candle_fetcher/test_candle_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ async def test_fetch_cluster_prints_missing_candles_correctly(
assert out.count("❌ Candle missing:") == n_missing


# TODO: TDD approach to (in integration though) for when fetcher hits candle horizon of exchange. This is currently being researched in autogluon spike...
@pytest.mark.parametrize("candle_fetcher_mock", list(mocked_candle_fetchers.keys()))
@pytest.mark.asyncio
async def test_fetch_cluster_prints_missing_candles_on_batch_newest_edge_correctly(
Expand Down

0 comments on commit 98992a6

Please sign in to comment.