Skip to content

Releases: hyriver/pygeoogc

v0.13.1

12 Jun 04:47
Compare
Choose a tag to compare

Release Notes

New Features

  • More robust handling of errors in ArcGISRESTful by catching None responses. Also, use the POST method for ArcGISRESTful.bysql since the SQL Clause could be a long string.

v0.13.0

03 Apr 20:31
Compare
Choose a tag to compare

Release Notes

Breaking Changes

  • Remove caching-related arguments from all functions since now they can be set globally via three environmental variables:

    • HYRIVER_CACHE_NAME: Path to the caching SQLite database.
    • HYRIVER_CACHE_EXPIRE: Expiration time for cached requests in seconds.
    • HYRIVER_CACHE_DISABLE: Disable reading/writing from/to the cache file.

    You can do this like so:

import os

os.environ["HYRIVER_CACHE_NAME"] = "path/to/file.sqlite"
os.environ["HYRIVER_CACHE_EXPIRE"] = "3600"
os.environ["HYRIVER_CACHE_DISABLE"] = "true"

Bug Fixes

  • In ArcGISRESTful.oids_byfield convert the input ids to a list if a user passes a single id.

Internal Changes

  • Refactor ServicURL to hard code the supported links instead of reading them from a file. Also, the class now is based on NamedTuple that has a nicer __repr__.

v0.12.2

15 Jan 17:43
Compare
Choose a tag to compare

Release Notes

New Features

  • Make validate_crs public that can be accessed from the utils module. This is useful for checking validity of user input CRS values and getting its string representation.
  • Add pygeoogc.utils.valid_wms_crs function for getting a list of valid CRS values from a WMS service.
  • Add 3DEP's index WFS service for querying availability of 3DEP data within a bounding box.

Internal Changes

  • Add type checking with typeguard and fixed typing issues raised by typeguard.
  • Refactor show_versions to ensure getting correct versions of all dependencies.

v0.12.1

31 Dec 07:46
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Use the three new ar.retrieve_* functions instead of the old ar.retrieve function to improve type hinting and to make the API more consistent.

v0.12.0

27 Dec 22:32
Compare
Choose a tag to compare

Release Notes

New Features

  • Add a new argument to ArcGISRESTful called verbose to turn on/off all info level logs.
  • Add an option to ArcGISRESTful.get_features called get_geometry to turn on/off requesting the data with or without geometry.
  • Now, ArcGISRESTful saves the object IDs of the features that user requested but are not available in the database to ./cache/failed_request_ids.txt.
  • Add a new parameter to ArcGISRESTful called disable_retry that If True in case there are any failed queries, no retrying attempts is done and object IDs of the failed requests are saved to a text file which its path can be accessed via ArcGISRESTful.client.failed_path.
  • Set response caching expiration time to never expire, for all base classes. A new argument has been added to all three base classes called expire_after that can be used to set the expiration time.
  • Add a new method to all three base classes called clear_cache that clears all cached responses for that specific client.

Breaking Changes

  • All oids_by* methods of ArcGISRESTful class now return a list of object IDs rather than setting self.featureids. This makes it possible to pass the outputs of the oids_by* functions directly to the get_features method.

Internal Changes

  • Make ArcGISRESTful less cluttered by instantiating ArcGISRESTfulBase in the init method of ArcGISRESTful rather than inheriting from its base class.
  • Explicitly set a minimum value of 1 for the maximum number of feature IDs per request in ArcGISRESTful, i.e., self.max_nrecords.
  • Add all the missing types so mypy --strict passes.

v0.11.7

10 Nov 05:52
Compare
Choose a tag to compare

Release Notes

Breaking Changes

  • Remove the onlyipv4 method from RetrySession since it can be easily be achieved using with unittest.mock.patch("socket.has_ipv6", False):.

Internal Changes

  • Use the geoms method for iterating over geometries to address the deprecation warning of shapely.
  • Use importlib-metadata for getting the version insead of pkg_resources to decrease import time as discussed in this issue.
  • Remove unnecessary dependency on simplejson and use ujson instead.

v0.11.6

10 Nov 05:25
Compare
Choose a tag to compare

Release Notes

Breaking Changes

  • Remove the onlyipv4 method from RetrySession since it can be easily be achieved using with unittest.mock.patch("socket.has_ipv6", False):.

Internal Changes

  • Use the geoms method for iterating over geometries to address the deprecation warning of shapely.
  • Use importlib-metadata for getting the version insead of pkg_resources to decrease import time as discussed in this issue.

v0.11.5

09 Sep 19:23
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • Update the code to use the latest requsts-cache API.

v0.11.4

27 Aug 03:23
Compare
Choose a tag to compare

Release Notes

New Features

v0.11.3

24 Aug 15:34
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Fix a bug in WFS.getfeature_byid when the number of IDs exceeds the service's limit by splitting large requests into multiple smaller requests.
  • Add two new arguments, max_nrecords and read_method, to WFS to
    control the maximum number of records per request (defaults to 1000) and specify the response read method (defaults to json), respectively.