Skip to content

Commit

Permalink
PLAT-688: Fix tagging endpoints
Browse files Browse the repository at this point in the history
This MR fixes the incorrect URLs being passed to the API for tagging endpoints. See https://coinmetrics.slack.com/archives/C02FG4L7GJ0/p1704829669656489

https://coinmetrics.atlassian.net/browse/PLAT-688
  • Loading branch information
victoreram authored and Dalen Kambur committed Jan 12, 2024
1 parent 7448201 commit 283b014
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build-test-push-image:
- docker build --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --build-arg CM_API_KEY=$CM_API_KEY .
- docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m mypy -p coinmetrics -p test --install-types --non-interactive
- docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m flake8 coinmetrics
- docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m pytest -n auto test --ignore test/test_data_exporter.py --ignore test/test_rate_limits.py
- docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m pytest -n auto --timeout=60 test --ignore test/test_data_exporter.py --ignore test/test_rate_limits.py
- docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m pytest test/test_rate_limits.py
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apt-get update && \

RUN pip install --upgrade pip

RUN pip install "poetry==1.5.0" pytest-xdist
RUN pip install "poetry==1.5.0" pytest-timeout pytest-xdist
COPY pyproject.toml ./poetry.lock ./
RUN poetry config virtualenvs.create false

Expand Down
4 changes: 2 additions & 2 deletions coinmetrics/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7263,7 +7263,7 @@ def blockchain_metadata_tags(
"page_size": page_size,
"next_page_token": next_page_token,
}
return DataCollection(self._get_data, "/blockchain-metadata/tags", params)
return DataCollection(self._get_data, "blockchain-metadata/tags", params)

def blockchain_metadata_tagged_entities(
self,
Expand Down Expand Up @@ -7295,7 +7295,7 @@ def blockchain_metadata_tagged_entities(
"page_size": page_size,
"next_page_token": next_page_token,
}
return DataCollection(self._get_data, "/blockchain-metadata/tagged-entities", params)
return DataCollection(self._get_data, "blockchain-metadata/tagged-entities", params)

def _get_data(self, url: str, params: Dict[str, Any]) -> DataReturnType:
if params:
Expand Down
6 changes: 2 additions & 4 deletions test/test_websocket_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,17 @@ def test_get_asset_quotes_stream() -> None:
stream = client.get_stream_asset_quotes(assets="btc")
stream.run(on_message=on_message_assets_quotes_test)


@pytest.mark.skipif(not cm_api_key_set, reason=REASON_TO_SKIP)
def test_get_market_liquidations() -> None:
stream = client.get_stream_market_liquidations(markets='binance-BTCBUSD-future')
stream = client.get_stream_market_liquidations(markets='binance-LEVERUSDT-future')
stream.run(on_message=on_message_market_liquidations_test)


@pytest.mark.skipif(not cm_api_key_set, reason=REASON_TO_SKIP)
def test_get_market_openinterest() -> None:
stream = client.get_stream_market_open_interest(markets='binance-BTCBUSD-future')
stream = client.get_stream_market_open_interest(markets='binance-LEVERUSDT-future')
stream.run(on_message=on_message_market_openinterest)


@pytest.mark.skipif(not cm_api_key_set, reason=REASON_TO_SKIP)
def test_on_close() -> None:
on_close_ran = False
Expand Down

0 comments on commit 283b014

Please sign in to comment.