Data processing and modeling for zapbench data.
conda env create -f envs/environment.linux.yaml
conda activate zap-model
pip install --no-deps git+https://github.com/ahrens-fish-lab/fishFuncEM.git@422bb2a
pip install -e .
pre-commit installconda env create -f envs/environment.mac.yaml
conda activate zap-model
pip install --no-deps git+https://github.com/ahrens-fish-lab/fishFuncEM.git@422bb2a
pip install -e .
pre-commit installNote: conda env creation may take a while due to pip building some packages from source.
Copy the example paths file and fill in your local paths:
cp src/zap_model/local_paths.example.py src/zap_model/local_paths.py| Variable | Purpose | Used by |
|---|---|---|
ZAPBENCH_LOCAL_PATH |
Local root for zapbench release data (read-only) | configs, build_cell_ephys_index.py |
ZAPBENCH_GCS_URI |
GCS root for remote data | build_cell_ephys_index.py |
OUTPUT_DATA_DIR |
Writable root for generated data | data/config.py, data/ephys.py, scripts |
TRAINING_DIR |
Training run output directory | TrainingConfig |
After configuring local_paths.py and setting your neuprint credentials, run:
python scripts/verify_setup.pyThis checks that local_paths.py exists, its paths are valid, and neuprint
can be queried. Requires NEUPRINT_TOKEN or NEUPRINT_APPLICATION_CREDENTIALS
in your environment (see fishfuncem docs).
The local_paths.py file is gitignored. These variables provide defaults for
config fields (ActivityConfig.traces_path, NeuprintConfig.data_dir) and
are used directly in scripts.
fishfuncem is installed with --no-deps because its pyproject.toml pins
strict version ranges (e.g. numpy<2, python<3.12) that conflict with our
stack. Its actual runtime dependencies are listed explicitly in the conda env
files.
We use ruff for linting and formatting.
Install the ruff VS Code extension
(recommended in .vscode/extensions.json) and enable format-on-save:
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true
}Configuration lives in pyproject.toml (line length 100, strict rule set).
Install the git hooks after setting up your environment:
pre-commit installThis runs ruff check + format on every commit and rejects files > 1 MB.
Run all tests with:
make testTests have a 10-second timeout. Keep tests lightweight — no network calls, no large data loads.
Place test files next to the module they test: module.py is tested by
module_test.py in the same directory. This keeps tests discoverable in the
file tree.
Use conventional commits:
feat:— new feature or capabilityfix:— bug fixrefactor:— code restructuring without behavior changebuild:— dependency or build system changeschore:— maintenance (CI, configs, tooling)
Keep messages short and high-level. State the motivation, not a list of files changed.