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

Trim Python dependencies #518

Merged
merged 3 commits into from
Oct 16, 2024
Merged

Trim Python dependencies #518

merged 3 commits into from
Oct 16, 2024

Conversation

jonmmease
Copy link
Collaborator

This PR drops the hard dependencies on pandas and pyarrow, and adds a test that using Altair+VegaFusion with polars does not trigger an import of pandas or pyarrow.

I also removed the psutil dependency by implementing the system lookup info in rust using the sysinfo crate. Now the vegafusion Python library has only three dependencies.

  • narwhals for abstracting over DataFrames (185.3 kB wheel, pure Python)
  • arro3-core for basic Arrow processing in Python (2-4MB, compiled with wheels available for more platforms that VegaFusion currently builds for. In contrast, the pyarrow wheel sizes vary across platforms from 25MB to 40MB).
  • packaging for the Version object (54.0 kB wheel, pure Python)

narwhals and packaging are also dependencies of Altair, so VegaFusion will now add only itself and arro3-core as deps.

@jonmmease jonmmease changed the base branch from main to v2 October 16, 2024 00:16
@jonmmease jonmmease merged commit 2bd1ef7 into v2 Oct 16, 2024
19 checks passed
jonmmease added a commit that referenced this pull request Nov 16, 2024
* remove dep on psutil, pandas, pyarrow

* Add test that polars usage doesn't import pandas/pyarrow

* Add pandas/pyarrow to test deps
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.

1 participant