Skip to content

Commit

Permalink
Autodocument ComponentSelector methods/attributes (ME-ICA#20)
Browse files Browse the repository at this point in the history
* Rename ComponentSelector module.

* Document the ComponentSelector directly.
  • Loading branch information
tsalo authored Dec 15, 2022
1 parent c96ad83 commit 0505349
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
8 changes: 7 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,18 @@ API
:toctree: generated/
:template: module.rst

tedana.selection.ComponentSelector
tedana.selection.component_selector
tedana.selection.selection_nodes
tedana.selection.selection_utils
tedana.selection.tedica
tedana.selection.tedpca

.. autosummary::
:toctree: generated/
:template: class.rst

tedana.selection.component_selector.ComponentSelector

.. _api_gscontrol_ref:

**********************************************
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tedana/selection/selection_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

decision_docs = {
"selector": """\
selector: :obj:`tedana.selection.ComponentSelector`
selector: :obj:`tedana.selection.component_selector.ComponentSelector`
The selector to perform decision tree-based component selection with.""",
"ifTrueFalse": """\
ifTrue: :obj:`str`
Expand Down Expand Up @@ -62,7 +62,7 @@
tag_ifFalse: :obj:`str`
The classification tag to apply if a component is classified False. Default="".""",
"basicreturns": """\
selector: :obj:`tedana.selection.ComponentSelector`
selector: :obj:`tedana.selection.component_selector.ComponentSelector`
If only_used_metrics is False, the updated selector is returned
used_metrics: :obj:`set(str)`
If only_used_metrics is True, the names of the metrics used in the
Expand Down
10 changes: 5 additions & 5 deletions tedana/selection/selection_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def selectcomps2use(selector, decide_comps):
Parameters
----------
selector: :obj:`tedana.selection.ComponentSelector`
selector: :obj:`tedana.selection.component_selector.ComponentSelector`
Only uses the component_table in this object
decide_comps: :obj:`str` or :obj:`list[str]` or :obj:`list[int]`
This is string or a list of strings describing what classifications
Expand Down Expand Up @@ -104,7 +104,7 @@ def change_comptable_classifications(
Parameters
----------
selector: :obj:`tedana.selection.ComponentSelector`
selector: :obj:`tedana.selection.component_selector.ComponentSelector`
The attributes used are component_table, component_status_table, and
current_node_idx
ifTrue, ifFalse: :obj:`str`
Expand All @@ -127,7 +127,7 @@ def change_comptable_classifications(
Returns
-------
selector: :obj:`tedana.selection.ComponentSelector`
selector: :obj:`tedana.selection.component_selector.ComponentSelector`
component_table["classifications"] will reflect any new
classifications.
component_status_table will have a new column titled
Expand Down Expand Up @@ -184,7 +184,7 @@ def comptable_classification_changer(
Parameters
----------
selector: :obj:`tedana.selection.ComponentSelector`
selector: :obj:`tedana.selection.component_selector.ComponentSelector`
The attributes used are component_table, component_status_table, and
current_node_idx
boolstate : :obj:`bool`
Expand All @@ -211,7 +211,7 @@ def comptable_classification_changer(
warning is suppressed. default=False
Returns
-------
selector: :obj:`tedana.selection.ComponentSelector`
selector: :obj:`tedana.selection.component_selector.ComponentSelector`
Operates on the True OR False components depending on boolstate
component_table["classifications"] will reflect any new
classifications.
Expand Down
4 changes: 2 additions & 2 deletions tedana/selection/tedica.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import logging

from tedana.metrics import collect
from tedana.selection.ComponentSelector import ComponentSelector
from tedana.selection.component_selector import ComponentSelector

LGR = logging.getLogger("GENERAL")
RepLGR = logging.getLogger("REPORT")
Expand All @@ -25,7 +25,7 @@ def automatic_selection(component_table, n_echos, n_vols, tree="kundu"):
Returns
-------
selector: :obj:`tedana.selection.ComponentSelector`
selector: :obj:`tedana.selection.component_selector.ComponentSelector`
Contains component classifications in a component_table and provenance
and metadata from the component selection process
Expand Down

0 comments on commit 0505349

Please sign in to comment.