Skip to content

Commit

Permalink
add (skipped) test
Browse files Browse the repository at this point in the history
  • Loading branch information
bossie authored and tcassaert committed Feb 27, 2024
1 parent 44af25b commit c8990c5
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions tests/test_batch_result.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os
from pathlib import Path

import geopandas as gpd
Expand Down Expand Up @@ -530,3 +531,63 @@ def test_spatial_cube_to_netcdf_sample_by_feature(tmp_path):
assert assets["openEO_1.nc"]["bbox"] == [0.725, -1.29, 2.99, 1.724]
assert (shape(assets["openEO_1.nc"]["geometry"]).normalize()
.almost_equals(Polygon.from_bounds(0.725, -1.29, 2.99, 1.724).normalize()))


def skip_multiple_time_series_results(tmp_path): # https://github.com/Open-EO/openeo-python-driver/issues/261
job_spec = {
"process_graph": {
"loadcollection1": {
"process_id": "load_collection",
"arguments": {
"id": "TestCollection-LonLat4x4",
"spatial_extent": {"west": 0.0, "south": 50.0, "east": 5.0, "north": 55.0},
"temporal_extent": ["2021-01-04", "2021-01-06"],
"bands": ["Flat:2"]
},
},
"aggregatespatial1": {
"process_id": "aggregate_spatial",
"arguments": {
"data": {"from_node": "loadcollection1"},
"geometries": {
"type": "Point",
"coordinates": [2.5, 52.5],
},
"reducer": {
"process_graph": {
"mean1": {
"process_id": "mean",
"arguments": {
"data": {"from_parameter": "data"}
},
"result": True,
}
}
}
},
},
"saveresult1": {
"process_id": "save_result",
"arguments": {
"data": {"from_node": "aggregatespatial1"},
"format": "JSON",
},
},
"saveresult2": {
"process_id": "save_result",
"arguments": {
"data": {"from_node": "saveresult1"},
"format": "CSV",
},
"result": True,
},
}
}

run_job(job_spec, output_file=tmp_path / "out", metadata_file=tmp_path / "job_metadata.json",
api_version="1.0.0", job_dir="./", dependencies=[], user_id="jenkins")

output_files = os.listdir(tmp_path)

assert "timeseries.json" in output_files
assert "timeseries.csv" in output_files

0 comments on commit c8990c5

Please sign in to comment.