Update the nan values to -99999 #153
GitHub Actions / Test Results
failed
Jul 17, 2024 in 0s
1 fail in 1s
Annotations
Check warning on line 0 in STAC.tests.test_stac
github-actions / Test Results
test_stac_catalog (STAC.tests.test_stac) failed
test-results.xml [took 1s]
Raw output
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/global-coastal-atlas/global-coastal-atlas/STAC/data/current/SPMN/items/mild/2050.json'
def test_stac_catalog():
stac_folder = Path(__file__).parent.parent / "data" / "current"
catalog = pystac_client.Client.open(stac_folder / "catalog.json")
used_uris = set()
import jsonschema
import jsonschema.exceptions
import jsonschema.validators
from referencing import Registry, Resource
from pystac.validation.local_validator import get_local_schema_cache
used_uris.update(catalog.validate())
for collection in catalog.get_collections():
used_uris.update(collection.validate())
> for item in collection.get_items():
STAC/tests/test_stac.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/share/miniconda3/envs/globalcoastalatlas/lib/python3.10/site-packages/pystac_client/collection_client.py:154: in get_items
for item in super().get_items(*ids):
/usr/share/miniconda3/envs/globalcoastalatlas/lib/python3.10/site-packages/pystac/catalog.py:561: in get_items
yield from items
/usr/share/miniconda3/envs/globalcoastalatlas/lib/python3.10/site-packages/pystac/stac_object.py:428: in get_stac_objects
link.resolve_stac_object(root=self.get_root())
/usr/share/miniconda3/envs/globalcoastalatlas/lib/python3.10/site-packages/pystac/link.py:330: in resolve_stac_object
obj = stac_io.read_stac_object(target_href, root=root)
/usr/share/miniconda3/envs/globalcoastalatlas/lib/python3.10/site-packages/pystac/stac_io.py:234: in read_stac_object
d = self.read_json(source, *args, **kwargs)
/usr/share/miniconda3/envs/globalcoastalatlas/lib/python3.10/site-packages/pystac/stac_io.py:205: in read_json
txt = self.read_text(source, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pystac_client.stac_api_io.StacApiIO object at 0x7f9e9b728610>
source = '/home/runner/work/global-coastal-atlas/global-coastal-atlas/STAC/data/current/SPMN/items/mild/2050.json'
args = (), kwargs = {}
href = '/home/runner/work/global-coastal-atlas/global-coastal-atlas/STAC/data/current/SPMN/items/mild/2050.json'
def read_text(self, source: pystac.link.HREF, *args: Any, **kwargs: Any) -> str:
"""Read text from the given URI.
Overwrites the default method for reading text from a URL or file to allow
:class:`urllib.request.Request` instances as input. This method also raises
any :exc:`urllib.error.HTTPError` exceptions rather than catching
them to allow us to handle different response status codes as needed.
"""
if isinstance(source, Link):
link = source.to_dict()
href = link["href"]
# get headers and body from Link and add to request from simple STAC
# resolver
merge = bool(link.get("merge", False))
# If the link object includes a "method" property, use that. If not
# fall back to 'GET'.
method = link.get("method", "GET")
# If the link object includes a "headers" property, use that and
# respect the "merge" property.
headers = link.get("headers", None)
# If "POST" use the body object that and respect the "merge" property.
link_body = link.get("body", {})
if method == "POST":
parameters = (
{**(kwargs.get("parameters", {})), **link_body}
if merge
else link_body
)
else:
# parameters are already in the link href
parameters = {}
return self.request(
href, method=method, headers=headers, parameters=parameters
)
else: # str or something that can be str'ed
href = str(source)
if _is_url(href):
return self.request(href, *args, **kwargs)
else:
> with open(href) as f:
E FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/global-coastal-atlas/global-coastal-atlas/STAC/data/current/SPMN/items/mild/2050.json'
/usr/share/miniconda3/envs/globalcoastalatlas/lib/python3.10/site-packages/pystac_client/stac_api_io.py:170: FileNotFoundError
Loading