Skip to content

Commit 904ccb9

Browse files
committed
Apply isort
1 parent 5645ebc commit 904ccb9

File tree

13 files changed

+84
-72
lines changed

13 files changed

+84
-72
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ repos:
2323
args:
2424
- --line-length=88
2525

26-
# # isort
27-
# - repo: https://github.com/pycqa/isort
28-
# rev: 5.11.2
29-
# hooks:
30-
# - id: isort
31-
# description: Sorts imports in an alphabetical order
26+
# isort
27+
- repo: https://github.com/pycqa/isort
28+
rev: 5.11.2
29+
hooks:
30+
- id: isort
31+
args: ["--profile", "black"]
32+
description: Sorts imports in an alphabetical order
3233

3334
# flake8
3435
- repo: https://github.com/pycqa/flake8

element_array_ephys/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import datajoint as dj
21
import logging
32
import os
3+
4+
import datajoint as dj
5+
46
from . import ephys_acute as ephys
57

68
__all__ = ["ephys", "get_logger"]

element_array_ephys/ephys_acute.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import datajoint as dj
1+
import gc
2+
import importlib
3+
import inspect
24
import pathlib
35
import re
4-
import numpy as np
5-
import inspect
6-
import importlib
7-
import gc
86
from decimal import Decimal
9-
import pandas as pd
107

11-
from element_interface.utils import find_root_directory, find_full_path, dict_to_uuid
8+
import datajoint as dj
9+
import numpy as np
10+
import pandas as pd
11+
from element_interface.utils import dict_to_uuid, find_full_path, find_root_directory
1212

13-
from .readers import spikeglx, kilosort, openephys
14-
from . import probe, get_logger, ephys_report
13+
from . import ephys_report, get_logger, probe
14+
from .readers import kilosort, openephys, spikeglx
1515

1616
log = get_logger(__name__)
1717

element_array_ephys/ephys_chronic.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import datajoint as dj
2-
import pathlib
3-
import numpy as np
4-
import inspect
5-
import importlib
61
import gc
2+
import importlib
3+
import inspect
4+
import pathlib
75
from decimal import Decimal
8-
import pandas as pd
96

10-
from element_interface.utils import find_root_directory, find_full_path, dict_to_uuid
7+
import datajoint as dj
8+
import numpy as np
9+
import pandas as pd
10+
from element_interface.utils import dict_to_uuid, find_full_path, find_root_directory
1111

12-
from .readers import spikeglx, kilosort, openephys
13-
from . import probe, get_logger, ephys_report
12+
from . import ephys_report, get_logger, probe
13+
from .readers import kilosort, openephys, spikeglx
1414

1515
log = get_logger(__name__)
1616

element_array_ephys/ephys_no_curation.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
import datajoint as dj
1+
import gc
2+
import importlib
3+
import inspect
24
import pathlib
35
import re
4-
import numpy as np
5-
import inspect
6-
import importlib
7-
import gc
86
from decimal import Decimal
7+
8+
import datajoint as dj
9+
import numpy as np
910
import pandas as pd
11+
from element_interface.utils import dict_to_uuid, find_full_path, find_root_directory
1012

11-
from element_interface.utils import find_root_directory, find_full_path, dict_to_uuid
12-
from .readers import spikeglx, kilosort, openephys
13-
from element_array_ephys import probe, get_logger, ephys_report
13+
from element_array_ephys import ephys_report, get_logger, probe
1414

15+
from .readers import kilosort, openephys, spikeglx
1516

1617
log = get_logger(__name__)
1718

element_array_ephys/ephys_precluster.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import datajoint as dj
1+
import importlib
2+
import inspect
23
import re
4+
5+
import datajoint as dj
36
import numpy as np
4-
import inspect
5-
import importlib
67
import pandas as pd
8+
from element_interface.utils import dict_to_uuid, find_full_path, find_root_directory
79

8-
from element_interface.utils import find_root_directory, find_full_path, dict_to_uuid
9-
10-
from .readers import spikeglx, kilosort, openephys
11-
from . import probe, ephys_report
10+
from . import ephys_report, probe
11+
from .readers import kilosort, openephys, spikeglx
1212

1313
schema = dj.schema()
1414

element_array_ephys/export/nwb/nwb.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import os
21
import decimal
32
import json
3+
import os
4+
import warnings
5+
6+
import datajoint as dj
47
import numpy as np
58
import pynwb
6-
import datajoint as dj
79
from element_interface.utils import find_full_path
810
from hdmf.backends.hdf5 import H5DataIO
911
from hdmf.data_utils import GenericDataChunkIterator
@@ -13,10 +15,9 @@
1315
)
1416
from spikeinterface import extractors
1517
from tqdm import tqdm
16-
import warnings
17-
from ... import probe
18-
from ... import ephys_no_curation as ephys
1918

19+
from ... import ephys_no_curation as ephys
20+
from ... import probe
2021

2122
ephys_mode = os.getenv("EPHYS_MODE", dj.config["custom"].get("ephys_mode", "acute"))
2223
if ephys_mode != "no-curation":

element_array_ephys/plotting/widget.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
import pathlib
12
from modulefinder import Module
3+
24
import ipywidgets as widgets
3-
import pathlib
4-
from IPython.display import display
5-
from .. import ephys_report
6-
import plotly.graph_objs as go
75
import plotly.express as px
6+
import plotly.graph_objs as go
7+
from IPython.display import display
88
from skimage import io
99

10+
from .. import ephys_report
11+
1012

1113
def main(ephys: Module) -> widgets:
1214

element_array_ephys/readers/kilosort.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
from os import path
2-
from datetime import datetime
1+
import logging
32
import pathlib
4-
import pandas as pd
5-
import numpy as np
63
import re
7-
import logging
4+
from datetime import datetime
5+
from os import path
6+
7+
import numpy as np
8+
import pandas as pd
9+
810
from .utils import convert_to_number
911

1012
log = logging.getLogger(__name__)

element_array_ephys/readers/kilosort_triggering.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
import subprocess
2-
import shutil
3-
import sys
4-
import pathlib
5-
import json
6-
import re
71
import inspect
2+
import json
83
import os
9-
import scipy.io
10-
import numpy as np
4+
import pathlib
5+
import re
6+
import shutil
7+
import subprocess
8+
import sys
119
from datetime import datetime, timedelta
1210

11+
import numpy as np
12+
import scipy.io
1313
from element_interface.utils import dict_to_uuid
1414

15-
1615
# import the spike sorting packages
1716
try:
18-
from ecephys_spike_sorting.scripts.create_input_json import createInputJson
19-
from ecephys_spike_sorting.scripts.helpers import SpikeGLX_utils
2017
from ecephys_spike_sorting.modules.kilosort_helper.__main__ import (
2118
get_noise_channels,
2219
)
20+
from ecephys_spike_sorting.scripts.create_input_json import createInputJson
21+
from ecephys_spike_sorting.scripts.helpers import SpikeGLX_utils
2322
except Exception as e:
2423
print(f'Error in loading "ecephys_spike_sorting" package - {str(e)}')
2524

0 commit comments

Comments
 (0)