Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing tests: Add compatibility with pandas 2 #85

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

olp-cs
Copy link

@olp-cs olp-cs commented Jul 23, 2024

Closes #84

Compatibility with pandas 2

Problem:

For a pandas dataframe that contains both numeric and string columns, the mean() function started to fail in pandas 2.0+ because the default behavior has changed from mean(numeric_only=True) to mean(numeric_only=False) (link).

Solution:

Ensure we only have numeric columns.

Testing:

Compatibility with tox 4

1. Whitespace in the environmental variables

With tox==4.16.0, the tox command was failing with the following error:

py38: failed with pass_env values cannot contain whitespace, use comma to have multiple values in a single line, invalid values found 'GEOPARSE_USE_HTTP_FOR_FTP *_proxy *_PROXY USER'

The modified line also works in tox==3.14.3 (Dec 28, 2019). However, I couldn't run tox==3.13.0 (Jun 25, 2019) regardless of this line.

2. Explicit lxml dependency

Without the lxml dependency, 3 tests were failing:

FAILED test_GEOparse.py::TestGSM::test_download_SRA - ImportError: lxml not found, please install or use the etree parser.
FAILED test_GEOparse.py::TestGSM::test_download_SRA_parallel_by_gsm - ImportError: lxml not found, please install or use the etree parser.
FAILED test_GEOparse.py::TestGSM::test_download_SRA_parallel_by_sra - ImportError: lxml not found, please install or use the etree parser.
========================================================== 3 failed, 32 passed in 58.25s 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing test: test_merge_and_average fails with a TypeError with pandas 2.0.3
1 participant