Skip to content

Commit ccd23fc

Browse files
committed
rearrange(all): major refactor of modules
1 parent 5dc5953 commit ccd23fc

File tree

11 files changed

+43
-4594
lines changed

11 files changed

+43
-4594
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
7+
## [1.0.0] - 2024-09-10
8+
9+
+ Update - No longer support multiple variation of ephys module, keep only `ephys_no_curation` module, renamed to `ephys`
10+
+ Update - Remove other ephys modules (e.g. `ephys_acute`, `ephys_chronic`) (moved to different branches)
11+
+ Update - Add support for `SpikeInterface`
12+
+ Update - Remove support for `ecephys_spike_sorting` (moved to a different branch)
13+
+ Update - Simplify the "activate" mechanism
14+
615
## [0.4.0] - 2024-08-16
716

817
+ Add - support for SpikeInterface version >= 0.101.0 (updated API)

element_array_ephys/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from . import ephys_acute as ephys
1+
from . import ephys
2+
3+
ephys_no_curation = ephys # alias for backward compatibility

element_array_ephys/ephys_no_curation.py renamed to element_array_ephys/ephys.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import pandas as pd
1111
from element_interface.utils import dict_to_uuid, find_full_path, find_root_directory
1212

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

1616
logger = dj.logger
@@ -22,7 +22,6 @@
2222

2323
def activate(
2424
ephys_schema_name: str,
25-
probe_schema_name: str = None,
2625
*,
2726
create_schema: bool = True,
2827
create_tables: bool = True,
@@ -32,7 +31,6 @@ def activate(
3231
3332
Args:
3433
ephys_schema_name (str): A string containing the name of the ephys schema.
35-
probe_schema_name (str): A string containing the name of the probe schema.
3634
create_schema (bool): If True, schema will be created in the database.
3735
create_tables (bool): If True, tables related to the schema will be created in the database.
3836
linking_module (str): A string containing the module name or module containing the required dependencies to activate the schema.
@@ -46,7 +44,6 @@ def activate(
4644
get_ephys_root_data_dir(): Returns absolute path for root data director(y/ies) with all electrophysiological recording sessions, as a list of string(s).
4745
get_session_direction(session_key: dict): Returns path to electrophysiology data for the a particular session as a list of strings.
4846
get_processed_data_dir(): Optional. Returns absolute path for processed data. Defaults to root directory.
49-
5047
"""
5148

5249
if isinstance(linking_module, str):
@@ -58,17 +55,15 @@ def activate(
5855
global _linking_module
5956
_linking_module = linking_module
6057

61-
# activate
62-
probe.activate(
63-
probe_schema_name, create_schema=create_schema, create_tables=create_tables
64-
)
58+
if not probe.schema.is_activated():
59+
raise RuntimeError("Please activate the `probe` schema first.")
60+
6561
schema.activate(
6662
ephys_schema_name,
6763
create_schema=create_schema,
6864
create_tables=create_tables,
6965
add_objects=_linking_module.__dict__,
7066
)
71-
ephys_report.activate(f"{ephys_schema_name}_report", ephys_schema_name)
7267

7368

7469
# -------------- Functions required by the elements-ephys ---------------

0 commit comments

Comments
 (0)