Skip to content

Commit

Permalink
Remove deprecated Asset Prices API support (#84)
Browse files Browse the repository at this point in the history
* Remove deprecated Asset Prices API support

* Update spicepy/_http.py

Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech>

---------

Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech>
  • Loading branch information
lukekim and phillipleblanc authored Apr 22, 2024
1 parent a5e98c6 commit 52b55f4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 100 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Contributing to spicepy
# Contributing to spicepy

### Developing
## Developing

The development branch is `trunk`. This is the branch that all pull
requests should be made against.
Expand All @@ -13,15 +13,15 @@ To develop locally:

2. Create a new branch:

```
```bash
git checkout -b MY_BRANCH_NAME
```

3. Install a recent version of Python (3.8+)

4. Install the dependencies with:

```
```bash
# Run this command in the root of the repository
pip install -e .
```
Expand All @@ -34,6 +34,6 @@ To develop locally:

5. Run the tests with:

```
```bash
API_KEY="<Spice.ai API Key>" make test
```
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 Spice AI, Inc.
Copyright 2022-2024 Spice AI, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
5 changes: 0 additions & 5 deletions spicepy/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import certifi
from pyarrow._flight import FlightCallOptions, FlightClient, Ticket # pylint: disable=E0611
from .prices import PriceCollection
from ._http import HttpRequests
from .error import SpiceAIError
from . import config
Expand Down Expand Up @@ -150,10 +149,6 @@ def query(self, query: str, **kwargs) -> flight.FlightStreamReader:
def fire_query(self, query: str, **kwargs) -> flight.FlightStreamReader:
return self._firecache.query(query, **kwargs)

@property
def prices(self) -> PriceCollection:
return PriceCollection(client=self.http)


class _ArrowFlightCallThread(threading.Thread):
def __init__(
Expand Down
2 changes: 1 addition & 1 deletion spicepy/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _create_session(self, headers: Dict[str, str]) -> Session:
max_retries=Retry(
total=5,
backoff_factor=2,
# Only retry 500s on GET so we don't unintionally mutute data
# Only retry 500s on GET so we don't unintentionally mutate data
allowed_methods=["GET"],
# https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors
status_forcelist=[
Expand Down
88 changes: 0 additions & 88 deletions spicepy/prices.py

This file was deleted.

0 comments on commit 52b55f4

Please sign in to comment.