Fortpy Global Configuration
FORTPY: Global Configuration
Global configuration for all of Fortpy is stored in the
config.xml file. Look at the example file showing most of the settings currently implemented.
Specifies the path to the
compilers.xml file that lists the compilers available on the local system and which ones to use. The path should be included in the inner-XML of the tag. See handling multiple compilers for more details.
When developing real-life codes, new libraries are often compiled with several other code bases that exist in different folders. By default, Fortpy will add all the files in the same folder as the one being edited to the parser. When files are added to the parser, their contents become available to the intellisense feature. However, any modules referenced outside of the current folder will not be parsed unless they are specified in a
The only element with meaning in the
<codes> tag is a
<trunk> tag, which specifies the path to a code folder whose
*.f90 files should be added to the parser. It has two attributes:
- name an identifier for the library whose source files are in value. Currently this has no meaning internally in Fortpy, but serves as an identifier for the developer.
- value is the full path (or path relative to the user directory) to the folder that holds the code files for the library.
Sometimes developers choose to name the
*.f90 file differently than the actual module it contains. For example when a single
*.f90 file contains multiple modules. By default, Fortpy searches for modules by taking the name referenced in a use statement (e.g.
use module) and appending
.f90 to it. In the example, it would search the current folder and any other folders referenced in
<codes> for a file called
module.f90 to parse. If it doesn't find it, Fortpy may throw an exception depending on whether it is running in unit testing mode (where every module is required) or auto-complete mode (where the suggestions are just incomplete if the module is missing).
To specify the location of a module with a non-standard file name, add a
<map> tag to the
module is the name of the module referenced in
- file is the name of the file (no folder paths necessary) that houses the module definition.
Often, code is edited and executed on a remote server (e.g. supercomputer) via SSH. In emacs, for example, files can be edited directly using tramp. Since the file is copied via SCP, the other files in its remote folder can't be accessed conventionally for intellisense support. In this case, Fortpy can still provide isense support by copying files over SCP in the background, and parsing them as usual. A file caching feature means that network copies only happen when code files change. The
<ssh> tag specifies SSH server settings and provides an additional
<codes> tag for the file system configuration on the remote server. The
<codes> tag is identical to the one described above. A
<mappings> tag may also be included for module mappings on the remote server. Server settings are specified with a
- name is the FQDN of the remote server that accepts SSH connections.
- username is the name of the user to use for authentication.
- pkey is the path to a private key file to use for authentication so that a password doesn't need to be requested each time an SSH connection is created or a copy is performed.
The auto-completion suggestions are customizable using an
<isense> tag. Since the documentation standard uses XML, a developer can create their own tags and attributes when documenting code. The Fortpy parsers will extract these and associate them with the correct code elements. When suggestions are provided in real-time by Fortpy, the content can be changed dynamically using settings in this section.
Fortpy provides signature completion and function name/parameter suggestions for the built-in fortran functions.
uppercase specifies whether the function name suggestions should be given in uppercase. Unless
uppercase="true", the suggestions are given in lowercase.