Closed JSee98 closed 1 year ago
Great work, @JSee98!
main
. Could you please resolve the minor merge conflicts we're running into? If you need a had I'd happy to help you with that.mypy
's type checking is failing. See if you can resolve this on your end. Try running mypy --ignore-missing planet
in your terminal this branch. Typing can be a bit tricky to resolve, so please feel free to reach out if you need help with this.Previously:
planet.order_request.delivery("zip")
#returns {'archive_type': 'zip'}
planet.order_request.delivery("zip", archive_filename="test.zip")
#returns {'archive_type': 'zip', 'archive_filename': 'test.zip'}
Now:
planet.order_request.delivery("zip")
#returns {'archive_type': 'zip', 'single_archive': True}
planet.order_request.delivery("zip", archive_filename="test.zip")
#returns {'archive_type': 'zip', 'archive_filename': 'test.zip'}
This satisfies the desired logic where the delivery object should contain either:
"archive_type": "zip",
"single_archive": true
or
"archive_type": "zip",
"archive_filename": "{{name}}.zip"
Now, I just need to verify that an order actually delivers to a bucket (e.g., GCP bucket) using both of those methods.
Update: The data delivers as expected. See this comment for more detail: https://github.com/planetlabs/planet-client-python/pull/989#issuecomment-1634846035
Also, nox
isn't failing locally anymore, consequently mypy --ignore-missing planet
command is also running fine locally. This must be due to the rebase with the main branch.
Created an order where single_archive=True
and archive_filename
was unassigned: https://orders-ui.prod.planet-labs.com/orders/5ab30bb4-613b-4315-b44e-6a1bb60b556d
The delivery config contained:
{
"google_cloud_storage": {
"bucket": "devrel-notebooks",
"credentials": "<REDACTED>"
},
"archive_type": "zip",
"single_archive": true
}
Result: Order delivered as a "Single Zip", containing: manifest.json
and output.zip
, as one would expect.
Similarly, I created an order assigning archive_filename="test_filename.zip"
and single_archive
was unassigned: https://orders-ui.prod.planet-labs.com/orders/9a99249a-3db8-470b-8756-e5423a563d30
The delivery config contained:
{
"google_cloud_storage": {
"bucket": "devrel-notebooks",
"credentials": "<REDACTED>"
},
"archive_type": "zip",
"archive_filename": "test_filename.zip"
}
Result: Order delivered as a "Per Bundle Zip", containing: manifest.json
and test_filename.zip
, as one would expect.
Related Issue(s):
Closes #963
Proposed Changes:
For inclusion in changelog (if applicable):
archive_filename
andsingle_archive
are undefined.Not intended for changelog:
Diff of User Interface
Old behavior: In
order_request.delivery()
, ifarchive_type
was set tozip
, butarchive_filename
andsingle_archive
were both undefined, data was not delivered zipped.New behavior: Now, in
order_request.delivery()
, ifarchive_type
is set tozip
, butarchive_filename
andsingle_archive
are both undefined, data will deliver as zipped.PR Checklist:
(Optional) @mentions for Notifications: