Skip to content

Potential future improvements

rpguiteras edited this page May 27, 2026 · 8 revisions

Users are welcome to contribute by starting an Issue.

  • (In progress) Incorporate framesets / .dtas introduced in Stata 18.

  • A scanner that can look into Stata code to determine targets and dependencies, similar to existing scanners for C, Fortran and LaTeX. Some ideas follow.

    • A preliminary version using python scripts and a Claude-type skill to guide the process are available on this wiki under Project scanner and Claude-style skill. Improvements and refinements are welcome.
    • An 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 an SConstruct by hand.
    • 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.dblite file, so perhaps it would be possible to write a program that flags which items have changed in the sconsign before and after some operation.
      • Similarly, whether an item has changed is flagged by tree(status) (or --tree=status in native SCons syntax), and tree output can be sent to text files, so one could compare tree output before and after some operation
  • Replicate nice features of Robert Picard's project, including

    • project, replicate
    • project, archive
    • project, validate

Clone this wiki locally