eprbell / dali-rp2

DaLI (Data Loader Interface) is a data loader and input generator for RP2 (https://pypi.org/project/rp2), the privacy-focused, free, open-source cryptocurrency tax calculator: DaLI removes the need to manually prepare RP2 input files. Just like RP2, DaLI is also free, open-source and it prioritizes user privacy.
https://pypi.org/project/dali-rp2/
Apache License 2.0
65 stars 42 forks source link

fixing typo in bobausd to bobausdt for alternate exchanges ccxt #162

Closed topherbuckley closed 1 year ago

topherbuckley commented 1 year ago

As per issue 159

topherbuckley commented 1 year ago

Does this happen often? It looks like the failed test has nothing to do with my commit, but just some overuse of an API. It looks like there are a few timing hacks in some of the code I've seen so far. What is your standard practice for this? Just re-run the test later, or try to write in some more sleep/wait hacks?

=================================== FAILURES ===================================
_____________________ TestCcxtPlugin.test_unknown_exchange _____________________
Traceback (most recent call last):
  File "/home/runner/work/dali-rp2/dali-rp2/tests/test_plugin_ccxt.py", line 174, in test_unknown_exchange
    data = plugin.get_historic_bar_from_native_source(BAR_TIMESTAMP, "BTC", "USD", "Bogus Exchange")
  File "/home/runner/work/dali-rp2/dali-rp2/src/dali/plugin/pair_converter/ccxt.py", line 221, in get_historic_bar_from_native_source
    if self._is_fiat_pair(from_asset, to_asset):
  File "/home/runner/work/dali-rp2/dali-rp2/src/dali/abstract_pair_converter_plugin.py", line 257, in _is_fiat_pair
    return self._is_fiat(from_asset) and self._is_fiat(to_asset)
  File "/home/runner/work/dali-rp2/dali-rp2/src/dali/abstract_pair_converter_plugin.py", line 261, in _is_fiat
    self._build_fiat_list()
  File "/home/runner/work/dali-rp2/dali-rp2/src/dali/abstract_pair_converter_plugin.py", line 228, in _build_fiat_list
    response.raise_for_status()
  File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://api.exchangerate.host/symbols
------------------------------ Captured log call -------------------------------
DEBUG    CCXT-converter/high:ccxt.py:197 Default exchange assigned as Kraken. _DEFAULT_EXCHANGE is Kraken
DEBUG    CCXT-converter/high:ccxt.py:218 Converting BTC to USD
=========================== short test summary info ============================
FAILED tests/test_plugin_ccxt.py::TestCcxtPlugin::test_unknown_exchange - requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://api.exchangerate.host/symbols
======================== 1 failed, 60 passed in 14.75s =========================
Error: Process completed with exit code 1.
macanudo527 commented 1 year ago

It can, we are trying to find another provider for fiat prices, but this one is free and sort of works.

topherbuckley commented 1 year ago

It can, we are trying to find another provider for fiat prices, but this one is free and sort of works.

I see. No worries. Should I do something to rerun the tests, or just leave this as is?

macanudo527 commented 1 year ago

It can, we are trying to find another provider for fiat prices, but this one is free and sort of works.

I see. No worries. Should I do something to rerun the tests, or just leave this as is?

Only those with write permissions can rerun them I think. I meant to re-run everything, but it looks like it just ran the one test. They are running now, though.