worldbank / repkit

A Stata package with tools related to computational reproducibility
https://worldbank.github.io/repkit/
6 stars 0 forks source link

`reprun`: command `reprun_dataline` is not recognized after running on main that changes the ado path #32

Open luisesanmartin opened 6 months ago

luisesanmartin commented 6 months ago

Tried reprun on a main do-file that changes the ado path with the line

sysdir set PLUS "${dos}/ado"

and it returned the error:

    Starting reprun. Creating the do-files for run 1 and run 2.
    Done creating the do-files for run 1 and run 2.
    Executing "00.Master.do" for run 1.
command reprun_dataline is unrecognized
r(199);

I think this is happening because the ado changes in the middle of the code execution of the input do-file to a path that doesn't have reprun or repkit installed and then doesn't recognize commands from reprun. Perhaps it would be better if it used the ado paths set by default when opening Stata for calling reprun commands instead of looking in the local ado paths of the do-file it's run on

kbjarkefur commented 5 months ago

Hm, I am not sure it is possible to retrieve the default setting on that person's computer once it is changed with sysdir set PLUS "${dos}/ado". I wonder if the best solution here is to just install repkit in that PLUS folder. It can always be uninstalled afterwards

kbjarkefur commented 5 months ago

Discussed with @bbdaniels, for now, just write in documentation that repkit needs to be installed in project ado if that is used

bbdaniels commented 4 months ago

Duplicate of #3, see #33

ankritisingh commented 1 month ago

Is this one done or should this be moved to next-release?