worldbank / repkit

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

Add timer and "no errors" reporting #63

Closed ankritisingh closed 4 months ago

ankritisingh commented 4 months ago
  1. Added a time which is displayed in seconds if less than a minute, and in minutes otherwise.

In seconds:

image

In minutes:

image

  1. For stable results: It displays a line if the table is empty:

image

. However, if there were any changes reported in the "main.do" file, the line "no mismatches" does not appear when "stepping back into the file." I couldn't determine how to include this, but I believe it is fine (for now at least) since changes were reported at least once in that file. See below:

image

ankritisingh commented 4 months ago

@bbdaniels Updated the help file here for your review.

bbdaniels commented 4 months ago

@bbdaniels Updated the help file here for your review.

Great start! The example should be modified a little bit. I would not include bysort here since we are still working on handling that functionality correctly -- just use sort and gen directly.

I would also split into two examples -- one where an issue is due to the lack of a seed, and one where it is due to an unstable sort.

We should then include the exact output from reprun so the user can see it for all settings, and also see how early mismatches cause later ones. Then, for each of these two examples, show the resolution.

Similarly, I would expand the example of a recursive call to show that functionality -- perhaps put a sorting issue in one file and a seeding issue in another, and show how solving them top-to-bottom works (and perhaps put in a cascading issue where solving bottom-to-top does not produce a solution).

ankritisingh commented 4 months ago

@bbdaniels Updated the help file here for your review.

Great start! The example should be modified a little bit. I would not include bysort here since we are still working on handling that functionality correctly -- just use sort and gen directly.

I would also split into two examples -- one where an issue is due to the lack of a seed, and one where it is due to an unstable sort.

We should then include the exact output from reprun so the user can see it for all settings, and also see how early mismatches cause later ones. Then, for each of these two examples, show the resolution.

Similarly, I would expand the example of a recursive call to show that functionality -- perhaps put a sorting issue in one file and a seeding issue in another, and show how solving them top-to-bottom works (and perhaps put in a cascading issue where solving bottom-to-top does not produce a solution).

Okay, thanks! I will update the examples. I tried adding the results, but since we are using ad_sthlp, they are not being displayed properly in .md version and then won't display in the smcl version too. I will try again though.

ankritisingh commented 4 months ago

@bbdaniels Updated the help file here for your review.

Great start! The example should be modified a little bit. I would not include bysort here since we are still working on handling that functionality correctly -- just use sort and gen directly. I would also split into two examples -- one where an issue is due to the lack of a seed, and one where it is due to an unstable sort. We should then include the exact output from reprun so the user can see it for all settings, and also see how early mismatches cause later ones. Then, for each of these two examples, show the resolution. Similarly, I would expand the example of a recursive call to show that functionality -- perhaps put a sorting issue in one file and a seeding issue in another, and show how solving them top-to-bottom works (and perhaps put in a cascading issue where solving bottom-to-top does not produce a solution).

Okay, thanks! I will update the examples. I tried adding the results, but since we are using ad_sthlp, they are not being displayed properly in .md version and then won't display in the smcl version too. I will try again though.

@bbdaniels I updated the examples, splitting into two for clarity and reusing content for main.do to keep things concise. I tried to include the result, but the tables don't render well in Markdown or SMCL due to issues with merging cells. It seems that using ad_sthlp isn't a viable option here.

Maybe @kbjarkefur knows how to do it with ad_sthlp

Alternatively, we could link to a Dime Wiki article, as we've done for other commands. This would allow us to include screenshots and other details. I can work on this after the Stata conference.

bbdaniels commented 4 months ago

Retargeting to dev so we can finish after conference