From 4c6811c6e045eadf90190a3ca5920927b8158522 Mon Sep 17 00:00:00 2001 From: jdcpni Date: Tue, 28 Nov 2017 10:20:19 -0500 Subject: [PATCH] Refactor/state/doc test bugs (#551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * mechanism docs and state docs * making progress toward all tests passing * triaging broken doc tests * created homepage test file * documentation tests * • Mechanism, InputState _parse_arg_input_states, _parse_state_specific_specs: fixed bug in handling of tuple specs * • Mechanism, InputState _parse_arg_input_states, _parse_state_specific_specs: fixed bug in handling of tuple specs * • Mechanism, InputState _parse_arg_input_states, _parse_state_specific_specs: fixed bug in handling of tuple specs adding passing of default_variable and size to _parse_state_specs * • Mechanism, InputState _parse_arg_input_states, _parse_state_specific_specs: fixed bug in handling of tuple specs adding passing of default_variable and size to _parse_state_specs * - * - * - * - * • State _parse_state_specs: added support for (State name, Mechanism) tuple inside other tuples • DDM: __init__: fixed bug with declaration of standard_output_states * - * - * - * • ModulatorySignal _is_modulatory_spec: added * - * - * - * • ModulatorySignal _is_modulatory_spec: added * - * - * - * - * - * • Component - _assign_args_to_param_dicts: fixed failure to assign deafults to paramClassDefaults * • Component - _assign_args_to_param_dicts: fixed failure to assign deafults to paramClassDefaults * • Component - _assign_args_to_param_dicts: fixed failure to assign deafults to paramClassDefaults - _instantiate_defaults: assign default param values for single-item modulatory specs * • Component - _assign_args_to_param_dicts: fixed failure to assign deafults to paramClassDefaults - _instantiate_defaults: assign default param values for single-item modulatory specs * - * - * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml * - * - * - * - * - * - * - * - * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml * Merge branch 'feat/Function/TDLearning' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/Function/TDLearning # Conflicts: # .idea/runConfigurations/_Mixed_Neural_Network_and_DDM.xml # .idea/runConfigurations/_Multilayer_Learning_Test_Script.xml # .idea/runConfigurations/_Reinforcement_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Learning_Test_Script.xml # .idea/runConfigurations/_Stroop_Model_Test.xml --- .idea/inspectionProfiles/Project_Default.xml | 5 +- .idea/runConfigurations/AGT_Test_Script.xml | 2 +- .idea/runConfigurations/DDM_Learning_Test.xml | 2 +- .../EVC_Gratton_Script___SEBASTIAN.xml | 2 +- ...aming_Validation_Test_Script_DEBUGGING.xml | 2 +- ..._Test_Script__SPECIFY_ControlSignals__.xml | 2 +- ..._Validation_Test_Script_with_Custom_Fn.xml | 2 +- .../EVC_System_Test_Script_with_Profiler.xml | 2 +- .idea/runConfigurations/FinalProject.xml | 2 +- .../Gating_Mechanism_Test_Script.xml | 2 +- .idea/runConfigurations/GilzenratModel.xml | 2 +- .idea/runConfigurations/Make_HTML.xml | 2 +- ...ilayer_Learning_Test_Script_VARIATIONS.xml | 2 +- ...yer_Learning_Test_Script__WITH_GATING_.xml | 2 +- .../runConfigurations/NEW_Learning_Markus.xml | 2 +- .idea/runConfigurations/NetworkX_Examples.xml | 2 +- .../Profile_EVC_System_Test.xml | 2 +- ...Model_Learning_and_Control_Test_Script.xml | 2 +- .../Stroop_Model_Test_Script_VARIATIONS.xml | 2 +- .../Two_Layer_Test_Script.xml | 2 +- .../Xor_Script_1_process_working.xml | 2 +- .../Xor_Script_2_processes.xml | 2 +- .idea/runConfigurations/_DDM_Test_Script.xml | 2 +- .../_DDM_scheduled_simple.xml | 2 +- .../_Documentation_Examples.xml | 2 +- .../_EVC_System_DEMO_Script.xml | 2 +- ...C_System_Laming_Validation_Test_Script.xml | 2 +- .../_Integrator_scheduled_timescales.xml | 2 +- .idea/runConfigurations/_META_TEST.xml | 2 +- .../_Mixed_NN___DDM_DEMO_Script.xml | 2 +- .../_Mixed_Neural_Network_and_DDM.xml | 2 +- .../_Multilayer_Learning_Test_Script.xml | 2 +- .../_Multilayer_Learning_Test_Script_DEMO.xml | 2 +- .../_Reinforcement_Learning_Test_Script.xml | 2 +- .idea/runConfigurations/_Scratch_Pad.xml | 2 +- .../runConfigurations/_Stroop_Demo_Script.xml | 2 +- .../_Stroop_Model_Learning_Test_Script.xml | 2 +- .../runConfigurations/_Stroop_Model_Test.xml | 2 +- .../_System_Graph_and_Input_Test.xml | 2 +- .../_System_Learning_Test_Script.xml | 2 +- .../make_html_and_ghpages_py.xml | 2 +- ..._mechanism_docs_test_lc_mechanism_docs.xml | 18 + .../py_test_in_test_lib_mechanism_docs_py.xml | 18 + .idea/runConfigurations/test_system.xml | 2 +- .idea/runConfigurations/topo_example.xml | 2 +- Scripts/Examples/Multitasking.py | 40 +++ Scripts/Scratch Pad.py | 224 +++++++++++-- tests/conftest.py => conftest.py | 4 + docs/source/LCMechanism.rst | 2 +- psyneulink/components/component.py | 61 +++- psyneulink/components/functions/function.py | 21 +- .../adaptive/control/controlmechanism.py | 131 +++++--- .../adaptive/gating/gatingmechanism.py | 14 + .../adaptive/learning/learningmechanism.py | 26 +- psyneulink/components/mechanisms/mechanism.py | 56 ++-- .../processing/integratormechanism.py | 3 +- .../processing/objectivemechanism.py | 79 +++-- .../processing/transfermechanism.py | 18 +- .../modulatory/gatingprojection.py | 1 + .../modulatory/learningprojection.py | 2 +- .../modulatory/modulatoryprojection.py | 2 +- .../projections/pathway/mappingprojection.py | 4 +- .../components/projections/projection.py | 40 ++- psyneulink/components/states/inputstate.py | 60 +++- .../states/modulatorysignals/controlsignal.py | 37 ++- .../states/modulatorysignals/gatingsignal.py | 51 +-- .../modulatorysignals/modulatorysignal.py | 13 + psyneulink/components/states/outputstate.py | 123 ++++--- .../components/states/parameterstate.py | 312 +++++++++++++++--- psyneulink/components/states/state.py | 193 +++++++---- psyneulink/components/system.py | 4 +- psyneulink/globals/keywords.py | 4 + psyneulink/globals/utilities.py | 33 +- .../adaptive/control/lcmechanism.py | 81 +++-- .../mechanisms/processing/integrator/ddm.py | 53 +-- .../objective/comparatormechanism.py | 69 ++-- .../subsystems/agt/lccontrolmechanism.py | 55 ++- .../subsystems/evc/evccontrolmechanism.py | 47 +-- psyneulink/scheduling/scheduler.py | 145 ++++---- .../documentation/core/test_mechanism_docs.py | 44 +++ tests/documentation/core/test_state_docs.py | 38 +++ .../library/test_lib_mechanism_docs.py | 28 ++ .../library/test_subsystem_docs.py | 23 ++ .../scheduling/test_scheduling_docs.py | 13 + tests/documentation/test_homepage.py | 0 tests/mechanisms/test_input_state_spec.py | 102 +++++- .../test_projections_specifications.py | 48 +++ 87 files changed, 1804 insertions(+), 625 deletions(-) create mode 100644 .idea/runConfigurations/py_test_for_tests_documentation_library_test_lib_mechanism_docs_test_lc_mechanism_docs.xml create mode 100644 .idea/runConfigurations/py_test_in_test_lib_mechanism_docs_py.xml create mode 100644 Scripts/Examples/Multitasking.py rename tests/conftest.py => conftest.py (94%) create mode 100644 tests/documentation/core/test_mechanism_docs.py create mode 100644 tests/documentation/core/test_state_docs.py create mode 100644 tests/documentation/library/test_lib_mechanism_docs.py create mode 100644 tests/documentation/library/test_subsystem_docs.py create mode 100644 tests/documentation/scheduling/test_scheduling_docs.py create mode 100644 tests/documentation/test_homepage.py diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 68740b70e58..ba2ba59d824 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -4,8 +4,9 @@ @@ -18,4 +19,4 @@ - + \ No newline at end of file diff --git a/.idea/runConfigurations/AGT_Test_Script.xml b/.idea/runConfigurations/AGT_Test_Script.xml index 78d22b8a0b4..e8d443a835e 100644 --- a/.idea/runConfigurations/AGT_Test_Script.xml +++ b/.idea/runConfigurations/AGT_Test_Script.xml @@ -10,7 +10,7 @@