PyForTool
Python-fortran-tool
Loading...
Searching...
No Matches
Functions | Variables
pyfortool.scripting Namespace Reference

Functions

 task (filename)
 
 mainParallel ()
 
 main ()
 
 getArgs (parser)
 
 getParserOptions (args)
 
 getDescTree (args, cls=Tree)
 
 updateParser (parser, withInput, withOutput, withXml, withPlotCentralFile, treeIsOptional, nbPar, restrictScope)
 
 updateParserInputsOutputs (parser, withInput, withOutput, withXml)
 
 updateParserFxtran (parser)
 
 updateParserVariables (parser)
 
 updateParserCosmetics (parser)
 
 updateParserApplications (parser)
 
 updateParserOpenACC (parser)
 
 updateParserChecks (parser)
 
 updateParserStatements (parser)
 
 updateParserMisc (parser)
 
 updateParserTree (parser, withPlotCentralFile, treeIsOptional)
 
 updateParserPreprocessor (parser)
 
 applyTransfo (pft, arg, args, plotCentralFile)
 
 applyTransfoFileName (pft, arg)
 
 applyTransfoVariables (pft, arg, args, simplify, parserOptions, stopScopes)
 
 applyTransfoApplications (pft, arg, args, simplify, parserOptions, stopScopes)
 
 applyTransfoOpenACC (pft, arg, args, stopScopes)
 
 applyTransfoCosmetics (pft, arg, args)
 
 applyTransfoChecks (pft, arg, args)
 
 applyTransfoStatements (pft, arg, args, simplify)
 
 applyTransfoMisc (pft, arg, args, simplify)
 
 applyTransfoTree (pft, arg, args, plotCentralFile)
 
 applyTransfoPreprocessor (pft, arg, args)
 

Variables

tuple ARG_UPDATE_CNT
 

Detailed Description

This module contains functions usefull to build scripts around the pyfortool library

Function Documentation

◆ applyTransfo()

pyfortool.scripting.applyTransfo (   pft,
  arg,
  args,
  plotCentralFile 
)
Apply transformation on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments
:param plotCentralFile: central file for plots

Definition at line 663 of file scripting.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyTransfoApplications()

pyfortool.scripting.applyTransfoApplications (   pft,
  arg,
  args,
  simplify,
  parserOptions,
  stopScopes 
)
Apply applications transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments
:param simplify: kwargs to simplify
:param parserOptions: fxtran parser options
:param stopScopes: upper limit in call tree for some transformations

Definition at line 769 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoChecks()

pyfortool.scripting.applyTransfoChecks (   pft,
  arg,
  args 
)
Apply checks transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments

Definition at line 900 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoCosmetics()

pyfortool.scripting.applyTransfoCosmetics (   pft,
  arg,
  args 
)
Apply cosmetics transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments

Definition at line 855 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoFileName()

pyfortool.scripting.applyTransfoFileName (   pft,
  arg 
)
Apply file name transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments

Definition at line 706 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoMisc()

pyfortool.scripting.applyTransfoMisc (   pft,
  arg,
  args,
  simplify 
)
Apply misc transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments
:param simplify: kwargs to simplify

Definition at line 932 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoOpenACC()

pyfortool.scripting.applyTransfoOpenACC (   pft,
  arg,
  args,
  stopScopes 
)
Apply openACC transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments
:param stopScopes: upper limit in call tree for some transformations

Definition at line 835 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoPreprocessor()

pyfortool.scripting.applyTransfoPreprocessor (   pft,
  arg,
  args 
)
Apply preprocessor transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments

Definition at line 962 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoStatements()

pyfortool.scripting.applyTransfoStatements (   pft,
  arg,
  args,
  simplify 
)
Apply statements transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments
:param simplify: kwargs to simplify

Definition at line 915 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoTree()

pyfortool.scripting.applyTransfoTree (   pft,
  arg,
  args,
  plotCentralFile 
)
Apply tree transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments
:param plotCentralFile: central file for plots

Definition at line 946 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoVariables()

pyfortool.scripting.applyTransfoVariables (   pft,
  arg,
  args,
  simplify,
  parserOptions,
  stopScopes 
)
Apply variables transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments
:param simplify: kwargs to simplify
:param parserOptions: fxtran parser options
:param stopScopes: upper limit in call tree for some transformations

Definition at line 721 of file scripting.py.

Here is the caller graph for this function:

◆ getArgs()

pyfortool.scripting.getArgs (   parser)
Parse arguments and interpret the --optsByEnv option
:param parser: argparse parser
:return: a tuple with
           - an argparse namespace containing common arguments (not using the --optsEnv option)
           - a function taking a filename as input and returning
              - an argparse namespace with the common arguments and the ones added by
                interpreting the --optsEnv option
              - an ordered list of arguments

Definition at line 166 of file scripting.py.

Here is the caller graph for this function:

◆ getDescTree()

pyfortool.scripting.getDescTree (   args,
  cls = Tree 
)
get the Tree object built with the parsed arguments
:param args: arguments parsed by the argparse parser
:param cls: class to use (usefull for manager)
:return: a Tree instance

Definition at line 229 of file scripting.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParserOptions()

pyfortool.scripting.getParserOptions (   args)
Get the options to use for the fxtran parser
:param args: arguments parsed by the argparse parser

Definition at line 215 of file scripting.py.

Here is the caller graph for this function:

◆ main()

pyfortool.scripting.main ( )
Core of the pyfortool.py command

Definition at line 116 of file scripting.py.

Here is the call graph for this function:

◆ mainParallel()

pyfortool.scripting.mainParallel ( )
Core of the pyfortool_parallel.py command

Definition at line 58 of file scripting.py.

◆ task()

pyfortool.scripting.task (   filename)
Function to use on each file
:param clsPYFT: PYFT class to use
:param filename: file name

Definition at line 21 of file scripting.py.

Here is the call graph for this function:

◆ updateParser()

pyfortool.scripting.updateParser (   parser,
  withInput,
  withOutput,
  withXml,
  withPlotCentralFile,
  treeIsOptional,
  nbPar,
  restrictScope 
)
Updates an argparse parser with arguments common to all the different tools
:param parser: parser in which arguments are added
:param withOutput: do we need the INPUT argument
:param withOutput: do we need the OUTPUT argument
:param withXml: do we need to be able to define an XML output file
:param withPlotCentralFile: to add the --plotCentralFile argument
:param treeIsOptional: is the --tree argument optional?
:param nbPar: number of parallel processes
:param restrictScope: can we specify the scope path

Definition at line 246 of file scripting.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateParserApplications()

pyfortool.scripting.updateParserApplications (   parser)
Updates an argparse parser with applications arguments

Definition at line 487 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserChecks()

pyfortool.scripting.updateParserChecks (   parser)
Updates an argparse parser with checks arguments

Definition at line 578 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserCosmetics()

pyfortool.scripting.updateParserCosmetics (   parser)
Updates an argparse parser with cosmetics arguments

Definition at line 447 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserFxtran()

pyfortool.scripting.updateParserFxtran (   parser)
Updates an argparse parser with fxtran arguments

Definition at line 362 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserInputsOutputs()

pyfortool.scripting.updateParserInputsOutputs (   parser,
  withInput,
  withOutput,
  withXml 
)
Updates an argparse parser with input/output arguments
:param parser: parser in which arguments are added
:param withOutput: do we need the INPUT argument
:param withOutput: do we need the OUTPUT argument
:param withXml: do we need to be able to define an XML output file

Definition at line 337 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserMisc()

pyfortool.scripting.updateParserMisc (   parser)
Updates an argparse parser with misc arguments

Definition at line 612 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserOpenACC()

pyfortool.scripting.updateParserOpenACC (   parser)
Updates an argparse parser with openACC arguments

Definition at line 555 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserPreprocessor()

pyfortool.scripting.updateParserPreprocessor (   parser)
Updates an argparse parser with statements arguments

Definition at line 651 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserStatements()

pyfortool.scripting.updateParserStatements (   parser)
Updates an argparse parser with statements arguments

Definition at line 595 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserTree()

pyfortool.scripting.updateParserTree (   parser,
  withPlotCentralFile,
  treeIsOptional 
)
Updates an argparse parser with statements arguments
:param withPlotCentralFile: to add the --plotCentralFile argumen
:param treeIsOptional: is the --tree argument optional?

Definition at line 623 of file scripting.py.

Here is the caller graph for this function:

◆ updateParserVariables()

pyfortool.scripting.updateParserVariables (   parser)
Updates an argparse parser with variables arguments

Definition at line 374 of file scripting.py.

Here is the caller graph for this function:

Variable Documentation

◆ ARG_UPDATE_CNT

tuple pyfortool.scripting.ARG_UPDATE_CNT
Initial value:
1= ('--alignContinuation', '--addBeginContinuation',
2 '--removeBeginContinuation',
3 '--emoveALLContinuation')

Definition at line 161 of file scripting.py.