Skip to content

Commit

Permalink
update OAProc process list filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis authored and kalxas committed Feb 13, 2023
1 parent de144a5 commit a365101
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions owslib/ogcapi/coverages.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def __init__(self, url: str, json_: str = None, timeout: int = 30,
__doc__ = Collections.__doc__ # noqa
super().__init__(url, json_, timeout, headers, auth)

def coverages(self) -> dict:
def coverages(self) -> list:
"""
implements /collections filtered on coverages
@returns: `dict` of filtered collections object
@returns: `list` of filtered collections object
"""

coverages_ = []
Expand Down
4 changes: 2 additions & 2 deletions owslib/ogcapi/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def __init__(self, url: str, json_: str = None, timeout: int = 30,
__doc__ = Collections.__doc__ # noqa
super().__init__(url, json_, timeout, headers, auth)

def feature_collections(self) -> dict:
def feature_collections(self) -> list:
"""
implements /collections filtered on features
@returns: `dict` of filtered collections object
@returns: `list` of filtered collections object
"""

features_ = []
Expand Down
4 changes: 2 additions & 2 deletions owslib/ogcapi/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def __init__(self, url: str, json_: str = None, timeout: int = 30,
__doc__ = Collections.__doc__ # noqa
super().__init__(url, json_, timeout, headers, auth)

def maps(self) -> dict:
def maps(self) -> list:
"""
implements /collections filtered on maps
@returns: `dict` of filtered collections object
@returns: `list` of filtered collections object
"""

maps_ = []
Expand Down
6 changes: 3 additions & 3 deletions owslib/ogcapi/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ def __init__(self, url: str, json_: str = None, timeout: int = 30,
__doc__ = Collections.__doc__ # noqa
super().__init__(url, json_, timeout, headers, auth)

def processes(self) -> dict:
def processes(self) -> list:
"""
implements /processes
@returns: `dict` of available processes
@returns: `list` of available processes
"""

path = 'processes'
return self._request(path=path)
return self._request(path=path)['processes']

def process(self, process_id: str) -> dict:
"""
Expand Down
4 changes: 2 additions & 2 deletions owslib/ogcapi/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def __init__(self, url: str, json_: str = None, timeout: int = 30,
__doc__ = Features.__doc__ # noqa
super().__init__(url, json_, timeout, headers, auth)

def records(self) -> dict:
def records(self) -> list:
"""
implements /collections filtered on records
@returns: `dict` of filtered collections object
@returns: `list` of filtered collections object
"""

records_ = []
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ogcapi_processes_pygeoapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_ogcapi_processes_pygeoapi():
assert len(collections) > 0

processes = p.processes()
assert len(processes) == 1
assert len(processes) == 3

hello_world = p.process('hello-world')
assert hello_world['id'] == 'hello-world'
Expand Down

0 comments on commit a365101

Please sign in to comment.