|
1 | 1 | import json
|
| 2 | +import os |
2 | 3 | from pathlib import Path
|
3 | 4 |
|
4 | 5 | import geopandas as gpd
|
@@ -530,3 +531,63 @@ def test_spatial_cube_to_netcdf_sample_by_feature(tmp_path):
|
530 | 531 | assert assets["openEO_1.nc"]["bbox"] == [0.725, -1.29, 2.99, 1.724]
|
531 | 532 | assert (shape(assets["openEO_1.nc"]["geometry"]).normalize()
|
532 | 533 | .almost_equals(Polygon.from_bounds(0.725, -1.29, 2.99, 1.724).normalize()))
|
| 534 | + |
| 535 | + |
| 536 | +def skip_multiple_time_series_results(tmp_path): # https://github.com/Open-EO/openeo-python-driver/issues/261 |
| 537 | + job_spec = { |
| 538 | + "process_graph": { |
| 539 | + "loadcollection1": { |
| 540 | + "process_id": "load_collection", |
| 541 | + "arguments": { |
| 542 | + "id": "TestCollection-LonLat4x4", |
| 543 | + "spatial_extent": {"west": 0.0, "south": 50.0, "east": 5.0, "north": 55.0}, |
| 544 | + "temporal_extent": ["2021-01-04", "2021-01-06"], |
| 545 | + "bands": ["Flat:2"] |
| 546 | + }, |
| 547 | + }, |
| 548 | + "aggregatespatial1": { |
| 549 | + "process_id": "aggregate_spatial", |
| 550 | + "arguments": { |
| 551 | + "data": {"from_node": "loadcollection1"}, |
| 552 | + "geometries": { |
| 553 | + "type": "Point", |
| 554 | + "coordinates": [2.5, 52.5], |
| 555 | + }, |
| 556 | + "reducer": { |
| 557 | + "process_graph": { |
| 558 | + "mean1": { |
| 559 | + "process_id": "mean", |
| 560 | + "arguments": { |
| 561 | + "data": {"from_parameter": "data"} |
| 562 | + }, |
| 563 | + "result": True, |
| 564 | + } |
| 565 | + } |
| 566 | + } |
| 567 | + }, |
| 568 | + }, |
| 569 | + "saveresult1": { |
| 570 | + "process_id": "save_result", |
| 571 | + "arguments": { |
| 572 | + "data": {"from_node": "aggregatespatial1"}, |
| 573 | + "format": "JSON", |
| 574 | + }, |
| 575 | + }, |
| 576 | + "saveresult2": { |
| 577 | + "process_id": "save_result", |
| 578 | + "arguments": { |
| 579 | + "data": {"from_node": "saveresult1"}, |
| 580 | + "format": "CSV", |
| 581 | + }, |
| 582 | + "result": True, |
| 583 | + }, |
| 584 | + } |
| 585 | + } |
| 586 | + |
| 587 | + run_job(job_spec, output_file=tmp_path / "out", metadata_file=tmp_path / "job_metadata.json", |
| 588 | + api_version="1.0.0", job_dir="./", dependencies=[], user_id="jenkins") |
| 589 | + |
| 590 | + output_files = os.listdir(tmp_path) |
| 591 | + |
| 592 | + assert "timeseries.json" in output_files |
| 593 | + assert "timeseries.csv" in output_files |
0 commit comments