Skip to content

Commit 071bf35

Browse files
author
Thinh Nguyen
committed
update wording, required_module -> linking_module
1 parent f11900f commit 071bf35

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

elements_ephys/ephys.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212

1313
schema = dj.schema()
1414

15-
_required_module = None
15+
_linking_module = None
1616

1717

1818
def activate(ephys_schema_name, probe_schema_name=None, *, create_schema=True,
19-
create_tables=True, required_module=None):
19+
create_tables=True, linking_module=None):
2020
"""
21-
activate(ephys_schema_name, probe_schema_name=None, *, create_schema=True, create_tables=True, dependency=None)
22-
:param ephys_schema_name: schema name to activate the `ephys` element
23-
:param probe_schema_name: schema name to activate the `probe` element
21+
activate(ephys_schema_name, probe_schema_name=None, *, create_schema=True, create_tables=True, linking_module=None)
22+
:param ephys_schema_name: schema name on the database server to activate the `ephys` element
23+
:param probe_schema_name: schema name on the database server to activate the `probe` element
2424
- may be omitted if the `probe` element is already activated
25-
:param create_schema: create the schema if not yet existed (default = True)
26-
:param create_tables: create the tables if not yet existed (default = True)
27-
:param required_module: a module name or a module containing the
25+
:param create_schema: when True (default), create schema in the database if it does not yet exist.
26+
:param create_tables: when True (default), create tables in the database if they do not yet exist.
27+
:param linking_module: a module name or a module containing the
2828
required dependencies to activate the `ephys` element:
2929
Upstream tables:
3030
+ Session: parent table to ProbeInsertion, typically identifying a recording session
@@ -45,17 +45,17 @@ def activate(ephys_schema_name, probe_schema_name=None, *, create_schema=True,
4545
:return: int specifying the `paramset_idx`
4646
"""
4747

48-
if isinstance(required_module, str):
49-
required_module = importlib.import_module(required_module)
50-
assert inspect.ismodule(required_module), "The argument 'dependency' must be a module's name or a module"
48+
if isinstance(linking_module, str):
49+
linking_module = importlib.import_module(linking_module)
50+
assert inspect.ismodule(linking_module), "The argument 'dependency' must be a module's name or a module"
5151

52-
global _required_module
53-
_required_module = required_module
52+
global _linking_module
53+
_linking_module = linking_module
5454

5555
# activate
5656
probe.schema.activate(probe_schema_name, create_schema=create_schema, create_tables=create_tables)
5757
schema.activate(ephys_schema_name, create_schema=create_schema,
58-
create_tables=create_tables, add_objects=_required_module.__dict__)
58+
create_tables=create_tables, add_objects=_linking_module.__dict__)
5959

6060

6161
# -------------- Functions required by the elements-ephys ---------------
@@ -68,7 +68,7 @@ def get_neuropixels_data_directory(probe_insertion_key: dict) -> str:
6868
:param probe_insertion_key: a dictionary of one ProbeInsertion `key`
6969
:return: a string for full path to the resulting Neuropixels data directory
7070
"""
71-
return _required_module.get_neuropixels_data_directory(probe_insertion_key)
71+
return _linking_module.get_neuropixels_data_directory(probe_insertion_key)
7272

7373

7474
def get_kilosort_output_directory(clustering_task_key: dict) -> str:
@@ -78,7 +78,7 @@ def get_kilosort_output_directory(clustering_task_key: dict) -> str:
7878
:param clustering_task_key: a dictionary of one ClusteringTask `key`
7979
:return: a string for full path to the resulting Kilosort output directory
8080
"""
81-
return _required_module.get_kilosort_output_directory(clustering_task_key)
81+
return _linking_module.get_kilosort_output_directory(clustering_task_key)
8282

8383

8484
def get_paramset_idx(ephys_rec_key: dict) -> int:
@@ -88,7 +88,7 @@ def get_paramset_idx(ephys_rec_key: dict) -> int:
8888
:param ephys_rec_key: a dictionary of one EphysRecording `key`
8989
:return: int specifying the `paramset_idx`
9090
"""
91-
return _required_module.get_paramset_idx(ephys_rec_key)
91+
return _linking_module.get_paramset_idx(ephys_rec_key)
9292

9393

9494
# ----------------------------- Table declarations ----------------------

elements_ephys/probe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
def activate(schema_name, create_schema=True, create_tables=True):
1111
"""
1212
activate(schema_name, create_schema=True, create_tables=True)
13-
:param schema_name: schema name to activate the `probe` element
14-
:param create_schema: create the schema if not yet existed (default = True)
15-
:param create_tables: create the tables if not yet existed (default = True)
13+
:param schema_name: schema name on the database server to activate the `probe` element
14+
:param create_schema: when True (default), create schema in the database if it does not yet exist.
15+
:param create_tables: when True (default), create tables in the database if they do not yet exist.
1616
"""
1717
schema.activate(schema_name, create_schema=create_schema, create_tables=create_tables)
1818

0 commit comments

Comments
 (0)