apache / datafusion-python

Apache DataFusion Python Bindings
https://datafusion.apache.org/python
Apache License 2.0
380 stars 79 forks source link

README How to develop section now also works on Apple M1 #940

Closed drauschenbach closed 3 weeks ago

drauschenbach commented 3 weeks ago

Which issue does this PR close?

Closes #939.

Rationale for this change

README previously contained instructions that only worked on Linux.

What changes are included in this PR?

The default Conda environment file no longer depends on CUDA Toolkit or cuDF. An alternative environment file is made available for CUDA support.

Are there any user-facing changes?

For Apple users, the README will start working. For Linux users where GPUs are supported, the old instructions will not install CUDA support, but alternative instructions are provided to get the old behavior.

drauschenbach commented 3 weeks ago

Verification on an Apple M1

$ micromamba env create -f ./conda/environments/datafusion-dev.yaml -n datafusion-dev
...
Transaction finished

To activate this environment, use:

    micromamba activate datafusion-dev
$ micromamba activate datafusion-dev
$ maturin develop
...
 Installed datafusion-42.0.0
$ python3 -m pytest   
================================================================== test session starts ===================================================================
platform darwin -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/davidr/workspaces/drauschenbach/datafusion-python
configfile: pyproject.toml
collected 465 items                                                                                                                                      

python/tests/test_aggregation.py ..................................................................................                                [ 17%]
python/tests/test_catalog.py .                                                                                                                     [ 17%]
python/tests/test_config.py ...                                                                                                                    [ 18%]
python/tests/test_context.py .....................ss......................                                                                         [ 28%]
python/tests/test_dataframe.py ...............................................................................ssss............................     [ 52%]
python/tests/test_expr.py ..........                                                                                                               [ 54%]
python/tests/test_functions.py ................................................................................................................... [ 78%]
.......................                                                                                                                            [ 83%]
python/tests/test_imports.py .....                                                                                                                 [ 84%]
python/tests/test_indexing.py ..                                                                                                                   [ 85%]
python/tests/test_input.py .                                                                                                                       [ 85%]
python/tests/test_plans.py .                                                                                                                       [ 85%]
python/tests/test_sql.py .........................x...xxxx........                                                                                 [ 94%]
python/tests/test_store.py .                                                                                                                       [ 94%]
python/tests/test_substrait.py ...                                                                                                                 [ 95%]
python/tests/test_udaf.py .....                                                                                                                    [ 96%]
python/tests/test_udf.py ...                                                                                                                       [ 97%]
python/tests/test_udwf.py ............                                                                                                             [ 99%]
python/tests/test_wrapper_coverage.py .                                                                                                            [100%]

======================================================= 454 passed, 6 skipped, 5 xfailed in 2.89s ========================================================