VForWaTer / metacatalog

Modular metadata management platform for environmental data.
https://vforwater.github.io/metacatalog
GNU General Public License v3.0
3 stars 1 forks source link

pytest FutureWarning and DeprecationWarning #216

Closed AlexDo1 closed 1 year ago

AlexDo1 commented 1 year ago

At the moment, tests result in 2 warnings, which should be resolved: FutureWarning:

metacatalog/test/test_models_data.py::test_data_crud_operations
  /home/alexander/Github/metacatalog/metacatalog/test/test_models_data.py:99: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
    all_data = timeseries.append(new_chunk)

DeprecationWarning

metacatalog/test/test_export_extension.py::test_export_extension
  /home/alexander/anaconda3/lib/python3.9/site-packages/dicttoxml.py:235: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    elif isinstance(val, collections.Iterable):

@mmaelicke The collections warning (the second one) could explain why Elnaz has problems with the installation of metacatalog, as she uses Python 3.10, where the DeprecationWarning comes into effect.

mmaelicke commented 1 year ago

The DeprecationWarning is caused by the dicttoxml package. That is used in the export extension, to create simple, non-ISO 19115 XML files of an Entry. If the Warning is not fixed there, we need to replace the package or disable this export function in Python 3.10. However, currently, the unittests do not fail for 3.10, so we need to check if the export extension is actually covered.