-
Notifications
You must be signed in to change notification settings - Fork 235
Description
Generally speaking, we're using consistent names for input/output tables/grids. For example, we have
- the
dataparameter for most modules that read a table (with a few exceptions) - the
outfileparameter (and alsooutput_typeparameter) for modules that write a table - the
gridparameter for modules that read a grid - the
outgridparameter for modules that write a grid
But for virtual files, w're using different names like infile, fname, grdfile, and csvfile. For example,
Line 117 in 00dccb4
| with file_context as infile: |
Line 121 in 00dccb4
| with file_context as fname: |
Line 299 in 00dccb4
| ) as grdfile, lib.virtualfile_from_data( |
Line 301 in 00dccb4
| ) as csvfile: |
Things become more complicated when we try to fully get rid of temporary files (#2730) using virtual files. For example, the grdtrack function takes a grid file and a table file as input, and writes to a table file. For the three files:
- the input grid:
grid[consistent with other modules] - the input table:
points[good name for this module] - the output table:
outfile[consistent with other modules]
Since we're using virtual files, we also need three virtual file names. In the current grdtrack codes, we use grdfile and csvfile. They're not good names, so I decided to use ingrid, infile and outvfile in PR #2733, but these three names are also bad, especially that outvfile and outfile are very similar and sometimes makes me lost.
I believe we will benefit a lot if we can have consistent (exceptions are allowed) and meaningful names for virtual files. IMO, a good name should make it clear that the name is linked to a virtual file, is a input or output file, and is a grid or a table. I think it makes sense to use a leading v for virtual files.
Maybe names like vingrid, vintable, voutgrid, vouttable (a little too long) or vigrid, vogrid, votbl, vitbl (not readable)?
Thoughts?