Input Filenames in NOMAD's Parsers
Cc: @mscheidg
In this entry we aim to list the filenames needed for each NOMAD parser. Such list will contain at least two subgroups, necessary and optional input filenames.
Since different parsers were coded by different developers, we deal with assorted coding styles. Therefore we expect some manual work to curate each list.
We can get started by doing a deep search on each parser directory, looking for lines of code that aim to open files. This will probably point to a variable name. Then we do a second deep search for each variable name found in the first search, this time looking for lines of code that define the variable name.
Example
For the exciting code, first we look for lines that contain with open
on all *.py
files. Hits will look like with open(fname) as
. Then we parse such lines in order to pick up the fname
's.
Then we do a second deep search on all *.py
files in order to search for lines that seem to define the fname
's found in the 1st search. For example, for fname='xsFile'
, such line looks like xsFile = os.path.join(dirPath, "INFOXS.OUT")
. Then we parse such lines in order to pick up the 2nd argument of os.path.join()
. For the exciting
parser this procedure gives almost all input filenames.
For other parsers it might be different.