Open-EO / Open-EO/openeo-python-client
warnings during tests
Open
Nobody has claimed this yet.
clean up
good first issue
help wanted
low hanging fruit
technical debt
- Dominant language
- Python
- Stars
- 217
- Forks
- 56
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
current tests trigger 181 warnings:
=============================== warnings summary ===============================
tests/rest/test_conversions.py:4
src/openeo/openeo-python-client/tests/rest/test_conversions.py:4: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
from pandas.util.testing import assert_frame_equal, assert_series_equal
tests/test_metadata.py: 5 warnings
tests/rest/test_connection.py: 5 warnings
tests/rest/test_imagecollectionclient.py: 5 warnings
tests/rest/test_job.py: 10 warnings
tests/rest/test_udp.py: 5 warnings
tests/rest/datacube/test_datacube.py: 38 warnings
tests/rest/datacube/test_datacube100.py: 20 warnings
src/openeo/openeo-python-client/openeo/metadata.py:255: UserWarning: No cube:dimensions metadata
complain("No cube:dimensions metadata")
tests/test_metadata.py::test_metadata_bands_dimension_eo_bands[spec0]
tests/test_metadata.py::test_metadata_bands_dimension_eo_bands[spec1]
tests/rest/test_connection.py::test_load_collection_arguments_040
tests/rest/test_connection.py::test_load_collection_arguments_100
src/openeo/openeo-python-client/openeo/metadata.py:298: UserWarning: Assuming name 'bands' for anonymous band dimension.
complain("Assuming name 'bands' for anonymous band dimension.")
tests/api/test_process.py: 7 warnings
tests/rest/test_udp.py: 10 warnings
tests/rest/datacube/test_datacube100.py: 5 warnings
tests/rest/datacube/test_zonal_stats.py: 1 warning
src/openeo/openeo-python-client/openeo/api/process.py:20: UserWarning: Parameter without description: using name as description.
warnings.warn("Parameter without description: using name as description.")
tests/rest/test_job.py::test_download_result_040
src/openeo/openeo-python-client/tests/rest/test_job.py:392: UserDeprecationWarning: Call to deprecated method list_results. (Use `~BatchJob.get_results` instead.) -- Deprecated since version 0.4.10.
assert job.list_results() == {'links': [{'href': 'https://oeo.test/dl/jjr1.tiff'}]}
tests/rest/test_job.py::test_download_results_040
src/openeo/openeo-python-client/tests/rest/test_job.py:508: UserDeprecationWarning: Call to deprecated method download_results. (Instead use `BatchJob.get_results` and the more flexible download functionality of `JobResults`) -- Deprecated since version 0.4.10.
downloads = job.download_results(target)
tests/rest/test_job.py::test_download_results_040
tests/rest/test_job.py::test_download_results
src/openeo/openeo-python-client/openeo/rest/job.py:125: UserDeprecationWarning: Call to deprecated method get_result. (Use `BatchJob.get_results` instead.) -- Deprecated since version 0.4.10.
return self.get_result().download_files(target)
tests/rest/test_job.py::test_download_results_040
tests/rest/test_job.py::test_download_results
tests/rest/test_job_results.py::test_load_json
tests/rest/test_job_results.py::test_load_json_040
tests/rest/test_job_results.py::test_load_bytes
tests/rest/test_job_results.py::test_load_bytes_040
src/openeo/openeo-python-client/openeo/rest/job.py:129: UserDeprecationWarning: Call to deprecated class _Result. (Use `JobResults` instead) -- Deprecated since version 0.4.10.
return _Result(self)
tests/rest/test_job.py::test_download_results
src/openeo/openeo-python-client/tests/rest/test_job.py:524: UserDeprecationWarning: Call to deprecated method download_results. (Instead use `BatchJob.get_results` and the more flexible download functionality of `JobResults`) -- Deprecated since version 0.4.10.
downloads = job.download_results(target)
tests/rest/test_job.py::test_list_results
src/openeo/openeo-python-client/tests/rest/test_job.py:536: UserDeprecationWarning: Call to deprecated method list_results. (Use `~BatchJob.get_results` instead.) -- Deprecated since version 0.4.10.
assert job.list_results() == {"type": "Feature", 'assets': {
tests/rest/test_job_results.py::test_load_json
src/openeo/openeo-python-client/tests/rest/test_job_results.py:25: UserDeprecationWarning: Call to deprecated method get_result. (Use `BatchJob.get_results` instead.) -- Deprecated since version 0.4.10.
json = con100.job('1').get_result().load_json()
tests/rest/test_job_results.py::test_load_json_040
src/openeo/openeo-python-client/tests/rest/test_job_results.py:34: UserDeprecationWarning: Call to deprecated method get_result. (Use `BatchJob.get_results` instead.) -- Deprecated since version 0.4.10.
json = session040.job('1').get_result().load_json()
tests/rest/test_job_results.py::test_load_bytes
src/openeo/openeo-python-client/tests/rest/test_job_results.py:43: UserDeprecationWarning: Call to deprecated method get_result. (Use `BatchJob.get_results` instead.) -- Deprecated since version 0.4.10.
content = con100.job('1').get_result().load_bytes()
tests/rest/test_job_results.py::test_load_bytes_040
src/openeo/openeo-python-client/tests/rest/test_job_results.py:52: UserDeprecationWarning: Call to deprecated method get_result. (Use `BatchJob.get_results` instead.) -- Deprecated since version 0.4.10.
content = session040.job('1').get_result().load_bytes()
tests/rest/test_udp.py::test_store_simple
tests/rest/test_udp.py::test_store_full
src/openeo/openeo-python-client/openeo/rest/connection.py:866: UserWarning: Defining user-defined process 'two' without parameters
warnings.warn("Defining user-defined process {u!r} without parameters".format(u=user_defined_process_id))
tests/rest/test_udp.py::test_store_collision
src/openeo/openeo-python-client/venv/lib/python3.9/site-packages/_pytest/python.py:195: PytestRemovedIn8Warning: Passing None has been deprecated.
See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases.
result = testfunction(**testargs)
tests/rest/test_udp.py::test_store_with_parameter[parameters4-expected_parameters4]
tests/rest/test_udp.py::test_store_with_parameter[None-expected_parameters5]
src/openeo/openeo-python-client/openeo/rest/connection.py:866: UserWarning: Defining user-defined process 'increment' without parameters
warnings.warn("Defining user-defined process {u!r} without parameters".format(u=user_defined_process_id))
tests/rest/test_udp.py::test_update
src/openeo/openeo-python-client/tests/rest/test_udp.py:209: UserDeprecationWarning: Call to deprecated method update. (Use `store` instead. Method `update` is misleading: OpenEO API does not provide (partial) updates of user-defined processes, only fully overwriting 'store' operations.) -- Deprecated since version 0.4.11.
udp.update(process_graph=updated_udp['process_graph'], parameters=updated_udp['parameters'])
tests/rest/test_udp.py::test_make_public
src/openeo/openeo-python-client/tests/rest/test_udp.py:228: UserDeprecationWarning: Call to deprecated method update. (Use `store` instead. Method `update` is misleading: OpenEO API does not provide (partial) updates of user-defined processes, only fully overwriting 'store' operations.) -- Deprecated since version 0.4.11.
udp.update(process_graph=updated_udp['process_graph'], parameters=updated_udp['parameters'], public=True)
tests/rest/datacube/test_bandmath.py::test_ndvi_reduce_bands_udf[1.0.0]
src/openeo/openeo-python-client/tests/rest/datacube/test_bandmath.py:136: UserDeprecationWarning: Call to deprecated method reduce_bands_udf. (Use `reduce_bands` with `UDF` as reducer.) -- Deprecated since version 0.13.0.
ndvi_coverage = s2_radio.reduce_bands_udf("def myfunction(tile):\n print(tile)\n return tile")
tests/rest/datacube/test_bandmath.py::test_ndvi_reduce_bands_udf_legacy_v100
src/openeo/openeo-python-client/tests/rest/datacube/test_bandmath.py:145: UserDeprecationWarning: Call to deprecated method reduce_bands_udf. (Use `reduce_bands` with `UDF` as reducer.) -- Deprecated since version 0.13.0.
ndvi_coverage = s2_radio.reduce_bands_udf("def myfunction(tile):\n print(tile)\n return tile")
tests/rest/datacube/test_datacube.py::test_date_range_filter
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube.py:63: DeprecationWarning: Call to deprecated method date_range_filter. (Use `filter_temporal()` instead)
im = s2cube.date_range_filter("2016-01-01", "2016-03-10")
tests/rest/datacube/test_datacube.py::test_filter_daterange
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube.py:71: DeprecationWarning: Call to deprecated method filter_daterange. (Use `filter_temporal()` instead)
im = s2cube.filter_daterange(extent=("2016-01-01", "2016-03-10"))
tests/rest/datacube/test_datacube.py::test_bbox_filter_nsew
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube.py:264: DeprecationWarning: Call to deprecated method bbox_filter. (Use `filter_bbox()` instead.)
im = s2cube.bbox_filter(
tests/rest/datacube/test_datacube.py::test_bbox_filter_tblr
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube.py:277: DeprecationWarning: Call to deprecated method bbox_filter. (Use `filter_bbox()` instead.)
im = s2cube.bbox_filter(
tests/rest/datacube/test_datacube.py::test_bbox_filter_nsew_zero
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube.py:290: DeprecationWarning: Call to deprecated method bbox_filter. (Use `filter_bbox()` instead.)
im = s2cube.bbox_filter(
tests/rest/datacube/test_datacube.py::test_reduce_temporal_udf[1.0.0]
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube.py:315: UserDeprecationWarning: Call to deprecated method reduce_temporal_udf. (Use `reduce_temporal` with `UDF` as reducer) -- Deprecated since version 0.13.0.
im = s2cube.reduce_temporal_udf("my custom code")
tests/rest/datacube/test_datacube.py::test_merge[1.0.0]
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube.py:397: UserDeprecationWarning: Call to deprecated method `merge`, use `merge_cubes` instead.
merged = s2cube.ndvi().merge(s2cube)
tests/rest/datacube/test_datacube100.py: 3 warnings
tests/rest/datacube/test_zonal_stats.py: 8 warnings
src/openeo/openeo-python-client/openeo/rest/datacube.py:460: UserWarning: Deprecated argument order usage: `filter_bbox(west, east, north, south)`. Use keyword arguments or tuple/list argument instead.
warnings.warn("Deprecated argument order usage: `filter_bbox(west, east, north, south)`."
tests/rest/datacube/test_datacube100.py::test_merge_cubes
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube100.py:549: UserDeprecationWarning: Call to deprecated method `merge`, use `merge_cubes` instead.
c = a.merge(b)
tests/rest/datacube/test_datacube100.py::test_merge_cubes_context
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube100.py:563: UserDeprecationWarning: Call to deprecated method `merge`, use `merge_cubes` instead.
c = a.merge(b, context={"foo": 867})
tests/rest/datacube/test_datacube100.py::test_load_collection_properties_process_builder_function
tests/rest/datacube/test_datacube100.py::test_load_collection_properties_process_builder_method_and_math
tests/rest/datacube/test_datacube100.py::test_load_collection_max_cloud_cover_with_other_properties
src/openeo/openeo-python-client/openeo/rest/connection.py:1004: UserWarning: S2 property filtering with properties that are undefined in the collection metadata (summaries): eo:cloud_cover, platform.
return DataCube.load_collection(
tests/rest/datacube/test_datacube100.py::test_load_collection_max_cloud_cover
src/openeo/openeo-python-client/openeo/rest/connection.py:1004: UserWarning: S2 property filtering with properties that are undefined in the collection metadata (summaries): eo:cloud_cover.
return DataCube.load_collection(
tests/rest/datacube/test_datacube100.py::test_save_user_defined_process
tests/rest/datacube/test_datacube100.py::test_save_user_defined_process_public
src/openeo/openeo-python-client/openeo/rest/connection.py:866: UserWarning: Defining user-defined process 'my_udp' without parameters
warnings.warn("Defining user-defined process {u!r} without parameters".format(u=user_defined_process_id))
tests/rest/datacube/test_datacube100.py::TestUDF::test_simple_apply_dimension_udf_legacy
src/openeo/openeo-python-client/tests/rest/datacube/test_datacube100.py:2668: UserDeprecationWarning: Specifying UDF code through `code`, `runtime` and `version` arguments is deprecated. Instead create an `openeo.UDF` object and pass that to the `process` argument.
res = cube.apply_dimension(code=udf_code, runtime="Python", dimension="t")
tests/rest/datacube/test_processbuilder.py::test_load_collection_properties_eq_process
tests/rest/datacube/test_processbuilder.py::test_load_collection_properties_eq_operator
tests/rest/datacube/test_processbuilder.py::test_load_collection_properties_neq_process
tests/rest/datacube/test_processbuilder.py::test_load_collection_properties_neq_operator
src/openeo/openeo-python-client/openeo/rest/connection.py:1004: UserWarning: S2 property filtering with properties that are undefined in the collection metadata (summaries): provider.
return DataCube.load_collection(
tests/rest/datacube/test_zonal_stats.py::test_polygon_timeseries_polygon[1.0.0]
src/openeo/openeo-python-client/tests/rest/datacube/test_zonal_stats.py:14: UserDeprecationWarning: Call to deprecated method polygonal_mean_timeseries. (Use `aggregate_spatial` with reducer ``'mean'``.) -- Deprecated since version 0.10.0.
connection
tests/rest/datacube/test_zonal_stats.py::test_polygon_timeseries_path[1.0.0]
src/openeo/openeo-python-client/tests/rest/datacube/test_zonal_stats.py:37: UserDeprecationWarning: Call to deprecated method polygonal_mean_timeseries. (Use `aggregate_spatial` with reducer ``'mean'``.) -- Deprecated since version 0.10.0.
connection.load_collection('S2')
tests/udf/test_run_code.py::test_execute_local_udf_basic
tests/udf/test_run_code.py::test_execute_local_udf_basic
tests/udf/test_run_code.py::test_run_local_udf_from_file_json
tests/udf/test_run_code.py::test_run_local_udf_from_file_json
tests/udf/test_run_code.py::test_run_local_udf_from_file_netcdf
tests/udf/test_run_code.py::test_run_local_udf_from_file_netcdf
src/openeo/openeo-python-client/venv/lib/python3.9/site-packages/xarray/core/dataarray.py:3049: PendingDeprecationWarning: dropping variables using `drop` will be deprecated; using drop_vars is encouraged.
ds = self._to_temp_dataset().drop(labels, dim, errors=errors, **labels_kwargs)
tests/udf/test_run_code.py::test_run_local_udf_from_file_netcdf
<frozen importlib._bootstrap>:228: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 16 from C header, got 96 from PyObject
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============== 1355 passed, 33 skipped, 181 warnings in 13.04s ================
It would be good to eliminate some low hanging fruit here I guess
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the affected tests listed in the warning summary and group the 181 warnings by source, including tests/rest/test_conversions.py, tests/rest/test_job.py, openeo/metadata.py, openeo/api/process.py, openeo/rest/job.py, and openeo/rest/datacube.py. Done means the test run no longer produces the warnings targeted by this issue, with the relevant tests still passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100