Should Stata recursively look for custom ingath directories?

I use Stata 14.1 on Windows 8.1 and moved my personal .ado files to the GitHub repository. This puts foo.ado in "C: / Users / Richard / Documents / GitHub / foo /", bar.ado in "C: / Users / Richard / Documents / GitHub / bar / etc. etc.

I added the root directory of GitHub to adopathusing adopath + "C:/Users/Richard/Documents/GitHub/", but Stata did not look for "foo", "bar" and other subdirectories for .ado files. I fixed this by adding the foo.ado repository using adopath + "C:/Users/Richard/Documents/GitHub/foo", etc.

I expected Stata to look for "C: / Users / Richard / Documents / GitHub /" recursively because it does this for BASE, SITEand PLUS. Is recursive search limited to default directories adopath?

To be fair, it's easy to add ten directories to adopath, but I want to follow best practices. I can not find much about adopathbesides help adopaththis 1996 FAQ .

+4
source share
1 answer

Stata is not exactly recursively looking for BASE, SITE, and PLUS. It performs a search in each directory and inside the directory it will search in one subdirectory, which has the first letter of the desired command as its name.

Inside PERSONAL, I created a subdirectory fand put it in it foo.ado. When I entered the command fooin the Stata command prompt window, Stata detected foo.adoand ran the program inside.

, , Stat PERSONAL , StataCorp , , " " .

Mac f gnxl,

cd ~/Library/Application Support/Stata/ado/personal
ln -s gnxl/foo.ado .

, Stata, foo . , , , ado. GitHub, , .

+5

Source: https://habr.com/ru/post/1648305/


All Articles