Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Python package for CARFAC

Installing

This package comes with two extras: tf for Tensorflow dependencies, and jax for JAX dependencies.

This repo can be installed using a direct reference to this Git repository. Replace jax with any desired extras, and master with the desired commit:

carfac[jax] @ git+https://github.com/google/carfac.git@master#subdirectory=python

Development

This package uses dependency groups to specify dependencies required for development.

Either use uv and sync with --all-extras:

$ uv sync --all-extras
$ # run a test:
$ uv run python -m unittest carfac.tf.carfac_test -k "testMatchesMatlabOnBinauralData"

or use a virtualenv with pip 25.1+ and install all extras manually:

(venv) $ pip install --upgrade pip  # the below requires pip 25.1+
(venv) $ pip install -e ".[tf,jax]"
(venv) $ pip install --group dev
(venv) $ # run a test:
(venv) $ python -m unittest carfac.tf.carfac_test -k "testMatchesMatlabOnBinauralData"

As we add the parent test_data directory to the package manually, you will need to re-install the package to see any updates in carfac.test_data despite the package being installed as editable.

Formatting

All code must be formatted with pyink, which can either be run using uv with uv run pyink src or in a virtualenv with pyink src. pyink should automatically be installed as part of the dev dependency group.