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

Standardize collectOutput method for PostProcessor #1471

Merged
merged 13 commits into from
Mar 15, 2021

Conversation

wangcj05
Copy link
Collaborator

@wangcj05 wangcj05 commented Mar 11, 2021


Pull Request Description

What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)

see #1451

Standardize the collectOutput method for PostProcessors. In ideal case, all PostProcessors should call the collectOutput method from the PostProcessor Base class, and there is no need for the PostProcessor to implement its own collectOutput method. This will simplify the PostProcessors when there is a standard way to pass and retrieve data from PostProcessors.

What are the significant changes in functionality due to this change request?

For Change Control Board: Change Request Review

The following review must be completed by an authorized member of the Change Control Board.

  • 1. Review all computer code.
  • 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
  • 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
  • 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
  • 5. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in XML block, the node <internalParallel> to True.
  • 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change. The requirements and the requirements test shall be in sync.
  • 7. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.
  • 8. If an analytic test is changed/added is the the analytic documentation updated/added?
  • 9. If any test used as a basis for documentation examples (currently found in raven/tests/framework/user_guide and raven/docs/workshop) have been changed, the associated documentation must be reviewed and assured the text matches the example.

@moosebuild
Copy link

Job Mingw Test on 792e778 : invalidated by @wangcj05

Catastrophic error while removing repository. Exiting...

@moosebuild
Copy link

Job Mingw Test on a83f076 : invalidated by @wangcj05

fetch issue

@wangcj05 wangcj05 requested a review from mandd March 11, 2021 23:13
@@ -74,6 +74,8 @@ def __init__(self, runInfoDict):
self.mapping = {} # dictionary for mapping input space between different DataObjects {'variableName':'externalFunctionName'}
self.funcDict = {} # Contains the function to be used {'variableName':externalFunctionInstance}
self.label = None # ID of the variable which containf the label values
self.outputMultipleRealizations = True # True indicate multiple realizations are returned
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this variable being used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is used to indicate what kind of method will be used to collect the output into the DataObjects. Currently, we have addRealization for single realization, and load method for multiple realizations.

@ In, output, object, the object where we want to place our computed results
@ In, options, dict, optional, not used in PostProcessor.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we specify it since PP doesn't use it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It inherits from the Model base class.


# use BaseClass method provideExpectedMetaKeys and addMetaKeys to provide and modify metadata
self.outputDataset = False # True if the user wants to dump the outputs to dataset
self.validDataType = ['PointSet','HistorySet'] # The list of accepted types of DataObject
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about dataset?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In most of our PP, we only allow PointSet and HistorySet. In each specific PP, we can specific the accepted types.

@mandd
Copy link
Collaborator

mandd commented Mar 15, 2021

PR is good to me. Merging.

@mandd mandd merged commit 1785d90 into devel Mar 15, 2021
@wangcj05 wangcj05 deleted the wangc/pp_plugin_api_fy21 branch June 29, 2021 15:06
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.

3 participants