Skip to content

Commit

Permalink
Drop API 0.4.0 usage (Open-EO/openeo-python-client#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Mar 8, 2023
1 parent bbe0452 commit 1f7c46e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from openeo.rest.connection import OpenEoApiError
from openeo.rest.conversions import datacube_from_file, timeseries_json_to_pandas
from openeo.rest.datacube import DataCube, THIS
from openeo.rest.imagecollectionclient import ImageCollectionClient
from openeo.rest.job import BatchJob, JobResults
from openeo.rest.mlmodel import MlModel
from openeo.rest.udp import Parameter
Expand All @@ -39,7 +38,9 @@
_log = logging.getLogger(__name__)


def _dump_process_graph(cube: Union[DataCube, ImageCollectionClient], tmp_path: Path, name="process_graph.json"):
def _dump_process_graph(
cube: Union[DataCube], tmp_path: Path, name="process_graph.json"
):
"""Dump a cube's process graph as json to a temp file"""
(tmp_path / name).write_text(cube.to_json(indent=2))

Expand Down Expand Up @@ -438,8 +439,6 @@ def test_batch_job_cancel(auth_connection, tmp_path):
cube = auth_connection.load_collection('PROBAV_L3_S10_TOC_333M',bands=["NDVI"]).filter_temporal("2017-11-01", "2017-11-21")
if isinstance(cube, DataCube):
cube = cube.process("sleep", arguments={"data": cube, "seconds": 30})
elif isinstance(cube, ImageCollectionClient):
cube = cube.graph_add_process("sleep", args={"data": {"from_node": cube.node_id}, "seconds": 30})
else:
raise ValueError(cube)

Expand Down

0 comments on commit 1f7c46e

Please sign in to comment.