Skip to main content

Module flow

Module flow 

Source
Expand description

Question decision tree.

Reads the current ClassificationState and returns the next Question + QuestionStep pair to present to the user. Pure functions; no side-effects.

Functions§

choice_index_to_intended_use
Map intended-use choice index to IntendedUse.
choice_index_to_organic_inorganic
Map organic/inorganic choice index to OrganicInorganic.
choice_index_to_physical_form
Map physical-form choice index to PhysicalForm.
multi_choice_indices_to_functional_groups
Map functional-group multi-choice indices to string keys.
next_question
Return the next question to ask (and its step tag), or None when all information has been collected and the pipeline can be invoked.