polytope-python 1.1.1__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- polytope_python-2.0.1/.github/ci-config.yml +13 -0
- polytope_python-2.0.1/.github/ci-hpc-config.yml +21 -0
- polytope_python-2.0.1/.github/workflows/cd.yml +30 -0
- polytope_python-2.0.1/.github/workflows/downstream-ci.yml +40 -0
- polytope_python-2.0.1/.github/workflows/label-public-pr.yml +10 -0
- polytope_python-2.0.1/.github/workflows/test-pypi.yml +32 -0
- polytope_python-2.0.1/.gitignore +78 -0
- polytope_python-2.0.1/.pre-commit-config.yaml +16 -0
- polytope_python-2.0.1/.readthedocs.yaml +33 -0
- polytope_python-2.0.1/ACKNOWLEDGEMENTS.rst +8 -0
- polytope_python-2.0.1/CONTRIBUTING.rst +20 -0
- polytope_python-2.0.1/Makefile +20 -0
- polytope_python-2.0.1/PKG-INFO +248 -0
- polytope_python-2.0.1/README.md +203 -0
- polytope_python-2.0.1/codecov.yml +15 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/API.md +52 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/Axis_types.md +99 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/Datacube.md +38 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/Overview.md +19 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/Slicer.md +46 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/images/Polytope_APIs_3.png +0 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/images/polytope_components_5.png +0 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/images/slicing_process.png +0 -0
- polytope_python-2.0.1/docs/Algorithm/Developer_Guide/shapes.md +190 -0
- polytope_python-2.0.1/docs/Algorithm/Overview/Overview.md +38 -0
- polytope_python-2.0.1/docs/Algorithm/Overview/Polytope_at_ECMWF.md +32 -0
- polytope_python-2.0.1/docs/Algorithm/Overview/images_overview/ecmwf_datacube.png +0 -0
- polytope_python-2.0.1/docs/Algorithm/Overview/images_overview/ecmwf_polytope.png +0 -0
- polytope_python-2.0.1/docs/Algorithm/User_Guide/Building_Features.md +41 -0
- polytope_python-2.0.1/docs/Algorithm/User_Guide/Example.md +51 -0
- polytope_python-2.0.1/docs/Algorithm/User_Guide/Getting_started.md +42 -0
- polytope_python-2.0.1/docs/Algorithm/User_Guide/Overview.md +33 -0
- polytope_python-2.0.1/docs/Algorithm/User_Guide/images_users/shipping_route.png +0 -0
- polytope_python-2.0.1/docs/Service/Data_Portfolio.md +150 -0
- polytope_python-2.0.1/docs/Service/Design_doc.md +484 -0
- polytope_python-2.0.1/docs/Service/Examples/OpenData/od_boundingbox_example.ipynb +703 -0
- polytope_python-2.0.1/docs/Service/Examples/OpenData/od_country_example.ipynb +578 -0
- polytope_python-2.0.1/docs/Service/Examples/OpenData/od_polygon_example.ipynb +675 -0
- polytope_python-2.0.1/docs/Service/Examples/OpenData/od_timeseries_example.ipynb +188 -0
- polytope_python-2.0.1/docs/Service/Examples/OpenData/od_trajectory_example.ipynb +571 -0
- polytope_python-2.0.1/docs/Service/Examples/OpenData/od_vertical_profile_example.ipynb +152 -0
- polytope_python-2.0.1/docs/Service/Examples/boundingbox_example.ipynb +560 -0
- polytope_python-2.0.1/docs/Service/Examples/country_example.ipynb +558 -0
- polytope_python-2.0.1/docs/Service/Examples/examples.md +23 -0
- polytope_python-2.0.1/docs/Service/Examples/polygon_example.ipynb +547 -0
- polytope_python-2.0.1/docs/Service/Examples/timeseries_example.ipynb +191 -0
- polytope_python-2.0.1/docs/Service/Examples/trajectory_example.ipynb +562 -0
- polytope_python-2.0.1/docs/Service/Examples/vertical_profile_example.ipynb +123 -0
- polytope_python-2.0.1/docs/Service/Features/boundingbox.md +86 -0
- polytope_python-2.0.1/docs/Service/Features/feature.md +22 -0
- polytope_python-2.0.1/docs/Service/Features/polygon.md +85 -0
- polytope_python-2.0.1/docs/Service/Features/timeseries.md +113 -0
- polytope_python-2.0.1/docs/Service/Features/trajectory.md +139 -0
- polytope_python-2.0.1/docs/Service/Features/vertical_profile.md +107 -0
- polytope_python-2.0.1/docs/Service/Installation.md +55 -0
- polytope_python-2.0.1/docs/Service/Overview.md +42 -0
- polytope_python-2.0.1/docs/Service/Quick_Start.md +72 -0
- polytope_python-2.0.1/docs/extra.css +25 -0
- polytope_python-2.0.1/docs/images/flight_path.png +0 -0
- polytope_python-2.0.1/docs/images/greece.png +0 -0
- polytope_python-2.0.1/docs/images/logo.gif +0 -0
- polytope_python-2.0.1/docs/images/polytope_feature.png +0 -0
- polytope_python-2.0.1/docs/images/polytope_logo_new_animated_AdobeExpress_3.gif +0 -0
- polytope_python-2.0.1/docs/images/timeseries.png +0 -0
- polytope_python-2.0.1/docs/images/timeseries_example.png +0 -0
- polytope_python-2.0.1/docs/images/timeseries_qs.png +0 -0
- polytope_python-2.0.1/docs/index.md +70 -0
- polytope_python-2.0.1/docs/requirements.txt +3 -0
- polytope_python-2.0.1/examples/3D_shipping_route.py +96 -0
- polytope_python-2.0.1/examples/3D_shipping_route_wave_model.py +131 -0
- polytope_python-2.0.1/examples/4D_flight_path.py +150 -0
- polytope_python-2.0.1/examples/country_slicing.py +99 -0
- polytope_python-2.0.1/examples/cyclic_route_around_earth.py +58 -0
- polytope_python-2.0.1/examples/data/EMODnet_HA_WindFarms_pg_20220324.shp +3 -0
- polytope_python-2.0.1/examples/data/EMODnet_HA_WindFarms_pg_20220324.shx +0 -0
- polytope_python-2.0.1/examples/data/Shipping-Lanes-v1.shp +3 -0
- polytope_python-2.0.1/examples/data/Shipping-Lanes-v1.shx +0 -0
- polytope_python-2.0.1/examples/data/World_Countries__Generalized_.shp +3 -0
- polytope_python-2.0.1/examples/data/World_Countries__Generalized_.shx +0 -0
- polytope_python-2.0.1/examples/data/earth_image.jpg +3 -0
- polytope_python-2.0.1/examples/data/map_earth_4k.jpg +3 -0
- polytope_python-2.0.1/examples/data/mars_req_9km_wind.req +12 -0
- polytope_python-2.0.1/examples/data/mars_req_levels.req +13 -0
- polytope_python-2.0.1/examples/data/mars_req_timeseries.req +12 -0
- polytope_python-2.0.1/examples/data/output4.grib +3 -0
- polytope_python-2.0.1/examples/data/output4.req +12 -0
- polytope_python-2.0.1/examples/data/output8.grib +3 -0
- polytope_python-2.0.1/examples/data/output8.req +12 -0
- polytope_python-2.0.1/examples/data/temp_model_levels.grib +3 -0
- polytope_python-2.0.1/examples/data/timeseries_t2m.grib +3 -0
- polytope_python-2.0.1/examples/data/winds.grib +3 -0
- polytope_python-2.0.1/examples/healpix_grid_box_example.py +83 -0
- polytope_python-2.0.1/examples/octahedral_grid_box_example.py +94 -0
- polytope_python-2.0.1/examples/octahedral_grid_country_example.py +116 -0
- polytope_python-2.0.1/examples/plotting_country_data.py +201 -0
- polytope_python-2.0.1/examples/read_me_example.py +24 -0
- polytope_python-2.0.1/examples/requirements_examples.txt +13 -0
- polytope_python-2.0.1/examples/slicing_all_ecmwf_countries.py +157 -0
- polytope_python-2.0.1/examples/timeseries_example.py +226 -0
- polytope_python-2.0.1/examples/wind_farms.py +94 -0
- polytope_python-2.0.1/mkdocs.yml +44 -0
- polytope_python-2.0.1/performance/fdb_performance.py +47 -0
- polytope_python-2.0.1/performance/fdb_performance_3D.py +49 -0
- polytope_python-2.0.1/performance/fdb_scalability_plot.py +16 -0
- polytope_python-2.0.1/performance/fdb_slice_many_numbers_timeseries.py +77 -0
- polytope_python-2.0.1/performance/performance_many_num_steps.py +59 -0
- polytope_python-2.0.1/performance/plotting_scalability.py +71 -0
- polytope_python-2.0.1/performance/scalability_test.py +490 -0
- polytope_python-2.0.1/performance/scalability_test_2.py +104 -0
- polytope_python-2.0.1/performance_unstructured/octahedral_vs_unstructured_slicing.py +350 -0
- polytope_python-2.0.1/performance_unstructured/plot_structured_vs_unstructured_slicing.py +32 -0
- polytope_python-2.0.1/polytope_feature/__init__.py +2 -0
- polytope_python-2.0.1/polytope_feature/_version.py +2 -0
- polytope_python-2.0.1/polytope_feature/datacube/backends/catalogue_helper.py +38 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/backends/datacube.py +35 -5
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/backends/fdb.py +32 -8
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/backends/mock.py +8 -5
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/backends/xarray.py +31 -14
- polytope_python-2.0.1/polytope_feature/datacube/index_tree.proto +13 -0
- polytope_python-2.0.1/polytope_feature/datacube/quadtree/quad_tree.py +174 -0
- polytope_python-2.0.1/polytope_feature/datacube/quadtree/quadtree_additional_operations.py +57 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/tensor_index_tree.py +5 -6
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/datacube_mappers.py +45 -13
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix.py +8 -2
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py +65 -29
- polytope_python-2.0.1/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular.py +63 -0
- polytope_python-2.0.1/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular_mapper_types/__init__.py +1 -0
- polytope_python-2.0.1/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular_mapper_types/icon.py +45 -0
- polytope_python-2.0.1/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular_mapper_types/lambert_conformal.py +274 -0
- polytope_python-2.0.1/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular_mapper_types/unstructured.py +32 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/local_regular.py +9 -2
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/octahedral.py +59 -36
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/reduced_gaussian.py +8 -2
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py +8 -2
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/regular.py +8 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_type_change/datacube_type_change.py +76 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/tree_encoding.py +0 -1
- polytope_python-2.0.1/polytope_feature/engine/engine.py +43 -0
- polytope_python-2.0.1/polytope_feature/engine/hullslicer.py +156 -0
- polytope_python-2.0.1/polytope_feature/engine/optimised_point_in_polygon_slicer.py +119 -0
- polytope_python-2.0.1/polytope_feature/engine/optimised_quadtree_slicer.py +94 -0
- polytope_python-2.0.1/polytope_feature/engine/point_in_polygon_slicer.py +103 -0
- polytope_python-2.0.1/polytope_feature/engine/quadtree_slicer.py +65 -0
- polytope_python-2.0.1/polytope_feature/engine/slicing_tools.py +136 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/options.py +39 -7
- polytope_python-2.0.1/polytope_feature/polytope.py +218 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/shapes.py +70 -0
- polytope_python-2.0.1/polytope_feature/utility/engine_tools.py +31 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/utility/exceptions.py +7 -0
- polytope_python-2.0.1/polytope_python.egg-info/PKG-INFO +248 -0
- polytope_python-2.0.1/polytope_python.egg-info/SOURCES.txt +267 -0
- polytope_python-2.0.1/polytope_python.egg-info/requires.txt +19 -0
- polytope_python-2.0.1/pyproject.toml +98 -0
- polytope_python-2.0.1/rust/Cargo.toml +13 -0
- polytope_python-2.0.1/rust/src/healpix_nested.rs +273 -0
- polytope_python-2.0.1/rust/src/lambert_conformal.rs +224 -0
- polytope_python-2.0.1/rust/src/lib.rs +39 -0
- polytope_python-2.0.1/rust/src/list_tools.rs +20 -0
- polytope_python-2.0.1/rust/src/octahedral.rs +7979 -0
- polytope_python-2.0.1/rust/src/point_in_polygon.rs +102 -0
- polytope_python-2.0.1/rust/src/quadtree_mod.rs +352 -0
- polytope_python-2.0.1/rust/src/slicing_tools.rs +191 -0
- polytope_python-2.0.1/setup.py +40 -0
- polytope_python-2.0.1/tests/conftest.py +113 -0
- polytope_python-2.0.1/tests/fdb_data/schema +55 -0
- polytope_python-2.0.1/tests/helper_functions.py +54 -0
- polytope_python-2.0.1/tests/profiled_quadtree.profile +0 -0
- polytope_python-2.0.1/tests/quadtree_slicer_profiler.py +97 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_bad_request_error.py +0 -5
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_cyclic_axis_over_negative_vals.py +1 -1
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_cyclic_axis_slicer_not_0.py +0 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_cyclic_axis_slicing.py +0 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_cyclic_nearest.py +4 -9
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_cyclic_simple.py +0 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_cyclic_snapping.py +1 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_datacube_axes_init.py +1 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_datacube_xarray.py +2 -2
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_date_time_unmerged.py +0 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_ecmwf_oper_data_fdb.py +1 -11
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_engine_slicer.py +21 -25
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_fdb_datacube.py +0 -6
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_fdb_unmap_tree.py +0 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_float_type.py +1 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_healpix_mapper.py +1 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_healpix_nested_grid.py +1 -2
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_hullslicer_engine.py +2 -4
- polytope_python-2.0.1/tests/test_icon_grid_unstructured.py +109 -0
- polytope_python-2.0.1/tests/test_icon_grid_unstructured_fdb.py +104 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_incomplete_tree_fdb.py +1 -6
- polytope_python-2.0.1/tests/test_lambert_lam_grid_unstructured_fdb.py +113 -0
- polytope_python-2.0.1/tests/test_lambert_lam_grid_unstructured_fdb_optimised_quadtree.py +109 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_local_grid_cyclic.py +0 -6
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_local_regular_grid.py +0 -22
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_local_swiss_grid.py +0 -1
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_merge_octahedral_one_axis.py +1 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_merge_transformation.py +0 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_multiple_param_fdb.py +0 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_octahedral_grid.py +1 -4
- polytope_python-2.0.1/tests/test_orca_irregular_grid.py +94 -0
- polytope_python-2.0.1/tests/test_orca_irregular_grid_optimised_point_in_polygon.py +95 -0
- polytope_python-2.0.1/tests/test_orca_irregular_grid_point_in_polygon.py +94 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_override_md5_hash_options.py +0 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_point_nearest.py +9 -24
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_point_shape.py +1 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_point_union.py +0 -4
- polytope_python-2.0.1/tests/test_polytope_extract.py +56 -0
- polytope_python-2.0.1/tests/test_polytope_extract_fdb.py +95 -0
- polytope_python-2.0.1/tests/test_quad_tree.py +200 -0
- polytope_python-2.0.1/tests/test_quadtree_edge_cases.py +65 -0
- polytope_python-2.0.1/tests/test_quadtree_indices.py +115 -0
- polytope_python-2.0.1/tests/test_quadtree_optimisation.py +57 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_reduced_ll_grid.py +1 -1
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_regular_grid.py +1 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_regular_reduced_grid.py +7 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_request_tree.py +3 -65
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_request_trees_after_slicing.py +8 -10
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_reverse_transformation.py +1 -1
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_shapes.py +5 -10
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slice_date_range_fdb.py +21 -35
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slice_date_range_fdb_v2.py +0 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slice_fdb_box.py +0 -1
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slicer_engine.py +2 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slicer_era5.py +1 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slicer_xarray.py +1 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slicing_unsliceable_axis.py +13 -5
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slicing_xarray_3D.py +43 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_slicing_xarray_4D.py +1 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_snapping.py +1 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_snapping_real_data.py +8 -10
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_tree_protobuf_encoding.py +0 -3
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_tree_protobuf_encoding_fdb.py +0 -4
- polytope_python-2.0.1/tests/test_type_change_transformation.py +60 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_union_gj.py +0 -8
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_union_point_box.py +0 -4
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_wave_spectra_data.py +6 -3
- polytope_python-2.0.1/tox.ini +10 -0
- polytope_python-1.1.1/MANIFEST.in +0 -1
- polytope_python-1.1.1/PKG-INFO +0 -21
- polytope_python-1.1.1/polytope_feature/__init__.py +0 -1
- polytope_python-1.1.1/polytope_feature/engine/engine.py +0 -19
- polytope_python-1.1.1/polytope_feature/engine/hullslicer.py +0 -327
- polytope_python-1.1.1/polytope_feature/polytope.py +0 -78
- polytope_python-1.1.1/polytope_feature/version.py +0 -1
- polytope_python-1.1.1/polytope_python.egg-info/PKG-INFO +0 -21
- polytope_python-1.1.1/polytope_python.egg-info/SOURCES.txt +0 -117
- polytope_python-1.1.1/polytope_python.egg-info/not-zip-safe +0 -1
- polytope_python-1.1.1/polytope_python.egg-info/requires.txt +0 -8
- polytope_python-1.1.1/pyproject.toml +0 -8
- polytope_python-1.1.1/requirements.txt +0 -8
- polytope_python-1.1.1/setup.py +0 -29
- polytope_python-1.1.1/tests/test_type_change_transformation.py +0 -31
- {polytope_python-1.1.1 → polytope_python-2.0.1}/LICENSE +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/backends/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/datacube_axis.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/index_tree_pb2.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_cyclic/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_cyclic/datacube_cyclic.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_merger/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_merger/datacube_merger.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_reverse/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_reverse/datacube_reverse.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_transformations.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/datacube/transformations/datacube_type_change/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/engine/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/utility/__init__.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/utility/combinatorics.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/utility/geometry.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/utility/list_tools.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_feature/utility/profiling.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_python.egg-info/dependency_links.txt +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/polytope_python.egg-info/top_level.txt +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/setup.cfg +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_axis_mappers.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_combinatorics.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_datacube_mock.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_hull_slicer.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_mappers.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_merge_cyclic_octahedral.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_profiling_requesttree.py +0 -0
- {polytope_python-1.1.1 → polytope_python-2.0.1}/tests/test_tree_protobuf.py +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
dependencies: |
|
|
2
|
+
ecmwf/ecbuild
|
|
3
|
+
MathisRosenhauer/libaec@refs/tags/v1.1.3
|
|
4
|
+
ecmwf/eccodes
|
|
5
|
+
ecmwf/eckit@develop
|
|
6
|
+
ecmwf/metkit
|
|
7
|
+
ecmwf/fdb
|
|
8
|
+
ecmwf/gribjump
|
|
9
|
+
dependency_cmake_options: |
|
|
10
|
+
ecmwf/gribjump: "-DENABLE_FDB_BUILD_TOOLS=ON"
|
|
11
|
+
dependency_branch: develop
|
|
12
|
+
parallelism_factor: 8
|
|
13
|
+
self_build: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
build:
|
|
2
|
+
python: "3.10"
|
|
3
|
+
modules:
|
|
4
|
+
- ninja
|
|
5
|
+
- aec
|
|
6
|
+
dependencies:
|
|
7
|
+
- ecmwf/ecbuild@develop
|
|
8
|
+
- ecmwf/eccodes@develop
|
|
9
|
+
- ecmwf/eckit@develop
|
|
10
|
+
- ecmwf/metkit@develop
|
|
11
|
+
- ecmwf/fdb@develop
|
|
12
|
+
- ecmwf/gribjump@develop
|
|
13
|
+
dependency_cmake_options:
|
|
14
|
+
- "ecmwf/gribjump: '-DENABLE_FDB_BUILD_TOOLS=ON'"
|
|
15
|
+
- "ecmwf/fdb: '-DENABLE_LUSTRE=OFF'"
|
|
16
|
+
parallel: 64
|
|
17
|
+
env:
|
|
18
|
+
- ECCODES_SAMPLES_PATH=$ECCODES_DIR/share/eccodes/samples
|
|
19
|
+
- ECCODES_DEFINITION_PATH=$ECCODES_DIR/share/eccodes/definitions
|
|
20
|
+
pytest_cmd: |
|
|
21
|
+
python -m pytest -m 'not fdb' tests --cov=./ --cov-report=xml
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: cd
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '**'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pypi_binwheels:
|
|
10
|
+
uses: ecmwf/reusable-workflows/.github/workflows/cd-pypi-binwheel.yml@v2
|
|
11
|
+
secrets: inherit
|
|
12
|
+
with:
|
|
13
|
+
platforms: "['ubuntu-latest','macos-latest']"
|
|
14
|
+
pyversions: "['38','39','310','311','312']"
|
|
15
|
+
env_vars: |
|
|
16
|
+
{
|
|
17
|
+
"USE_RUST": "1",
|
|
18
|
+
"SETUPTOOLS_RUST_CARGO_PROFILE": "release"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
pypi_purepython:
|
|
22
|
+
needs: pypi_binwheels
|
|
23
|
+
uses: ecmwf/reusable-workflows/.github/workflows/cd-pypi.yml@v2
|
|
24
|
+
secrets: inherit
|
|
25
|
+
with:
|
|
26
|
+
env_vars: |
|
|
27
|
+
{
|
|
28
|
+
"USE_RUST": "0",
|
|
29
|
+
"SETUPTOOLS_RUST_CARGO_PROFILE": "release"
|
|
30
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Trigger the workflow on push to master or develop, except tag creation
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- "main"
|
|
8
|
+
- "develop"
|
|
9
|
+
tags-ignore:
|
|
10
|
+
- "**"
|
|
11
|
+
|
|
12
|
+
# Trigger the workflow on pull request
|
|
13
|
+
pull_request: ~
|
|
14
|
+
|
|
15
|
+
# Trigger the workflow manually
|
|
16
|
+
workflow_dispatch: ~
|
|
17
|
+
|
|
18
|
+
# Trigger after public PR approved for CI
|
|
19
|
+
pull_request_target:
|
|
20
|
+
types: [labeled]
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
# Run CI including downstream packages on self-hosted runners
|
|
24
|
+
downstream-ci:
|
|
25
|
+
name: downstream-ci
|
|
26
|
+
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
|
27
|
+
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci.yml@main
|
|
28
|
+
with:
|
|
29
|
+
polytope: ecmwf/polytope@${{ github.event.pull_request.head.sha || github.sha }}
|
|
30
|
+
# codecov_upload: true
|
|
31
|
+
python_qa: true
|
|
32
|
+
secrets: inherit
|
|
33
|
+
|
|
34
|
+
downstream-ci-hpc:
|
|
35
|
+
name: downstream-ci-hpc
|
|
36
|
+
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
|
37
|
+
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
|
|
38
|
+
with:
|
|
39
|
+
polytope: ecmwf/polytope@${{ github.event.pull_request.head.sha || github.sha }}
|
|
40
|
+
secrets: inherit
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
name: test-cd
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [ "main"]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pypi_binwheels:
|
|
10
|
+
uses: ecmwf/reusable-workflows/.github/workflows/cd-pypi-binwheel.yml@v2
|
|
11
|
+
secrets: inherit
|
|
12
|
+
with:
|
|
13
|
+
platforms: "['ubuntu-latest','macos-latest']"
|
|
14
|
+
pyversions: "['38','39','310','311','312']"
|
|
15
|
+
testpypi: true
|
|
16
|
+
env_vars: |
|
|
17
|
+
{
|
|
18
|
+
"USE_RUST": "1",
|
|
19
|
+
"SETUPTOOLS_RUST_CARGO_PROFILE": "release"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
pypi_purepython:
|
|
23
|
+
needs: pypi_binwheels
|
|
24
|
+
uses: ecmwf/reusable-workflows/.github/workflows/cd-pypi.yml@v2
|
|
25
|
+
secrets: inherit
|
|
26
|
+
with:
|
|
27
|
+
testpypi: true
|
|
28
|
+
env_vars: |
|
|
29
|
+
{
|
|
30
|
+
"USE_RUST": "0",
|
|
31
|
+
"SETUPTOOLS_RUST_CARGO_PROFILE": "release"
|
|
32
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
*.py[cod]
|
|
2
|
+
*.swp
|
|
3
|
+
*.grib
|
|
4
|
+
*.gif
|
|
5
|
+
*.html
|
|
6
|
+
*.req
|
|
7
|
+
*.prof
|
|
8
|
+
*.idx
|
|
9
|
+
*.grib
|
|
10
|
+
*.xml
|
|
11
|
+
*.pstats
|
|
12
|
+
*.profile
|
|
13
|
+
*.egg-info
|
|
14
|
+
*.json
|
|
15
|
+
*.txt
|
|
16
|
+
*.gz
|
|
17
|
+
|
|
18
|
+
.coverage
|
|
19
|
+
.mypy_cache
|
|
20
|
+
.vscode
|
|
21
|
+
.pytest_cache
|
|
22
|
+
|
|
23
|
+
__pycache__/
|
|
24
|
+
.ipynb_checkpoints/
|
|
25
|
+
|
|
26
|
+
_version.py
|
|
27
|
+
target/
|
|
28
|
+
dist/
|
|
29
|
+
build/
|
|
30
|
+
|
|
31
|
+
Cargo.lock
|
|
32
|
+
.DS_Store
|
|
33
|
+
|
|
34
|
+
site
|
|
35
|
+
example_eo
|
|
36
|
+
example_mri
|
|
37
|
+
new_test_venv_polytope
|
|
38
|
+
new_venv_polytope
|
|
39
|
+
new_polytope_venv
|
|
40
|
+
polytope_venv
|
|
41
|
+
polytope_venv_latest
|
|
42
|
+
new_updated_numpy_venv
|
|
43
|
+
newest-polytope-venv
|
|
44
|
+
serializedTree
|
|
45
|
+
new_polytope_venv
|
|
46
|
+
newest-polytope-venv
|
|
47
|
+
new_polytope_venv
|
|
48
|
+
polytope_feature/datacube/quadtree/target
|
|
49
|
+
venv_python3_11
|
|
50
|
+
venv_gj_iterator
|
|
51
|
+
*.json
|
|
52
|
+
venv_python3_11
|
|
53
|
+
*.txt
|
|
54
|
+
tests/data
|
|
55
|
+
venv_gj_iterator
|
|
56
|
+
target
|
|
57
|
+
rust_deployment_venv
|
|
58
|
+
*.so
|
|
59
|
+
*.nc
|
|
60
|
+
|
|
61
|
+
test_w_qubed
|
|
62
|
+
rust_venv
|
|
63
|
+
new_rust_test_venv
|
|
64
|
+
*.so
|
|
65
|
+
rust_deployment_venv
|
|
66
|
+
*.lock
|
|
67
|
+
**/target
|
|
68
|
+
**/build
|
|
69
|
+
_version.py
|
|
70
|
+
*.DS_Store
|
|
71
|
+
icon_grids
|
|
72
|
+
rust_venv
|
|
73
|
+
test_w_qubed
|
|
74
|
+
performance_plots_qubed
|
|
75
|
+
*.nc
|
|
76
|
+
**/*venv*
|
|
77
|
+
|
|
78
|
+
icon_grids
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pycqa/isort
|
|
3
|
+
rev: 5.13.2
|
|
4
|
+
hooks:
|
|
5
|
+
- id: isort
|
|
6
|
+
name: isort (python)
|
|
7
|
+
|
|
8
|
+
- repo: https://github.com/psf/black
|
|
9
|
+
rev: 24.8.0 # Use the latest version of black
|
|
10
|
+
hooks:
|
|
11
|
+
- id: black
|
|
12
|
+
|
|
13
|
+
- repo: https://github.com/pycqa/flake8
|
|
14
|
+
rev: 7.1.1 # Use the latest version of flake8
|
|
15
|
+
hooks:
|
|
16
|
+
- id: flake8
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Read the Docs configuration file for MkDocs projects
|
|
2
|
+
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# Required
|
|
7
|
+
|
|
8
|
+
version: 2
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Set the version of Python and other tools you might need
|
|
12
|
+
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
os: ubuntu-22.04
|
|
16
|
+
|
|
17
|
+
tools:
|
|
18
|
+
|
|
19
|
+
python: "3.12"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
mkdocs:
|
|
23
|
+
|
|
24
|
+
configuration: mkdocs.yml
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# Optionally declare the Python requirements required to build your docs
|
|
28
|
+
|
|
29
|
+
python:
|
|
30
|
+
|
|
31
|
+
install:
|
|
32
|
+
|
|
33
|
+
- requirements: docs/requirements.txt
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Acknowledgements
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
Destination Earth
|
|
5
|
+
This software is developed with co-funding by the European Union under the Destination Earth initiative.
|
|
6
|
+
|
|
7
|
+
LEXIS
|
|
8
|
+
This software is part of a project that has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 825532.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Contributing to *polytope*
|
|
2
|
+
========================================
|
|
3
|
+
|
|
4
|
+
Please report bug_ reports or pull-requests_ on GitHub_
|
|
5
|
+
|
|
6
|
+
.. _bug: https://github.com/ecmwf/polytope/issues
|
|
7
|
+
|
|
8
|
+
.. _pull-requests: https://github.com/ecmwf/polytope/pulls
|
|
9
|
+
|
|
10
|
+
.. _GitHub: https://github.com/ecmwf/polytope
|
|
11
|
+
|
|
12
|
+
We want your feedback, please e-mail: user-services@ecmwf.int
|
|
13
|
+
|
|
14
|
+
The package is installed from PyPI with::
|
|
15
|
+
|
|
16
|
+
$ pip install polytope-python
|
|
17
|
+
|
|
18
|
+
How you could use polytope:
|
|
19
|
+
* plot outputs, examples are provided in the examples folder
|
|
20
|
+
* go further than our examples and let us know how it goes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
testk:
|
|
2
|
+
python3 -m pytest -vsrA tests/* -k $(filter-out $@, $(MAKECMDGOALS)) -W ignore::DeprecationWarning -W ignore::FutureWarning --log-cli-level=DEBUG
|
|
3
|
+
|
|
4
|
+
testx:
|
|
5
|
+
python3 -m pytest -vsx tests/* -W ignore::DeprecationWarning -W ignore::FutureWarning --log-cli-level=DEBUG
|
|
6
|
+
|
|
7
|
+
test:
|
|
8
|
+
python3 -m pytest -vsrA tests/* -W ignore::DeprecationWarning -W ignore::FutureWarning --log-cli-level=DEBUG
|
|
9
|
+
|
|
10
|
+
examples:
|
|
11
|
+
python3 -m pytest -vsrA examples/* -W ignore::DeprecationWarning -W ignore::FutureWarning --log-cli-level=DEBUG
|
|
12
|
+
|
|
13
|
+
performance:
|
|
14
|
+
python3 -m pytest -vsrA performance/* -W ignore::DeprecationWarning -W ignore::FutureWarning --log-cli-level=DEBUG
|
|
15
|
+
|
|
16
|
+
docs:
|
|
17
|
+
mkdocs build
|
|
18
|
+
mkdocs serve
|
|
19
|
+
|
|
20
|
+
.PHONY: init test docs
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: polytope-python
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: Polytope datacube feature extraction library
|
|
5
|
+
Author-email: "European Centre for Medium-Range Weather Forecasts (ECMWF)" <software.support@ecmwf.int>
|
|
6
|
+
Maintainer-email: James Hawkes <James.Hawkes@ecmwf.int>, Mathilde Leuridan <Mathilde.Leuridan@ecmwf.int>
|
|
7
|
+
License: Apache License Version 2.0
|
|
8
|
+
Project-URL: repository, https://github.com/ecmwf/polytope
|
|
9
|
+
Project-URL: documentation, https://polytope.readthedocs.io/en/latest/
|
|
10
|
+
Project-URL: issues, https://github.com/ecmwf/polytope/issues
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Natural Language :: English
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Requires-Python: >3.8
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: numpy>=1.26
|
|
27
|
+
Requires-Dist: pandas
|
|
28
|
+
Requires-Dist: scipy
|
|
29
|
+
Requires-Dist: sortedcontainers
|
|
30
|
+
Requires-Dist: tripy
|
|
31
|
+
Requires-Dist: xarray
|
|
32
|
+
Requires-Dist: conflator
|
|
33
|
+
Requires-Dist: protobuf
|
|
34
|
+
Provides-Extra: tests
|
|
35
|
+
Requires-Dist: pytest; extra == "tests"
|
|
36
|
+
Requires-Dist: pytest-cov; extra == "tests"
|
|
37
|
+
Requires-Dist: cffi; extra == "tests"
|
|
38
|
+
Requires-Dist: eccodes; extra == "tests"
|
|
39
|
+
Requires-Dist: h5netcdf; extra == "tests"
|
|
40
|
+
Requires-Dist: h5py; extra == "tests"
|
|
41
|
+
Requires-Dist: earthkit-data; extra == "tests"
|
|
42
|
+
Requires-Dist: matplotlib; extra == "tests"
|
|
43
|
+
Requires-Dist: pyfdb; extra == "tests"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
<h3 align="center">
|
|
48
|
+
<img src="./docs/images/polytope_logo_new_animated_AdobeExpress_3.gif" width=60%>
|
|
49
|
+
</br>
|
|
50
|
+
|
|
51
|
+
</h3>
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<a href="https://github.com/ecmwf/codex/raw/refs/heads/main/Project%20Maturity">
|
|
55
|
+
<img src="https://github.com/ecmwf/codex/raw/refs/heads/main/Project%20Maturity/incubating_badge.svg" alt="Project Maturity">
|
|
56
|
+
</a>
|
|
57
|
+
<a href="https://github.com/ecmwf/codex/raw/refs/heads/main/ESEE"> <img src="https://github.com/ecmwf/codex/raw/refs/heads/main/ESEE/data_provision_badge.svg" alt="ESEE">
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
<p align="center">
|
|
61
|
+
<a href="https://github.com/ecmwf/polytope/actions/workflows/downstream-ci.yml">
|
|
62
|
+
<img src="https://github.com/ecmwf/polytope/actions/workflows/downstream-ci.yml/badge.svg" alt="ci">
|
|
63
|
+
</a>
|
|
64
|
+
<a href="https://codecov.io/gh/ecmwf/polytope"><img src="https://codecov.io/gh/ecmwf/polytope/branch/develop/graph/badge.svg"></a>
|
|
65
|
+
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a>
|
|
66
|
+
<a href="https://github.com/ecmwf/polytope/releases"><img src="https://img.shields.io/github/v/release/ecmwf/polytope?color=blue&label=Release&style=flat-square"></a>
|
|
67
|
+
<a href='https://polytope.readthedocs.io/en/latest/?badge=latest'><img src='https://readthedocs.org/projects/polytope/badge/?version=latest' alt='Documentation Status' /></a>
|
|
68
|
+
</p>
|
|
69
|
+
<p align="center">
|
|
70
|
+
<a href="#concept">Concept</a> •
|
|
71
|
+
<a href="#installation">Installation</a> •
|
|
72
|
+
<a href="#example">Example</a> •
|
|
73
|
+
<a href="#testing">Testing</a> •
|
|
74
|
+
<a href="https://polytope.readthedocs.io/en/latest/">Documentation</a>
|
|
75
|
+
</p>
|
|
76
|
+
|
|
77
|
+
Polytope is a library for extracting complex data from datacubes. It provides an API for non-orthogonal access to data, where the stencil used to extract data from the datacube can be any arbitrary *n*-dimensional polygon (called a *polytope*). This can be used to efficiently extract complex features from a datacube, such as polygon regions or spatio-temporal paths.
|
|
78
|
+
|
|
79
|
+
Polytope is designed to extend different datacube backends:
|
|
80
|
+
* XArray dataarrays
|
|
81
|
+
* FDB object stores (through the GribJump software)
|
|
82
|
+
|
|
83
|
+
Polytope supports datacubes which have branching, non-uniform indexing, and even cyclic axes. If the datacube backend supports byte-addressability and efficient random access (either in-memory or direct from storage), **Polytope** can be used to dramatically decrease overall I/O load.
|
|
84
|
+
|
|
85
|
+
> \[!IMPORTANT\]
|
|
86
|
+
> This software is **Incubating** and subject to ECMWF's guidelines on [Software Maturity](https://github.com/ecmwf/codex/raw/refs/heads/main/Project%20Maturity).
|
|
87
|
+
|
|
88
|
+
<!-- > [!WARNING]
|
|
89
|
+
> This project is BETA and will be experimental for the foreseeable future. Interfaces and functionality are likely to change, and the project itself may be scrapped. DO NOT use this software in any project/software that is operational. -->
|
|
90
|
+
|
|
91
|
+
## Concept
|
|
92
|
+
|
|
93
|
+
Polytope is designed to enable extraction of arbitrary extraction of data from a datacube. Instead of the typical range-based bounding-box approach, Polytope can extract any shape of data from a datacube using a "polytope" (*n*-dimensional polygon) stencil.
|
|
94
|
+
|
|
95
|
+
<p align="center">
|
|
96
|
+
<img src="./docs/Algorithm/Overview/images_overview/ecmwf_polytope.png" alt="Polytope Concept" width="450"/>
|
|
97
|
+
</p>
|
|
98
|
+
|
|
99
|
+
The Polytope algorithm can for example be used to extract:
|
|
100
|
+
|
|
101
|
+
- 2D cut-outs, such as country cut-outs, from a datacube
|
|
102
|
+
<p align="center">
|
|
103
|
+
<img src="./docs/images/greece.png" alt="Greece cut-out" width="250"/>
|
|
104
|
+
</p>
|
|
105
|
+
|
|
106
|
+
- timeseries from a datacube
|
|
107
|
+
<p align="center">
|
|
108
|
+
<img src="./docs/images/timeseries.png" alt="Timeseries" width="350"/>
|
|
109
|
+
</p>
|
|
110
|
+
|
|
111
|
+
- more complicated spatio-temporal paths, such as flight paths, from a datacube
|
|
112
|
+
<p align="center">
|
|
113
|
+
<img src="./docs/images/flight_path.png" alt="Flight path" width="350"/>
|
|
114
|
+
</p>
|
|
115
|
+
|
|
116
|
+
- and many more high-dimensional shapes in arbitrary dimensions...
|
|
117
|
+
|
|
118
|
+
For more information about the Polytope algorithm, refer to our [paper](https://arxiv.org/abs/2306.11553).
|
|
119
|
+
If this project is useful for your work, please consider citing this paper.
|
|
120
|
+
|
|
121
|
+
## Installation
|
|
122
|
+
|
|
123
|
+
Install the polytope software with Python 3 (>=3.7) from GitHub directly with the command
|
|
124
|
+
|
|
125
|
+
python3 -m pip install git+ssh://git@github.com/ecmwf/polytope.git@develop
|
|
126
|
+
|
|
127
|
+
or from PyPI with the command
|
|
128
|
+
|
|
129
|
+
python3 -m pip install polytope-python
|
|
130
|
+
|
|
131
|
+
## Example
|
|
132
|
+
|
|
133
|
+
Here is a step-by-step example of how to use this software.
|
|
134
|
+
|
|
135
|
+
1. In this example, we first specify the data which will be in our Xarray datacube. Note that the data here comes from the GRIB file called "winds.grib", which is 3-dimensional with dimensions: step, latitude and longitude.
|
|
136
|
+
```Python
|
|
137
|
+
import xarray as xr
|
|
138
|
+
|
|
139
|
+
array = xr.open_dataset("winds.grib", engine="cfgrib")
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
We then construct the Polytope object, passing in some additional metadata describing properties of the longitude axis.
|
|
143
|
+
```Python
|
|
144
|
+
options = {"longitude": {"cyclic": [0, 360.0]}}
|
|
145
|
+
|
|
146
|
+
from polytope_feature.polytope import Polytope
|
|
147
|
+
|
|
148
|
+
p = Polytope(datacube=array, axis_options=options)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
2. Next, we create a request shape to extract from the datacube.
|
|
152
|
+
In this example, we want to extract a simple 2D box in latitude and longitude at step 0. We thus create the two relevant shapes we need to build this 3-dimensional object,
|
|
153
|
+
```Python
|
|
154
|
+
import numpy as np
|
|
155
|
+
from polytope_feature.shapes import Box, Select
|
|
156
|
+
|
|
157
|
+
box = Box(["latitude", "longitude"], [0, 0], [1, 1])
|
|
158
|
+
step_point = Select("step", [np.timedelta64(0, "s")])
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
which we then incorporate into a Polytope request.
|
|
162
|
+
```Python
|
|
163
|
+
from polytope_feature.polytope import Request
|
|
164
|
+
|
|
165
|
+
request = Request(box, step_point)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
3. Finally, extract the request from the datacube.
|
|
169
|
+
```Python
|
|
170
|
+
result = p.retrieve(request)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The result is stored as an IndexTree containing the retrieved data organised hierarchically with axis indices for each point.
|
|
174
|
+
```Python
|
|
175
|
+
result.pprint()
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
Output IndexTree:
|
|
179
|
+
|
|
180
|
+
↳root=None
|
|
181
|
+
↳step=0 days 00:00:00
|
|
182
|
+
↳latitude=0.0
|
|
183
|
+
↳longitude=0.0
|
|
184
|
+
↳longitude=1.0
|
|
185
|
+
↳latitude=1.0
|
|
186
|
+
↳longitude=0.0
|
|
187
|
+
↳longitude=1.0
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Testing
|
|
191
|
+
|
|
192
|
+
#### Additional Dependencies
|
|
193
|
+
|
|
194
|
+
The Polytope tests and examples require additional Python packages compared to the main Polytope algorithm.
|
|
195
|
+
The additional dependencies are provided in the requirements_test.txt and requirements_examples.txt files, which can respectively be found in the tests and examples folders.
|
|
196
|
+
Moreover, Polytope's tests and examples also require the installation of eccodes and GDAL.
|
|
197
|
+
It is possible to install both of these dependencies using either a package manager or manually.
|
|
198
|
+
|
|
199
|
+
## Contributing
|
|
200
|
+
|
|
201
|
+
The main repository is hosted on GitHub; testing, bug reports and contributions are highly welcomed and appreciated.
|
|
202
|
+
Please see the [Contributing](./CONTRIBUTING.rst) document for the best way to help.
|
|
203
|
+
|
|
204
|
+
Main contributors:
|
|
205
|
+
|
|
206
|
+
- Mathilde Leuridan - [ECMWF](https://www.ecmwf.int)
|
|
207
|
+
- James Hawkes - [ECMWF](https://www.ecmwf.int)
|
|
208
|
+
- Simon Smart - [ECMWF](www.ecmwf.int)
|
|
209
|
+
- Emanuele Danovaro - [ECMWF](www.ecmwf.int)
|
|
210
|
+
- Tiago Quintino - [ECMWF](www.ecmwf.int)
|
|
211
|
+
|
|
212
|
+
See also the [contributors](https://github.com/ecmwf/polytope/contributors) for a more complete list.
|
|
213
|
+
|
|
214
|
+
## License
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
Copyright 2021 European Centre for Medium-Range Weather Forecasts (ECMWF)
|
|
218
|
+
|
|
219
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
220
|
+
you may not use this file except in compliance with the License.
|
|
221
|
+
You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).
|
|
222
|
+
|
|
223
|
+
Unless required by applicable law or agreed to in writing, software
|
|
224
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
225
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
226
|
+
See the License for the specific language governing permissions and
|
|
227
|
+
limitations under the License.
|
|
228
|
+
|
|
229
|
+
In applying this licence, ECMWF does not waive the privileges and immunities
|
|
230
|
+
granted to it by virtue of its status as an intergovernmental organisation nor
|
|
231
|
+
does it submit to any jurisdiction.
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Citing
|
|
235
|
+
|
|
236
|
+
If this software is useful in your work, please consider citing our paper as
|
|
237
|
+
|
|
238
|
+
> Leuridan, M., Hawkes, J., Smart, S., Danovaro, E., and Quintino, T., [“Polytope: An Algorithm for Efficient Feature Extraction on Hypercubes”](https://arxiv.org/abs/2306.11553), <i>arXiv e-prints</i>, 2023. doi:10.48550/arXiv.2306.11553.
|
|
239
|
+
|
|
240
|
+
Other papers include:
|
|
241
|
+
|
|
242
|
+
> Leuridan, M., Bradley, C., Hawkes, J., Quintino, T., & Schultz, M. (2025, June). [Performance Analysis of an Efficient Algorithm for Feature Extraction from Large Scale Meteorological Data Stores.](https://dl.acm.org/doi/abs/10.1145/3732775.3733573) In Proceedings of the Platform for Advanced Scientific Computing Conference (pp. 1-9).
|
|
243
|
+
|
|
244
|
+
## Acknowledgements
|
|
245
|
+
|
|
246
|
+
Past and current funding and support for **Polytope** is listed in the adjoining [Acknowledgements](./ACKNOWLEDGEMENTS.rst).
|
|
247
|
+
|
|
248
|
+
|