Skip to content

Commit 5d41039

Browse files
author
Thinh Nguyen
authored
improve clarity and reduce complexity for activating and using the ephys_report module
1 parent d7fb6df commit 5d41039

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

element_array_ephys/ephys_acute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def activate(
7272
create_tables=create_tables,
7373
add_objects=_linking_module.__dict__,
7474
)
75-
ephys_report._activate(ephys_schema_name)
75+
ephys_report.activate(ephys_schema_name + '_report', ephys_schema_name)
7676

7777

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

element_array_ephys/ephys_chronic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def activate(
7474
create_tables=create_tables,
7575
add_objects=_linking_module.__dict__,
7676
)
77-
ephys_report._activate(ephys_schema_name)
77+
ephys_report.activate(ephys_schema_name + '_report', ephys_schema_name)
7878

7979

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

element_array_ephys/ephys_no_curation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def activate(
7373
create_tables=create_tables,
7474
add_objects=_linking_module.__dict__,
7575
)
76-
ephys_report._activate(ephys_schema_name)
76+
ephys_report.activate(ephys_schema_name + '_report', ephys_schema_name)
7777

7878

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

element_array_ephys/ephys_precluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def activate(
6565
create_tables=create_tables,
6666
add_objects=_linking_module.__dict__,
6767
)
68-
ephys_report._activate(ephys_schema_name)
68+
ephys_report.activate(ephys_schema_name + '_report', ephys_schema_name)
6969

7070

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

element_array_ephys/ephys_report.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
ephys = None
99

1010

11-
def _activate(schema_name, *, create_schema=True, create_tables=True):
11+
def activate(schema_name, ephys_schema_name, *, create_schema=True, create_tables=True):
1212
"""
1313
activate(schema_name, *, create_schema=True, create_tables=True, activated_ephys=None)
14-
:param schema_name: schema name on the database server to activate the `probe` element
14+
:param schema_name: schema name on the database server to activate the `ephys_report` schema
15+
:param ephys_schema_name: schema name of the activated ephys element for which this ephys_report schema will be downstream from
1516
:param create_schema: when True (default), create schema in the database if it does not yet exist.
1617
:param create_tables: when True (default), create tables in the database if they do not yet exist.
17-
:param activated_ephys: ephys module with the schema already activated
1818
(The "activation" of this ephys_report module should be evoked by one of the ephys modules only)
1919
"""
2020
global ephys
21-
ephys = dj.create_virtual_module("vm", schema_name)
21+
ephys = dj.create_virtual_module("ephys", ephys_schema_name)
2222
schema.activate(
2323
schema_name,
2424
create_schema=create_schema,

0 commit comments

Comments
 (0)