-
Notifications
You must be signed in to change notification settings - Fork 95
Move v2 orders client over to async #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
b82e55c
move to py3.7+, implement async create and cancel order and download …
jreiberkyle 8fffc3c
download order, optional progresss bar for downloads
jreiberkyle fca5990
cleanup
jreiberkyle fbfb824
implement async cancel orders
jreiberkyle 377c3b1
implement list orders
jreiberkyle 1daab03
fix list orders so it does not retrieve more pages if limit is reached
jreiberkyle 8cd4828
move Paged to models and add unit tests
jreiberkyle 27590fe
move orders and orderspaged to models
jreiberkyle 51fe020
cleaning up tests, orders
jreiberkyle 3092019
implement aggregated_order_stats
jreiberkyle ee0c418
full test coverage for AOrdersClient
jreiberkyle 670ca5c
add lost test data file
jreiberkyle 0e45064
workaround for respx issue that still allows running test
jreiberkyle e0db54b
update function level documentation
jreiberkyle ccac3f0
get tox up and running again
jreiberkyle b59b328
sophisticated order details handling, allow creating order details fr…
jreiberkyle 534f184
update readme with python library examples
jreiberkyle 75c8208
add verbose flag to poll
jreiberkyle 8f93139
remove requests dependency
jreiberkyle f87e393
update Python req in README
jreiberkyle 866ca40
fix doctest and flake8 issues, remove utils and move functionality in…
jreiberkyle 710c49f
remove mock dependency
jreiberkyle 79b799d
fix small test error
jreiberkyle 7abfad6
Apply suggestions from code review
jreiberkyle 410aee8
update authentication information
jreiberkyle 88fb4e5
test/fix code examples
jreiberkyle 35d2ddd
small doc fixes
jreiberkyle 4fd89a7
fill in a bit more about sync and add reference to sync need ticket
jreiberkyle a33ac22
move to top-level imports
jreiberkyle 69dfa26
rename APlanetSession -> Session, AOrdersClient -> OrdersClient
jreiberkyle e934584
add documentation on waiting for httpx retry
jreiberkyle 37df69e
remove unused scripts
jreiberkyle 61d38ad
more helpful intro to async programming
jreiberkyle 018d38a
APlanetSession -> Session, match test names to modules
jreiberkyle 8307e74
throw more specific exception, add test
jreiberkyle 3f117b2
use HTTPStatus instead of integers for status codes
jreiberkyle ba19a61
remove elevated module imports at planet.api level
jreiberkyle e476019
remove references to CLI
jreiberkyle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
language: python | ||
python: | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
``` | ||
a27c63c9-a076-4db2-a2e3-c1ff35655cbd | ||
5d5892b5-3ec0-4df7-9852-a27a40baf0c1 | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: queued | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: queued | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: running | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
order a27c63c9-a076-4db2-a2e3-c1ff35655cbd state: success | ||
success | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: running | ||
./20200909_182525_1014_3B_AnalyticMS_clip.tif: 100%|███████████████████████████████████████████████████████████████████████████████████| 35.8k/35.8k [00:03<00:00, 9.97MB/s] | ||
./20200909_182525_1014_metadata.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 0.00k/0.00k [00:00<00:00, 4.08MB/s] | ||
./20200909_182525_1014_3B_AnalyticMS_metadata_clip.xml: 100%|██████████████████████████████████████████████████████████████████████████| 0.01k/0.01k [00:00<00:00, 7.12MB/s] | ||
./20200909_182525_1014_3B_AnalyticMS_DN_udm_clip.tif: 100%|████████████████████████████████████████████████████████████████████████████| 0.06k/0.06k [00:00<00:00, 1.81MB/s] | ||
./20200909_182524_1014_3B_AnalyticMS_clip.tif: 100%|███████████████████████████████████████████████████████████████████████████████████| 33.6k/33.6k [00:02<00:00, 12.2MB/s] | ||
./20200909_182524_1014_3B_AnalyticMS_DN_udm_clip.tif: 100%|████████████████████████████████████████████████████████████████████████████| 0.08k/0.08k [00:00<00:00, 1.78MB/s] | ||
order 5d5892b5-3ec0-4df7-9852-a27a40baf0c1 state: success | ||
success | ||
./20200909_182524_1014_3B_AnalyticMS_metadata_clip.xml: 100%|██████████████████████████████████████████████████████████████████████████| 0.01k/0.01k [00:00<00:00, 9.77MB/s] | ||
./20200909_182524_1014_metadata.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 0.00k/0.00k [00:00<00:00, 3.12MB/s] | ||
./manifest.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 0.00k/0.00k [00:00<00:00, 8.29MB/s] | ||
downloaded a27c63c9-a076-4db2-a2e3-c1ff35655cbd, 9 files downloaded. | ||
./20200925_161029_69_2223_3B_AnalyticMS_metadata_clip.xml: 100%|███████████████████████████████████████████████████████████████████████| 0.01k/0.01k [00:00<00:00, 8.93MB/s] | ||
./20200925_161029_69_2223_3B_AnalyticMS_clip.tif: 100%|████████████████████████████████████████████████████████████████████████████████| 21.3k/21.3k [00:01<00:00, 12.0MB/s] | ||
./20200925_161029_69_2223_3B_AnalyticMS_DN_udm_clip.tif: 100%|█████████████████████████████████████████████████████████████████████████| 0.07k/0.07k [00:00<00:00, 1.99MB/s] | ||
./20200925_161029_69_2223_metadata.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████| 0.00k/0.00k [00:00<00:00, 1.78MB/s] | ||
./20200925_161027_48_2223_metadata.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████| 0.00k/0.00k [00:00<00:00, 2.24MB/s] | ||
./20200925_161027_48_2223_3B_AnalyticMS_clip.tif: 100%|████████████████████████████████████████████████████████████████████████████████| 33.9k/33.9k [00:02<00:00, 11.9MB/s] | ||
./20200925_161027_48_2223_3B_AnalyticMS_DN_udm_clip.tif: 100%|█████████████████████████████████████████████████████████████████████████| 0.08k/0.08k [00:00<00:00, 1.85MB/s] | ||
./20200925_161027_48_2223_3B_AnalyticMS_metadata_clip.xml: 100%|███████████████████████████████████████████████████████████████████████| 0.01k/0.01k [00:00<00:00, 11.7MB/s] | ||
./manifest.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 0.00k/0.00k [00:00<00:00, 8.52MB/s] | ||
downloaded 5d5892b5-3ec0-4df7-9852-a27a40baf0c1, 9 files downloaded. | ||
``` | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,26 @@ | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
from .api.http import Session | ||
from .api.models import Order | ||
from .api.orders import OrdersClient | ||
from .api.order_details import ( | ||
OrderDetails, Product, Notifications, Delivery, AmazonS3Delivery, | ||
AzureBlobStorageDelivery, GoogleCloudStorageDelivery, | ||
GoogleEarthEngineDelivery, Tool) | ||
from .api.__version__ import __version__ # NOQA | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This import appears unused and can be removed. |
||
|
||
__all__ = [ | ||
Session, | ||
OrdersClient, | ||
Order, | ||
OrderDetails, | ||
Product, | ||
Notifications, | ||
Delivery, | ||
AmazonS3Delivery, | ||
AzureBlobStorageDelivery, | ||
GoogleCloudStorageDelivery, | ||
GoogleEarthEngineDelivery, | ||
Tool | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.