Releases: hyriver/pygeoogc
Releases · hyriver/pygeoogc
v0.13.1
Release Notes
New Features
- More robust handling of errors in
ArcGISRESTful
by catchingNone
responses. Also, use thePOST
method forArcGISRESTful.bysql
since the SQL Clause could be a long string.
v0.13.0
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 inputids
to alist
if a user passes a singleid
.
Internal Changes
- Refactor
ServicURL
to hard code the supported links instead of reading them from a file. Also, the class now is based onNamedTuple
that has a nicer__repr__
.
v0.12.2
Release Notes
New Features
- Make
validate_crs
public that can be accessed from theutils
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 bytypeguard
. - Refactor
show_versions
to ensure getting correct versions of all dependencies.
v0.12.1
Release Notes
Internal Changes
- Use the three new
ar.retrieve_*
functions instead of the oldar.retrieve
function to improve type hinting and to make the API more consistent.
v0.12.0
Release Notes
New Features
- Add a new argument to
ArcGISRESTful
calledverbose
to turn on/off all info level logs. - Add an option to
ArcGISRESTful.get_features
calledget_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
calleddisable_retry
that IfTrue
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 viaArcGISRESTful.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 ofArcGISRESTful
class now return a list of object IDs rather than settingself.featureids
. This makes it possible to pass the outputs of theoids_by*
functions directly to theget_features
method.
Internal Changes
- Make
ArcGISRESTful
less cluttered by instantiatingArcGISRESTfulBase
in theinit
method ofArcGISRESTful
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
Release Notes
Breaking Changes
- Remove the
onlyipv4
method fromRetrySession
since it can be easily be achieved usingwith unittest.mock.patch("socket.has_ipv6", False):
.
Internal Changes
- Use the
geoms
method for iterating over geometries to address the deprecation warning ofshapely
. - Use
importlib-metadata
for getting the version insead ofpkg_resources
to decrease import time as discussed in this issue. - Remove unnecessary dependency on
simplejson
and useujson
instead.
v0.11.6
Release Notes
Breaking Changes
- Remove the
onlyipv4
method fromRetrySession
since it can be easily be achieved usingwith unittest.mock.patch("socket.has_ipv6", False):
.
Internal Changes
- Use the
geoms
method for iterating over geometries to address the deprecation warning ofshapely
. - Use
importlib-metadata
for getting the version insead ofpkg_resources
to decrease import time as discussed in this issue.
v0.11.5
Release Notes
Bug Fixes
- Update the code to use the latest
requsts-cache
API.
v0.11.4
v0.11.3
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
andread_method
, toWFS
to
control the maximum number of records per request (defaults to 1000) and specify the response read method (defaults tojson
), respectively.