Skip to content

Conversation

blink1073
Copy link
Member

Addresses #286.

@blink1073 blink1073 requested a review from a team as a code owner June 20, 2025 11:23
@blink1073 blink1073 requested a review from caseyclements June 20, 2025 11:23
@blink1073 blink1073 changed the title INTPYTHON-653 Make pandas optional INTPYTHON-653 & INTPYTHON-620 Make pandas optional and add free-threading support on Windows Jun 20, 2025
try:
from pandas.tests.extension import base
except ImportError:
pytest.skip("skipping pandas tests", allow_module_level=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some thing like "To include, create environment like so: uv sync --dev --extra test --extra test-polars --extra test-pandas"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already part of just test, that seems redundant

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. As long as we are steering contributors to the justfile, that they've opened it, we're good.

except ImportError:
self.skipTest("Test requires pandas")
arrow_schema = {k.__name__: v(True) for k, v in _TYPE_NORMALIZER_FACTORY.items()}
schema = {k: v.to_pandas_dtype() for k, v in arrow_schema.items()}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use pandas to go from arrow to numpy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for this test, to get the right data types

@blink1073 blink1073 requested a review from caseyclements June 20, 2025 15:35
Copy link
Contributor

@caseyclements caseyclements left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@blink1073 blink1073 merged commit 8764224 into mongodb-labs:main Jun 20, 2025
49 checks passed
@blink1073 blink1073 deleted the optional-pandas branch June 20, 2025 15:52
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.

2 participants