Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/context/source #765

Merged
merged 35 commits into from
Apr 29, 2018
Merged

Refactor/context/source #765

merged 35 commits into from
Apr 29, 2018

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Apr 29, 2018

• Project, Context
  context argument of all methods replaced with ContextFlag
  self.context.string used for human-readable descriptive information

• LCA, DDM:
  - _execute:  self.function -> super._execute()

• InputState, ParameterState:
  - _execute:  self.function -> super._execute()

NOTE: This branch does not yet pass unit tests for LeabraMechanism
(those are currently being ignored by Jenkins)

jdcpni and others added 30 commits April 21, 2018 00:19
  - implement all assignments to and tests against context regarding
    initialization and execution converted to context attribute

  - still need to implement message passing of context.source in place
    of context string for COMMAND_LINE and other circumstances
    (such as ADD_STATES, SET_ATTRIBUTES, RUN, etc.)
  - implement message passing of context.source in place of context
…Link into refactor/context/source_devel

# Conflicts:
#	psyneulink/components/component.py
#	psyneulink/components/functions/function.py
#	psyneulink/components/mechanisms/adaptive/control/controlmechanism.py
#	psyneulink/components/mechanisms/adaptive/control/defaultcontrolmechanism.py
#	psyneulink/components/mechanisms/adaptive/gating/gatingmechanism.py
#	psyneulink/components/mechanisms/adaptive/learning/learningauxiliary.py
#	psyneulink/components/mechanisms/adaptive/learning/learningmechanism.py
#	psyneulink/components/mechanisms/mechanism.py
#	psyneulink/components/mechanisms/processing/compositioninterfacemechanism.py
#	psyneulink/components/mechanisms/processing/defaultprocessingmechanism.py
#	psyneulink/components/mechanisms/processing/integratormechanism.py
#	psyneulink/components/mechanisms/processing/objectivemechanism.py
#	psyneulink/components/mechanisms/processing/processingmechanism.py
#	psyneulink/components/mechanisms/processing/transfermechanism.py
#	psyneulink/components/projections/modulatory/controlprojection.py
#	psyneulink/components/projections/modulatory/gatingprojection.py
#	psyneulink/components/projections/modulatory/learningprojection.py
#	psyneulink/components/projections/modulatory/modulatoryprojection.py
#	psyneulink/components/projections/pathway/mappingprojection.py
#	psyneulink/components/projections/pathway/pathwayprojection.py
#	psyneulink/components/projections/projection.py
#	psyneulink/components/shellclasses.py
#	psyneulink/components/states/parameterstate.py
#	psyneulink/components/states/state.py
#	psyneulink/globals/context.py
#	psyneulink/globals/environment.py
#	psyneulink/globals/log.py
#	psyneulink/library/mechanisms/adaptive/learning/autoassociativelearningmechanism.py
#	psyneulink/library/mechanisms/processing/integrator/ddm.py
#	psyneulink/library/mechanisms/processing/objective/comparatormechanism.py
#	psyneulink/library/mechanisms/processing/transfer/lca.py
#	psyneulink/library/mechanisms/processing/transfer/recurrenttransfermechanism.py
#	psyneulink/library/projections/pathway/autoassociativeprojection.py
…Link into refactor/context/source_devel

# Conflicts:
#	psyneulink/components/component.py
#	psyneulink/components/functions/function.py
#	psyneulink/components/mechanisms/adaptive/control/controlmechanism.py
#	psyneulink/components/mechanisms/adaptive/control/defaultcontrolmechanism.py
#	psyneulink/components/mechanisms/adaptive/gating/gatingmechanism.py
#	psyneulink/components/mechanisms/adaptive/learning/learningauxiliary.py
#	psyneulink/components/mechanisms/adaptive/learning/learningmechanism.py
#	psyneulink/components/mechanisms/mechanism.py
#	psyneulink/components/mechanisms/processing/compositioninterfacemechanism.py
#	psyneulink/components/mechanisms/processing/defaultprocessingmechanism.py
#	psyneulink/components/mechanisms/processing/integratormechanism.py
#	psyneulink/components/mechanisms/processing/objectivemechanism.py
#	psyneulink/components/mechanisms/processing/processingmechanism.py
#	psyneulink/components/mechanisms/processing/transfermechanism.py
#	psyneulink/components/projections/modulatory/controlprojection.py
#	psyneulink/components/projections/modulatory/gatingprojection.py
#	psyneulink/components/projections/modulatory/learningprojection.py
#	psyneulink/components/projections/modulatory/modulatoryprojection.py
#	psyneulink/components/projections/pathway/mappingprojection.py
#	psyneulink/components/projections/pathway/pathwayprojection.py
#	psyneulink/components/projections/projection.py
#	psyneulink/components/shellclasses.py
#	psyneulink/components/states/parameterstate.py
#	psyneulink/components/states/state.py
#	psyneulink/globals/context.py
#	psyneulink/globals/environment.py
#	psyneulink/globals/log.py
#	psyneulink/library/mechanisms/adaptive/learning/autoassociativelearningmechanism.py
#	psyneulink/library/mechanisms/processing/integrator/ddm.py
#	psyneulink/library/mechanisms/processing/objective/comparatormechanism.py
#	psyneulink/library/mechanisms/processing/transfer/lca.py
#	psyneulink/library/mechanisms/processing/transfer/recurrenttransfermechanism.py
#	psyneulink/library/projections/pathway/autoassociativeprojection.py
…Link into refactor/context/source_devel

# Conflicts:
#	psyneulink/components/component.py
#	psyneulink/components/functions/function.py
#	psyneulink/components/mechanisms/adaptive/control/controlmechanism.py
#	psyneulink/components/mechanisms/adaptive/control/defaultcontrolmechanism.py
#	psyneulink/components/mechanisms/adaptive/gating/gatingmechanism.py
#	psyneulink/components/mechanisms/adaptive/learning/learningauxiliary.py
#	psyneulink/components/mechanisms/adaptive/learning/learningmechanism.py
#	psyneulink/components/mechanisms/mechanism.py
#	psyneulink/components/mechanisms/processing/compositioninterfacemechanism.py
#	psyneulink/components/mechanisms/processing/defaultprocessingmechanism.py
#	psyneulink/components/mechanisms/processing/integratormechanism.py
#	psyneulink/components/mechanisms/processing/objectivemechanism.py
#	psyneulink/components/mechanisms/processing/processingmechanism.py
#	psyneulink/components/mechanisms/processing/transfermechanism.py
#	psyneulink/components/projections/modulatory/controlprojection.py
#	psyneulink/components/projections/modulatory/gatingprojection.py
#	psyneulink/components/projections/modulatory/learningprojection.py
#	psyneulink/components/projections/modulatory/modulatoryprojection.py
#	psyneulink/components/projections/pathway/mappingprojection.py
#	psyneulink/components/projections/pathway/pathwayprojection.py
#	psyneulink/components/projections/projection.py
#	psyneulink/components/shellclasses.py
#	psyneulink/components/states/parameterstate.py
#	psyneulink/components/states/state.py
#	psyneulink/globals/context.py
#	psyneulink/globals/environment.py
#	psyneulink/globals/log.py
#	psyneulink/library/mechanisms/adaptive/learning/autoassociativelearningmechanism.py
#	psyneulink/library/mechanisms/processing/integrator/ddm.py
#	psyneulink/library/mechanisms/processing/objective/comparatormechanism.py
#	psyneulink/library/mechanisms/processing/transfer/lca.py
#	psyneulink/library/mechanisms/processing/transfer/recurrenttransfermechanism.py
#	psyneulink/library/projections/pathway/autoassociativeprojection.py
  - _execute:  self.function -> super._execute()
jdcpni added 5 commits April 28, 2018 21:15
  - _execute:  self.function -> super._execute()
  context argument of all methods replaced with ContextFlag
  self.context.string used for human-readable descriptive information
@jdcpni jdcpni merged commit bd9917b into devel Apr 29, 2018
kmantel added a commit that referenced this pull request May 1, 2018
* devel:
  Feat/projections/masked mapping projection (#775)
  adding exceptions to get_current_function_param and get_current_mechanism_param - not intended for looking up 'variable'
  Feat/projections/masked mapping projection (#771)
  • LCA (#770)
  • LCA (#769)
  Refactor/mechanism/transfermechanism (#768)
  Fix default_variable bug (#767)
  Feat/inputstate/combine (#766)
  Refactor/context/source (#765)
  Defaults: ensure that function attr appears when examining Defaults
  Rewrite Function instantiation:
  Component: create fewer instances during init when function arg is a class
  LinearMatrix: make keyword method static to reflect how it is used
  refactor/rename _variable_not_specified to be more generic, using enum
  Defaults: add enum to denote flexibility of assignments
  Component: add class method to get new param class defaults
  Defaults: add ClassDefaults.function to several classes, and use it as fallback
  utilities: add function to detect if obj is an instance or a subclass of a class
  Component: override __deepcopy__ method to use shared items
  parsing: add method to parse function variable from variable
  imports: pycharm-optimize to avoid unnecessary circularities
  Params: copy dict/ROODs nested in params arguments to avoid side effects
  Refactor/context/set and test (#762)
  fixing bug in looking up target values for learning which caused first target value to be repeated
  LinearCombination, Reduce: handle negative exponents during init (avoid zero division)
  Functions: simplify noise validation
  adding a note to the ddm plot() documentation to clarify that the plot does not correspond to the actual results of the mechanism
  fixing drift diffusion integrator bug - returned threshold even when it crossed the negative threshold
  Fix/misc/misc (#759)
  PredictionErrorMechanism: correct infinite recursion in _execute
  Docs/context/context (#757)
  • Mechanism (#756)
  Refactor/mechanisms/ execute (#754)
  LearningAuxilliary: rename to LearningAuxiliary (correct double l typo)
  scheduling: decouple Scheduler and Condition, allow multiple execution_ids
  utilites: get method to prune unused args from a function from composition branch
  Feat/mechanism/input target lable dicts (#752)
  testing: Resolve leftover merge conflicts, fixes #747
  testing: correct pytest setup ovewrite, losing some settings
  Feat/mechanism/input target label dicts (#751)
  Scheduling: fix bug where termination conditions persisted across calls to run
  tests,function/LinearCombination: Add tests with absent parameters
  test,function/LinearCombination: Rename second test function to prevent overwriting results
  • Context (#746)
  Refactor/context/deprecate init status (#745)
  Refactor/context/structured (#744)
  Fix/function/stability (#743)
  • IntegratorMechanism (#742)
kmantel added a commit that referenced this pull request May 1, 2018
* devel:
  Feat/projections/masked mapping projection (#775)
  adding exceptions to get_current_function_param and get_current_mechanism_param - not intended for looking up 'variable'
  Feat/projections/masked mapping projection (#771)
  • LCA (#770)
  • LCA (#769)
  Refactor/mechanism/transfermechanism (#768)
  Fix default_variable bug (#767)
  Feat/inputstate/combine (#766)
  Refactor/context/source (#765)
  Defaults: ensure that function attr appears when examining Defaults
  Rewrite Function instantiation:
  Component: create fewer instances during init when function arg is a class
  LinearMatrix: make keyword method static to reflect how it is used
  refactor/rename _variable_not_specified to be more generic, using enum
  Defaults: add enum to denote flexibility of assignments
  Component: add class method to get new param class defaults
  Defaults: add ClassDefaults.function to several classes, and use it as fallback
  utilities: add function to detect if obj is an instance or a subclass of a class
  Component: override __deepcopy__ method to use shared items
  parsing: add method to parse function variable from variable
  imports: pycharm-optimize to avoid unnecessary circularities
  Params: copy dict/ROODs nested in params arguments to avoid side effects
  Refactor/context/set and test (#762)
  fixing bug in looking up target values for learning which caused first target value to be repeated
  LinearCombination, Reduce: handle negative exponents during init (avoid zero division)
  Functions: simplify noise validation
  adding a note to the ddm plot() documentation to clarify that the plot does not correspond to the actual results of the mechanism
  fixing drift diffusion integrator bug - returned threshold even when it crossed the negative threshold
  Fix/misc/misc (#759)
  PredictionErrorMechanism: correct infinite recursion in _execute
  Docs/context/context (#757)
  • Mechanism (#756)
  Refactor/mechanisms/ execute (#754)
  LearningAuxilliary: rename to LearningAuxiliary (correct double l typo)
  scheduling: decouple Scheduler and Condition, allow multiple execution_ids
  utilites: get method to prune unused args from a function from composition branch
  Feat/mechanism/input target lable dicts (#752)
  testing: Resolve leftover merge conflicts, fixes #747
  testing: correct pytest setup ovewrite, losing some settings
  Feat/mechanism/input target label dicts (#751)
  Scheduling: fix bug where termination conditions persisted across calls to run
  tests,function/LinearCombination: Add tests with absent parameters
  test,function/LinearCombination: Rename second test function to prevent overwriting results
  • Context (#746)
  Refactor/context/deprecate init status (#745)
  Refactor/context/structured (#744)
  Fix/function/stability (#743)
  • IntegratorMechanism (#742)
@kmantel kmantel mentioned this pull request May 1, 2018
@kmantel kmantel deleted the refactor/context/source_devel branch October 22, 2018 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants