bokulich-lab / q2-fondue

Functions for reproducibly Obtaining and Normalizing Data re-Used from Elsewhere
BSD 3-Clause "New" or "Revised" License
20 stars 6 forks source link

Deprecated pandas usage in `get-all` and in `get-ids-from-query` #160

Closed adamovanja closed 11 months ago

adamovanja commented 11 months ago

Pandas removed DataFrame.append and the squeeze parameter from pd.read_csv as of v2.0 (source). Consequently, the methods get-all and get-ids-from-query both fail with the current minimal conda installation instructions (using q2-fondue from the channel "https://packages.qiime2.org/qiime2/2023.2/tested/" and pandas v2.0.3).

The following error occurs when running get-all:

AttributeError: 'DataFrame' object has no attribute 'append'

And when running get-ids-from-query this error occurs:

TypeError: read_csv() got an unexpected keyword argument 'squeeze'

Note: When using q2-fondue from the channels "2023.5/tested" or "2023.7/tested" pandas v1.5.3 is installed and no errors are raised.

Suggested fix: To make q2-fondue forward compatible with pandas v2.0 and still usable with pandas version <2.0: