-
Notifications
You must be signed in to change notification settings - Fork 0
Potential future improvements
rpguiteras edited this page Feb 29, 2024
·
8 revisions
Users are welcome to contribute by starting an Issue.
-
A scanner that can look into Stata code to determine targets and dependencies, similar to existing scanners for C, Fortran and LaTeX.
- There might be some ideas in this intriguingly titled Medium post by Asjad Naqvi, Parsing Stata dofiles for variable lists, which unfortunately is behind a paywall.
- A more modest version would be to scan do-files (or log-files) for keywords that indicate targets (e.g.,
save,saving,graph export,export delimited,file write, etc.) and dependencies (e.g.,use,import, etc.) and print the lines of code containing these keywords to a file. This would semi-automate the process of searching do-files (and others, e.g., ado-files) for inputs and outputs, although the user would still have to code these into anSConstructby hand.- There may be some useful ideas in IPA's
findcmd, "Stata command to automatically find commands used in a do or ado file," https://github.com/PovertyAction/findcmd
- There may be some useful ideas in IPA's
- Similarly, a program could be written to compare timestamps or signatures of all files (or all files of a certain type, e.g., all
dta,.sters,.gph,.tex, etc.) in a directory before and after a do-file is run to see which files have changed.- For inputs, outputs and code that are already encoded in the SConstruct, this data is recorded in the
sconsign.dblitefile, so perhaps it would be possible to write a program that flags which items have changed in thesconsignbefore and after some operation. - Similarly, whether an item has changed is flagged by
tree(status)(or--tree=statusin native SCons syntax), and tree output can be sent to text files, so one could comparetreeoutput before and after some operation
- For inputs, outputs and code that are already encoded in the SConstruct, this data is recorded in the
-
Replicate nice features of Robert Picard's
project, includingproject, replicateproject, archiveproject, validate