Skip to content

Hydrotools Release v2.1.0

Compare
Choose a tag to compare
@aaraney aaraney released this 16 Jun 21:25
· 663 commits to main since this release

Additions

  • IVDataService parameters: enable_cache and cache_expire_after allowing control over cache usage.
  • Url keyword arguments quote_treatment, safe, and quote_overide_map added to support flexibility in quoted url representation. Urls are still comparable using the == operator however urls can differ in their quote_url representation.
  • RestClient.mget now accepts a collection of query parameters and/or headers. It is not required to provide urls to mget if base url is set. Thus, a collection of query's can be passed in a collection and the will be built into requests as parameters of the base url.
  • Url: Treat urls like to pathlib.Paths. Supports appending paths with / and appending url query parameters with +.
  • ClientSession: Extension of aiohttp_client_cache that adds exponential backoff.
  • Variadic: Join list or tuple of objects on some delimiter. Useful when query parameters utilize a non-key=value&key=value2 pattern.

Removals

  • IVDataService parameters: process and retry removed.
  • All code using multiprocessing removed
  • IVDataService method following pattern get_raw_ and get_json removed
  • U.S. State constants removed and no longer checked
  • procs property removed

Changes

  • IVDataService now uses aiohttp via _restclient to do asynchronous retrieval of data.
  • documentation updated with examples
  • IVDataService::get
    • now accepts multiple states, hucs, counties, bounding boxes
    • is now an instance method instead of a classmethod
  • The default splitting factor for sites is now 20 instead of the previous 100.
  • Update Url docstring to reflect new kwarg additions
  • RestClient: a class which offers asynchronous performance via a convenient serial wrapper, sqlite database GET request caching, GET request backoff, batch GET requests, and flexible url argument encoding.
  • RestClient parameters changed (breaking).