plugin_input_output_processing#
Classes:
|
Generate input file template from a minimal input file. |
|
Generate input file from inp dictionary. |
Functions:
|
Convert inp dictionary structure to requirements dictionary structure. |
|
Convert docstring to structured dictionary. |
|
Detection of parameters and output values in line based on presence of more than spaces_cuttoff spaces (tabs are converted to four spaces). |
|
Process single line to extract parameter/output information and comments |
- class pyH2A.Utilities.plugin_input_output_processing.Generate_Template_Input_File(input_file_stub, output_file, origin=False, comment=False)[source]#
Generate input file template from a minimal input file.
- Parameters
- input_file_stubstr
Path to input file containing workflow and analysis specifications.
- output_filestr
Path to file where input template is to be written.
- originbool, optional
Include origin of each requested input parameter in input template file (“requested by” information).
- commentbool, optional
Include comments for each requested input parameter (additional information on parameter).
- Returns
- Templateobject
Template object which contains information on requirements and output. Input template is written to specified output file.
Methods:
check_parameters
(data, output)Check if needed parameter is in output.
convert_requirements_to_inp
([insert_origin, ...])Convert dictionary of requirements to formatted self.inp
Generate dictionary with input requirements.
get_analysis_modules
(post_workflow_position)Get analysis modules from input stub.
get_docstring_data
(target_name, target_type)Get parameter requirements and outputs from docstrings.
- class pyH2A.Utilities.plugin_input_output_processing.Template_File(inp)[source]#
Generate input file from inp dictionary.
- Parameters
- inpdict
Dictionary containing information on requested input (generated by Generate_Template_Input_File)
- Returns
- Template_Fileobject
Object containing formatted string for output file.
Methods:
Convert list of names to markdown style table string.
Convert inp to string.
get_column_names
(dictionary)Get names of table columns.
get_row_entries
(columns, column_names, ...)Get entries for each row of table.
get_single_row
(column_names, column, dictionary)Get entries for a single row.
write_template_file
(file_name)Write output string to file.
- pyH2A.Utilities.plugin_input_output_processing.convert_inp_to_requirements(dictionary, path=None)[source]#
Convert inp dictionary structure to requirements dictionary structure.
- pyH2A.Utilities.plugin_input_output_processing.extract_input_output_from_docstring(target, **kwargs)[source]#
Convert docstring to structured dictionary.