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

Functions

 task (filename)
 
 mainParallel (argv=None)
 
 main (argv=None)
 
 getArgs (parser, argv)
 
 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, stopScopes)
 
 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 706 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 814 of file scripting.py.

Here is the caller graph for this function:

◆ applyTransfoChecks()

pyfortool.scripting.applyTransfoChecks (   pft,
  arg,
  args,
  stopScopes 
)
Apply checks transformations on a PYFT instance
:param pft: PYFT instance
:param arg: argument to deal with
:param args: parsed argparsed arguments
:param stopScopes: list of scope paths or None

Definition at line 955 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 908 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 749 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 999 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 886 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 1029 of file scripting.py.

Here is the call graph for this function:
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 982 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 1013 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 764 of file scripting.py.

Here is the caller graph for this function:

◆ getArgs()

pyfortool.scripting.getArgs (   parser,
  argv 
)
Parse arguments and interpret the --optsByEnv option
:param parser: argparse parser
:param argv: list of arguments (including the 'programm' name in first position)
             as would be obtained by sys.argv. Or None to use sys.argv.
: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 173 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 240 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 226 of file scripting.py.

Here is the caller graph for this function:

◆ main()

pyfortool.scripting.main (   argv = None)
Core of the pyfortool.py command
:param argv: list of arguments (including the 'programm' name in first position)
             as would be obtained by sys.argv. Or None to use sys.argv

Definition at line 121 of file scripting.py.

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

◆ mainParallel()

pyfortool.scripting.mainParallel (   argv = None)
Core of the pyfortool_parallel.py command
:param argv: list of arguments (including the 'programm' name in first position)
             as would be obtained by sys.argv. Or None to use sys.argv

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 257 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 503 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 605 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 460 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 373 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 348 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 655 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 579 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 694 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 638 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 666 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 385 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 168 of file scripting.py.