Releases: descarteslabs/descarteslabs-python
Releases · descarteslabs/descarteslabs-python
Client release v1.4.1
Fixed
No more irrelevant DeprecationWarning
s when importing the descarteslabs
package (#235). Deprecated functionality in the package will now show FutureWarning
s instead.
Workflows (channel v0-16
) - Fixed
wf.map.geocontext
doesn't raise an error about the CRS of the mapwf.flows
doesn't raise an error about versions from incompatible channels
Client release v1.4.0
Catalog client
- Example code has been cleaned up.
Workflows (channel v0-16
) - Added
- Sharing of any Workflows object as a
Workflow
with version and access control. Browse through sharedWorkflow
s with thewf.flows
browser widget. - Upload images to the DL catalog from Workflows jobs. Usage details can be found in the docs.
wf.np.median
Job.cancel()
to cancel running jobs.- Transient failures in Jobs are automatically retried, resulting in fewer errors.
- Search widget on
wf.map
by default.
Workflows - Fixed
- Bitwise operations on imagery no longer fail
wf.np.linspace
no longer fails when being called correctly.median
is slightly less prone to OOM errors
Workflows - Changed
Array.to_imagery
now acceptsKnownDict
for bandinfo and properties.Number
s can now be constructed fromStr
s
Client release v1.3.0
Workflows (channel v0-15
) - Added
- Output formats for
.compute
including GeoTIFF, JSON, PyArrow, and MessagePack. Usage details can be found in the docs. - Destinations for Job results: download and email. Usage details can be found in the docs.
- Save
.compute
outputs to a file with thefile=
argument. - Pixel value inspector: click in the map widget to view pixel values.
wf.ifelse
for simple conditional logic.- NumPy functions including
hypot
,bitwise_and
,bitwise_or
,bitwise_xor
,bitwise_not
,invert
, andldexp
- Bitwise
Array
andMaskedArray
operations size
attribute onArray
andMaskedArray
astype
function onArray
andMaskedArray
for changing the dtypeflatten
function onArray
andMaskedArray
for flattening into a 1D arrayMaskedArray.compressed
for getting all unmasked data as a 1D arrayget
function onDict
andKnownDict
for providing a default value if a key does not existnbands
attribute onImage
andImageCollection
proxify
can handlescenes.GeoContext
sDict.contains
,Dict.length
Workflows - Fixed
- Fewer failures and hanging calls when connecting to the Workflows backend (like
.compute
,.visualize
,Job.get
, etc.) wf.numpy.histogram
works correctly with computed values forrange
andbins
(such asrange=[arr.min(), arr.max()]
)- More consistent throughput when a large number of jobs are submitted
Array
s can now be constructed from proxyList
sMaskedArray.filled
works correctly when passed Python values- Long-running sessions (like Jupyter kernels) refresh credentials instead of failing with auth errors after many hours of use
wf.numpy.dot
andwf.numpy.einsum
no longer fail when being called correctly- Occasional errors like
('array-89199362e9a5d598fb5c82805136834d', 0, 0)
when callingwf.compute()
with multiple values are resolved
Workflows - Changed
pick_bands
accepts duplicate band names. Enjoy easier Sentinel-1"vv vh vv"
visualizations!ImageCollection.from_id
is always ordered by datewf.numpy.percentile
no longer accepts anaxis
argument- breaking
wf.Job
construction and interface changes:- Use a single
wf.Job(..)
call instead ofwf.Job.build(...).execute()
to create and launch a Job - New
Job.result_to_file
method Job.status
is removed in favor of a singleJob.stage
wf.TimeoutError
renamed towf.JobTimeoutError
- Use a single
Client release v1.2.0
Workflows (channel v0-14
) - Added
- 191 functions from NumPy are available for Workflows
Array
s, including parts of thenumpy.linalg
andnumpy.ma
submodules. See the full list on the docs. index_to_coords
andcoords_to_index
methods onImage
/ImageCollection
/GeoContext
for converting between geospatial and array coordinatesvalue_at
function onImage
andImageCollection
for extracting single pixel values at spatial coordinates.
Workflows - Fixed
- Using datetimes as parameters to
visualize
behaves correctly.
Client release v1.1.3
Catalog client
- Fixed a bug that prevented uploading ndarrays of type
uint8
Workflows (channel v0-13
) - Added
- Array support for
argmin
,argmax
,any
,all
pick_bands
supports anallow_missing
kwarg to drop band names that may be missing from the data without an error.wf.compute
supports passing lists or tuples of items to compute at the same time. Passing multiple items towf.compute
, rather than callingobj.compute
for each separately, is usually faster.- Casting from
Bool
toInt
:wf.Int(True)
- Experimental
.inspect()
method for small computations during interactive use.
Workflows - Changed
- [breaking] Array no longer uses type parameters: now you construct an Array with
wf.Array([1, 2, 3])
, notwf.Array[wf.Int, 1]([1, 2, 3])
. Remember, Array is an experimental API and will continue to make frequent breaking changes! - Workflows now reuses the same gRPC client by default---so repeated or parallel calls to
.compute
, etc. will be faster. Calling.compute
within a thread pool will also be significantly more efficient.
Workflows - Fixed
wf.numpy.histogram
correctly accepts aList[Float]
as therange
argument
Client release v1.1.2
1.1.2 fixes a bug which caused Workflows map layers to behave erratically when changing colormaps.
Client release v1.1.1
1.1.1 fixes a packaging issue that caused import descarteslabs.workflows
to fail.
It also makes NumPy an explicit dependency. NumPy was already a transitive dependency, so this shouldn't cause any changes.
You should NOT install version 1.1.0; 1.1.1 should be used instead in all circumstances.
Client release v1.1.0
[1.1.0] - 2020-03-11
Catalog client
Image.upload()
now emits a deprecation warning if the image has acs_code
orprojection
property.
The projection defined in the uploaded file is always used and applied to the resulting image in the Catalog.Image.upload_ndarray()
now emits a deprecation warning if the image has both acs_code
and aprojection
property. Only one of them may be supplied, andcs_code
is given preference.
Scenes
SceneCollection.download_mosaic
has new default behavior formask_alpha
wherein thealpha
band will be
used as a mask by default if it is available for all scenes in the collection, even if it is not specified in
the list of bands.
Workflows (channel v0-12
) - Added
- Experimental Array API following the same syntax as NumPy arrays. It supports vectorized operations, broadcasting,
and multidimensional indexing.ndarray
attribute ofImage
andImageCollection
will return aMaskedArray
.- Over 60 NumPy ufuncs are now callable with Workflows
Array
. - Includes other useful
Array
functions likemin()
,median()
,transpose()
,concatenate()
,stack()
,histogram()
, andreshape()
.
ImageCollection.sortby_composite()
for creating an argmin/argmax composite of anImageCollection
.- Slicing of
List
,Tuple
,Str
, andImageCollection
. wf.range
for generating a sequence of numbers between start and stop values.ImageCollectionGroupby.mosaic()
for applyingImageCollection.mosaic
to each group.wf.exp()
,wf.square()
,wf.log1p()
,wf.arcsin()
,wf.arccos()
, andwf.arctan()
Datetime.is_between()
for checking if aDatetime
falls within a specified date rangeFeatureCollection.contains()
- Container operations on
GeometryCollection
including:GeometryCollection.contains()
GeometryCollection.sorted()
GeometryCollection.map()
GeometryCollection.filter()
GeometryCollection.reduce()
List
andTuple
can now be compared with other instances of their type via__lt__()
,__eq__()
etc.List.__add__()
andList.__mul__()
for concatenating and duplicatingList
s.
Workflows - Changed
- Products without alpha band and
nodata
value are rejected, instead of silently producing unwanted behavior. ImageCollection.concat_bands
now throws a better error when trying to concatenate bands from anotherImageCollection
that is not the same length.Any
is now promotable to all other types automatically.- Better error when trying to iterate over Proxytypes.
- Interactive map: calls to
visualize
now clear layer errors. - Interactive map: when setting scales, invalid values are highlighted in red.
Workflows - Fixed
- Better errors when specifying invalid type parameters for Proxytypes that require them.
- Field access on
Feature
,FeatureCollection
,Geometry
, andGeomeryCollection
no longer fails. - In
from_id
, processing level 'cubespline' no longer fails.
Client release v1.0.0
As of January 1st, 2020, the client library no longer supports Python 2. For more information, please contact [email protected]. For help with porting to Python 3, please visit https://docs.python.org/3/howto/pyporting.html. |
---|
Catalog client
- There is an entirely new backend supporting asynchronous uploads of image files and ndarrays with
the catalog client. There are minor changes to theImageUpload
class (a newevents
field has subsumed
errors
, and thejob_id
field has been removed) but the basic interface is unchanged so most
code will keep functioning without any changes. - It is now possible to cancel image uploads.
- Errors messages are now easier to read.
- Many improvements to the documentation.
- You can now create or retrieve an existing object using the
get_or_create
method. - Retrieving a
Band
orImage
by name is now possible by callingget_band
orget_image
on the
Product
instance. You can also use the Product'snamed_id
function to get a complete id for
images and bands. - A new convenience function
make_valid_name
onImage
andBand
classes will return a sanitized
name without invalid characters. - A new property
ATTRIBUTES
enumerates which attributes are available for a specific catalog object. - Trying to set an attribute that does not exist will now raise
AttributeError
. update_related_objects_permissions()
should no longer fail with a JSON serialization error.- Setting a read-only attribute will now raise an
AttributeValidationError
. - Saving a new object while one with the same id already exists will now raise a
ConflictError
instead ofBadRequestError
. - If a retrieved object has since been deleted from the catalog, saving any changes or trying to
reload it will now raise aDeletedObjectError
. - Resolution fields now accept string values such as "10m" or "0.008 degrees". If the value cannot
be parsed, anAttributeValidationError
will be raised. - Changes to the
extra_properties
attribute are now tracked correctly.
Packaging
- This release no longer supports Python 2.
- This package is now distributed as a Python 3 wheel which will speed up installation.
Workflows (channel v0-11
) - Added
- Handling of missing data via empty ImageCollections
ImageCollection.from_id
returns an empty ImageCollection if no data exist for the given time/place, rather than an errorImageCollection.filter
returns an empty ImageCollection if the predicate is False for every Image, rather than an errorImage.replace_empty_with
andImageCollection.replace_empty_with
for explicitly filling in missing data- See the Workflows guide for more information
- Docstrings and examples on every class and function!
- Assigning new metadata to Image properties & bandinfo:
Image.with_properties()
,Image.with_bandinfo()
- Interactive map: colorbar legends on layers with colormaps (requires matplotlib)
Dict.from_pairs
: construct a Dict from a sequence of key-value pairs- Map displays a fullscreen button by default ([breaking] if your code adds one, you'll now get two)
wf.concat
for concatentatingImage
andImageCollection
objectsImageCollection.concat
now acceptsImage
objects; newImage.concat
acceptsImage
orImageCollection
ImageCollection.mosaic()
FeatureCollection.sorted()
,FeatureCollection.length()
,FeatureCollection.__reversed__()
GeometryCollection.length()
,GeometryCollection.__reversed__()
Workflows - Changed
wf.zip
now supportsImageCollection
,FeatureCollection
,GeometryCollection
as well asList
andStr
- Get a GeoContext for the current bounds of the map in any resolution, shape, or CRS (including
"utm"
, which automatically picks the right UTM zone for you) withwf.map.geocontext
. Also now returns a Scenes GeoContext for better introspection and use with Raster. - Better backend type-checking displays the possible arguments for most functions if called incorrectly
arr_shape
included when callingwf.GeoContext.compute()
- More readable errors when communication with the backend fails
- Interactive map: layout handles being resized, for example setting
wf.map.layout.height = '1000px'
Any
is no longer callable;Any.cast
encouragedremove_layer
andclear_layers
moved fromwf.interactive.MapApp
class towf.interactive.Map
(non-breaking change)- [possibly breaking] band renaming in binary operators only occurs when broadcasting:
red + red
is justred
, rather thanred_add_red
.red + blue
is stillred_add_blue
. Code which depends on accessing bands by name may need to change.
Workflows - Fixed
wf.where
propagates masks correctly, and handles metadata correctly with multi-band inputsprocessing_level="surface"
actually returns surface-reflectance-processed imageryImageCollection.sorted()
works properly- Viewing global-extent WGS84 images on the Workflows map no longer causes errors
List
proxytype no longer infinitely iterable in Python- Repeated use of
axis="bands"
works correctly ImageCollection.from_images
correctly aligns the bands of the inputs- Numeric casting (
wf.Int(wf.Float(2.2))
) works as expected - More descriptive error when constructing an invalid
wf.Datetime
- Computing a single
Bool
value derived from imagery works correctly
Client release v0.28.1
Changed
- Update workflows client channel
- Workflows map UI is more stable: errors and layers won't fill the screen