Skip to content

Commit

Permalink
Merge pull request #258 from worldbank/v3.2
Browse files Browse the repository at this point in the history
V3.2
  • Loading branch information
luizaandrade authored Aug 3, 2023
2 parents a998a4a + 3be59dd commit dc57121
Show file tree
Hide file tree
Showing 27 changed files with 178 additions and 135 deletions.
231 changes: 132 additions & 99 deletions run/iecodebook.do

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion run/output/iecorrect/hyphen-id.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:21
Last updated by luizaandrade on 31 Jul 2023 at 19:15:43
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-missingid.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:20
Last updated by luizaandrade on 31 Jul 2023 at 19:15:43
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-multiple-ids.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:20
Last updated by luizaandrade on 31 Jul 2023 at 19:15:43
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-nobs.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:20
Last updated by luizaandrade on 31 Jul 2023 at 19:15:42
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-precision.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:19
Last updated by luizaandrade on 31 Jul 2023 at 19:15:42
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-simple-num-id-drop.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:20
Last updated by luizaandrade on 31 Jul 2023 at 19:15:42
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-simple-num-id-numeric.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:19
Last updated by luizaandrade on 31 Jul 2023 at 19:15:42
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-simple-num-id-string.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:19
Last updated by luizaandrade on 31 Jul 2023 at 19:15:42
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-simple-num-id.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:21
Last updated by luizaandrade on 31 Jul 2023 at 19:15:44
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-template-single-id.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:19
Last updated by luizaandrade on 31 Jul 2023 at 19:15:42
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-test-idcond.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:20
Last updated by luizaandrade on 31 Jul 2023 at 19:15:42
==============================================================================*/


Expand Down
2 changes: 1 addition & 1 deletion run/output/iecorrect/iecorrect-wildcard-strings.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*==============================================================================
This do-file was created using iecorrect
Last updated by luizaandrade on 6 Feb 2023 at 11:19:20
Last updated by luizaandrade on 31 Jul 2023 at 19:15:43
==============================================================================*/


Expand Down
8 changes: 4 additions & 4 deletions src/ado_files/iecodebook.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 3.1 7JAN2023 DIME Analytics [email protected]
*! version 3.2 31JUL2023 DIME Analytics [email protected]

// Main syntax ---------------------------------------------------------------------------------

Expand Down Expand Up @@ -158,7 +158,8 @@ cap program drop iecodebook_export
program iecodebook_export

syntax [anything] [using/] ///
, [replace] [save] [saveas(string asis)] [trim(string asis)] /// User-specified options
, [replace] [save] [saveas(string asis)] /// User-specified options
[trim(string asis)] [trimkeep(string asis)] /// User-specified options
[SIGNature] [reset] [PLAINtext(string)] [noexcel] [verify] /// Signature and verify options
[match] [template(string asis)] [tempfile] // Programming options

Expand Down Expand Up @@ -274,7 +275,7 @@ qui {
di as err "You are dropping all variables. This is not allowed. {bf:iecodebook} will now exit."
error 198
}
keep `theKeepList' // Keep only variables mentioned in the dofiles
keep `theKeepList' `trimkeep' // Keep only variables mentioned in the dofiles
} // End [trim] option

// Prepare to save and sign
Expand Down Expand Up @@ -703,7 +704,6 @@ qui {
}
if "`: list allVars - theNameList'" != "" {
if "`drop'" != "" {
pause
local firstDrop "drop `: list allVars - theNameList'"
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/ado_files/iecompdup.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 3.1 7JAN2023 DIME Analytics [email protected]
*! version 3.2 31JUL2023 DIME Analytics [email protected]

capture program drop iecompdup
program iecompdup , rclass
Expand Down
2 changes: 1 addition & 1 deletion src/ado_files/iecorrect.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 3.1 7JAN2023 DIME Analytics [email protected]
*! version 3.2 31JUL2023 DIME Analytics [email protected]

cap program drop iecorrect
program iecorrect
Expand Down
2 changes: 1 addition & 1 deletion src/ado_files/ieduplicates.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 3.1 7JAN2023 DIME Analytics [email protected]
*! version 3.2 31JUL2023 DIME Analytics [email protected]

capture program drop ieduplicates
program ieduplicates , rclass
Expand Down
6 changes: 3 additions & 3 deletions src/ado_files/iefieldkit.ado
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*! version 3.1 7JAN2023 DIME Analytics [email protected]
*! version 3.2 31JUL2023 DIME Analytics [email protected]

capture program drop iefieldkit
program iefieldkit, rclass

* UPDATE THESE LOCALS FOR EACH NEW VERSION PUBLISHED
local version "3.1"
local versionDate "7JAN2023"
local version "3.2"
local versionDate "31JUL2023"

syntax [anything]

Expand Down
16 changes: 12 additions & 4 deletions src/ado_files/ietestform.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 3.1 7JAN2023 DIME Analytics [email protected]
*! version 3.2 31JUL2023 DIME Analytics [email protected]

capture program drop ietestform
program ietestform , rclass
Expand Down Expand Up @@ -232,9 +232,17 @@ qui {
TEST - Encryption key not included/errors
***********************************************/

*converting public_key to string to convert from numeric incase of missing public_key
tostring public_key, replace
local public_key = public_key[1]
*Testing if a variable pulbic_key at all exists
cap confirm variable public_key
if _rc {
local public_key = ""
}
*If varialbe exists, convert whatever value (or missing) to string
else {
tostring public_key, replace
local public_key = public_key[1]
}


cap assert !missing("`public_key'")

Expand Down
8 changes: 5 additions & 3 deletions src/help_files/iecodebook.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* 7 Jan 2023}{...}
{* 31 Jul 2023}{...}
{hline}
help for {hi:iecodebook}
{hline}
Expand Down Expand Up @@ -83,7 +83,7 @@ and optionally reduces the dataset to only the variables used in a set of specif
{p 2 4}, [{bf:replace}] [{opt save}] [{bf:verify}] {break}
[{opt sign:ature}] [{opt reset}] {break}
[{opt plain:text}({it:compact} | {it:detailed})] [{opt noexcel}] {break}
[{bf:trim(}{it:"/path/to/dofile1.do"} [{it:"/path/to/dofile2.do"}] [...]{bf:)}]{p_end}
[{bf:trim(}{it:"/path/to/dofile1.do"} [{it:"/path/to/dofile2.do"}] [...]{bf:)}] [{opth trimkeep(varlist)}]{p_end}

{hline}

Expand Down Expand Up @@ -157,7 +157,7 @@ It will break with an error and describe all changes if there are any difference
A new codebook will not be written in this case.{p_end}
{break}
{synopt:{opt plain:text}({it:compact} | {it:detailed})}This option requests that the codebook be created as a plaintext file.
This file contains the default output of {help codebook} if argument {it:detailed}} is used,
This file contains the default output of {help codebook} if argument {it:detailed}} is used,
and the compact output of {help codebook} if argument {it:compact} is used.
Only one of the arguments can be used}.{p_end}
{synopt:{opt noexcel}}This option requests that the codebook be created as a plaintext file.
Expand All @@ -174,6 +174,8 @@ or overwrite an existing datasignature.{p_end}
{break}
{synopt:{opt trim()}}This option takes one or more dofiles as inputs, and trims the current dataset to only include variables used in those dofiles,
before executing any of the other {bf: export} tasks requested.{p_end}
{synopt:{opt trimkeep()}}This option adjusts {opt trim()} to retain additional
variables (such as ID variables) that are desired, but not used in code.{p_end}
{synoptline}

{marker example}
Expand Down
2 changes: 1 addition & 1 deletion src/help_files/iecompdup.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* 7 Jan 2023}{...}
{* 31 Jul 2023}{...}
{hline}
help for {hi:iecompdup}
{hline}
Expand Down
2 changes: 1 addition & 1 deletion src/help_files/iecorrect.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* 7 Jan 2023}{...}
{* 31 Jul 2023}{...}
{hline}
help for {hi:iecorrect}
{hline}
Expand Down
2 changes: 1 addition & 1 deletion src/help_files/ieduplicates.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* 7 Jan 2023}{...}
{* 31 Jul 2023}{...}
{hline}
help for {hi:ieduplicates}
{hline}
Expand Down
2 changes: 1 addition & 1 deletion src/help_files/iefieldkit.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* 7 Jan 2023}{...}
{* 31 Jul 2023}{...}
{hline}
help for {hi:iefieldkit}
{hline}
Expand Down
2 changes: 1 addition & 1 deletion src/help_files/ietestform.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* 7 Jan 2023}{...}
{* 31 Jul 2023}{...}
{hline}
help for {hi:ietestform}
{hline}
Expand Down
2 changes: 1 addition & 1 deletion src/iefieldkit.pkg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v 3.1
v 3.2
d iefieldkit. DIME Analytics iefieldkit
d DIME Analytics, World Bank Group, Development Economics Research
f /ado_files/iefieldkit.ado
Expand Down
2 changes: 1 addition & 1 deletion src/stata.toc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
v 3.1
v 3.2
d DIME Analytics, World Bank Group, Development Economics Research
p iefieldkit DIME Analytics iefieldkit

0 comments on commit dc57121

Please sign in to comment.