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 664 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 771 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 902 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 857 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 707 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 934 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 837 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 964 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 917 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 948 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 722 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 228 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 214 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 245 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 488 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 579 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 448 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 361 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 336 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 613 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 556 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 652 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 596 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 624 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 375 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.