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

Revise dependencies #822

Merged
merged 7 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,14 @@
- Update docs to reflect new notebooks. #776
- Add overview of Spyglass to docs. #779
- Update linting for Black 24. #808
- Steamline dependency management. #822

### Pipelines

- Spike sorting:
- Add SpikeSorting V1 pipeline. #651
- Move modules into spikesorting.v0 #807
- Add MUA analysis to spike sorting pipeline
- LFP: Minor fixes to LFPBandV1 populator and `make`. #706, #795

### Pipelines

- Spike sorting: Add SpikeSorting V1 pipeline. #651
- LFP:
- Minor fixes to LFPBandV1 populator and `make`. #706, #795
- LFPV1: Fix error for multiple lfp settings on same data #775
Expand All @@ -53,7 +49,7 @@
- Add fetch class functionality to `Merge` table. #783, #786
- Add ability to filter sorted units in decoding #807
- Rename SortedSpikesGroup.SortGroup to SortedSpikesGroup.Units #807
- Change methods with load_... to fetch_... for consistency #807
- Change methods with load\_... to fetch\_... for consistency #807
- Use merge table methods to access part methods #807

## [0.4.3] (November 7, 2023)
Expand Down
59 changes: 37 additions & 22 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,53 @@
# 1. Install a conda distribution.
# https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html
# 2. Run: `mamba env create -f environment.yml`
# 3. Activate: `conda activate spyglass`
#
# (lines intentionally left blank)
#
#
name: spyglass
channels:
- conda-forge
- defaults
# - pytorch # dlc-only
- franklab
- edeno
dependencies:
- python>=3.9,<3.10
- bottleneck
# - cudatoolkit=11.3 # dlc-only
# - cupy # dlc-only
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
# - dask-cuda # dlc-only
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
# - ffmpeg # dlc-only
- ipympl
- jupyterlab>=3.*
- pydotplus
- dask
# - libgcc # dlc-only
- matplotlib
- non_local_detector
- numpy<1.24
- pip
- position_tools
- numpy<1.24
- track_linearization>=2.3
- pybind11 # req by mountainsort4 -> isosplit5
- pydotplus
- pyfftw<=0.12.0 # ghostipy req. install from conda-forge for Mac ARM
- python>=3.9,<3.10
- pytorch<1.12.0
- replay_trajectory_classification
- ripple_detection
- non_local_detector
- matplotlib
- seaborn
- bottleneck
- ipympl
- tqdm
edeno marked this conversation as resolved.
Show resolved Hide resolved
- pyfftw<=0.12.0 # used by ghostipy. install from conda-forge so that it works on Mac ARM processors
# - torchaudio # dlc-only
# - torchvision # dlc-only
- track_linearization>=2.3
# - trajectory_analysis_tools # dlc-only
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
- pip:
- pubnub<6.4.0
- spikeinterface>=0.98.2,<0.99
- pynwb>=2.2.0,<3
- hdmf>=3.4.6
- datajoint>=0.13.6
- ghostipy
- pymysql
- sortingview>=0.11
# - deeplabcut<2.3.0 # dlc-only
- figurl-jupyter
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
- git+https://github.com/LorenFrankLab/ndx-franklab-novela.git
- pyyaml
- click
- "black[jupyter]"
- ghostipy # for common_filter
- ndx-franklab-novela>=0.1.0
- mountainsort4
- pubnub<=6.4.0
- pynwb>=2.2.0,<3
- sortingview>=0.11
- spikeinterface>=0.98.2,<0.99
- .
53 changes: 53 additions & 0 deletions environment_dlc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 1. INSTALL CORRECT DRIVER for your GPU-equipped machine.
# see https://stackoverflow.com/questions/30820513/what-is-the-correct-version-of-cuda-for-my-nvidia-driver/30820690
# 2. install: mamba env create -f environment_dlc.yml
# update existing install: mamba env update -f environment_dlc.yml
# 2. After installing...
# run: conda activate spyglass-dlc
# run: mamba env config vars set LD_LIBRARY_PATH=~/path/to/<anaconda3 or mambaforge>/envs/spyglass-position/lib/
# run: mamba install -c conda-forge wxpython
name: spyglass-dlc
channels:
- conda-forge
- defaults
- pytorch # dlc-only
- franklab
- edeno
dependencies:
- bottleneck
- cudatoolkit=11.3 # dlc-only
- cupy # dlc-only
- dask-cuda # dlc-only
- ffmpeg # dlc-only
- ipympl
- jupyterlab>=3.*
- libgcc # dlc-only
- matplotlib
- non_local_detector
- numpy<1.24
- pip>=20.2.*
- position_tools
- pybind11 # req by mountainsort4 -> isosplit5
- pydotplus>=2.0.*
- pyfftw<=0.12.0 # ghostipy req. install from conda-forge for Mac ARM
- python>=3.9,<3.10
- pytorch<1.12.0
- replay_trajectory_classification
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
- ripple_detection
- seaborn
- torchaudio # dlc-only
- torchvision # dlc-only
- track_linearization>=2.3
- trajectory_analysis_tools # dlc-only
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
- pip:
- datajoint>=0.13.6
- deeplabcut<2.3.0
- figurl-jupyter
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
- ghostipy # for common_filter
- ndx-franklab-novela>=0.1.0
- mountainsort4
- pubnub<=6.4.0
- pynwb>=2.2.0,<3
- sortingview>=0.11
- spikeinterface>=0.98.2,<0.99
- .[dlc]
61 changes: 0 additions & 61 deletions environment_position.yml

This file was deleted.

42 changes: 23 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,26 @@ keywords = [
"sortingview",
]
dependencies = [
"pydotplus",
"bottleneck",
"dask",
"position_tools",
"track_linearization>=2.3",
"non_local_detector",
"ripple_detection",
"datajoint>=0.13.6",
# "ghostipy", # removed from list bc M1 users need to install pyfftw first
"hdmf>=3.4.6",
"ipympl",
"matplotlib",
"seaborn",
"bottleneck",
"ndx_franklab_novela>=0.1.0",
"non_local_detector",
"numpy<1.24",
"ipympl",
"tqdm",
"pubnub<6.4.0", # TODO: remove this when sortingview is updated
"opencv-python",
"position_tools",
"pubnub<6.4.0", # TODO: remove this when sortingview is updated
"pydotplus",
"pynwb>=2.2.0,<3",
"hdmf>=3.4.6",
"datajoint>=0.13.6",
"pymysql",
"ripple_detection",
"seaborn",
"sortingview>=0.11",
"pyyaml",
"click",
"spikeinterface>=0.98.2,<0.99",
"ndx_franklab_novela>=0.1.0",
"track_linearization>=2.3",
]
dynamic = ["version"]

Expand All @@ -68,14 +66,16 @@ spyglass_cli = "spyglass.cli:cli"
"Bug Tracker" = "https://github.com/LorenFrankLab/spyglass/issues"

[project.optional-dependencies]
position = ["ffmpeg", "numba>=0.54", "deeplabcut<2.3.0"]
dlc = ["ffmpeg", "numba>=0.54", "deeplabcut<2.3.0"]
test = [
"black[jupyter]", # code formatting, rather than a 'dev' install
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
"click", # for CLI subpackage only
"docker", # for tests in a container
"pytest", # unit testing
"pytest-cov", # code coverage
"kachery", # database access
"kachery-client",
"kachery-cloud",
"kachery-cloud>=0.4.0",
]
docs = [
"hatch", # Get version from env
Expand Down Expand Up @@ -121,7 +121,7 @@ addopts = [
# "--pdb", # drop into debugger on failure
"-p no:warnings",
# "--no-teardown", # don't teardown the database after tests
"--quiet-spy", # don't show logging from spyglass
"--quiet-spy", # don't show logging from spyglass
"--show-capture=no",
"--pdbcls=IPython.terminal.debugger:TerminalPdb", # use ipython debugger
"--cov=spyglass",
Expand Down Expand Up @@ -150,3 +150,7 @@ omit = [ # which submodules have no tests
"*/spikesorting/*",
# "*/utils/*",
]

[tool.ruff] # CB: Propose replacing flake8 with ruff to delete setup.cfg
line-length = 80
ignore = ["F401" , "E402", "E501"]
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
[flake8] # Planned for removal in favor of Ruff
max-line-length = 80
max-complexity = 17
exclude =
Expand Down
9 changes: 8 additions & 1 deletion src/spyglass/cli/cli.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
from typing import Union

import click
import yaml

try:
import click
except ImportError:
raise ImportError(
"spyglass.cli.cli requires the 'click' package. "
"You can install it with 'pip install click'."
)


@click.group(help="Spyglass command-line client")
def cli():
Expand Down
2 changes: 2 additions & 0 deletions src/spyglass/utils/dj_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
from typing import Dict, List, Union

import datajoint as dj
from datajoint.errors import DataJointError
from datajoint.expression import QueryExpression
from datajoint.logging import logger as dj_logger
from datajoint.table import Table
from datajoint.utils import get_master, user_choice
from pymysql.err import DataError

from spyglass.utils.dj_chains import TableChain, TableChains
from spyglass.utils.dj_helper_fn import fetch_nwb
Expand Down
Loading