Skip to content

Commit 79de66a

Browse files
committed
Update docs re Stata 18.5+
1 parent 9bbca67 commit 79de66a

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,20 @@ which is needlessly clunky if you are working primarily with Stata).
3333
- [x] [Easy
3434
setup](https://hugetim.github.io/nbstata/user_guide.html#install)
3535
- [x] Works with Stata 17+ (only).
36-
- [x] Displays Stata output without the redundant ‘echo’ of (multi-line)
37-
commands
38-
- [x] Autocompletion for variables, macros, matrices, and file paths
3936
- [x] DataGrid widget with `browse`-like capabilities (e.g., interactive
4037
filtering)
4138
- [x] Variable and data properties available in a ‘contextual help’ side
4239
panel
43-
- [x] Interactive/richtext help files accessible within notebook
44-
- [x] `#delimit ;` interactive support (along with all types of
45-
comments)
4640
- [x] Quarto [inline
4741
code](https://quarto.org/docs/computations/inline-code.html) support
4842

43+
Users of Stata 17 or 18.0 also get these features only built-in natively
44+
to Stata 18.5+: - Displays Stata output without the redundant ‘echo’ of
45+
(multi-line) commands - Autocompletion for variables, macros, matrices,
46+
and file paths - Interactive/richtext help files accessible within
47+
notebook - `#delimit ;` interactive support (along with all types of
48+
comments)
49+
4950
The video below demonstrates using Stata in a Jupyter notebook. In
5051
addition to the
5152
[NBClassic](https://nbclassic.readthedocs.io/en/stable/notebook.html)

nbs/index.ipynb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@
5151
"\n",
5252
"- [x] [Easy setup](https://hugetim.github.io/nbstata/user_guide.html#install)\n",
5353
"- [x] Works with Stata 17+ (only).\n",
54-
"- [x] Displays Stata output without the redundant 'echo' of (multi-line) commands\n",
55-
"- [x] Autocompletion for variables, macros, matrices, and file paths\n",
5654
"- [x] DataGrid widget with `browse`-like capabilities (e.g., interactive filtering)\n",
5755
"- [x] Variable and data properties available in a 'contextual help' side panel\n",
58-
"- [x] Interactive/richtext help files accessible within notebook\n",
59-
"- [x] `#delimit ;` interactive support (along with all types of comments)\n",
60-
"- [x] Quarto [inline code](https://quarto.org/docs/computations/inline-code.html) support"
56+
"- [x] Quarto [inline code](https://quarto.org/docs/computations/inline-code.html) support\n",
57+
"\n",
58+
"Users of Stata 17 or 18.0 also get these features only built-in natively to Stata 18.5+:\n",
59+
"- Displays Stata output without the redundant 'echo' of (multi-line) commands\n",
60+
"- Autocompletion for variables, macros, matrices, and file paths\n",
61+
"- Interactive/richtext help files accessible within notebook\n",
62+
"- `#delimit ;` interactive support (along with all types of comments)"
6163
]
6264
},
6365
{

nbs/user_guide.ipynb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@
119119
" Specify the last option if you want to use `pystata`'s [default setting](https://www.stata.com/python/pystata18/config.html#pystata.config.set_graph_format). \n",
120120
"- `graph_width`/`graph_height`: By default, graphs are generated with width 5.5in and height 4in. The width or height may be specified as a number (interpreted as inches) or a number and its unit (in, cm, or px). So `3` and `3in` are equivalent. Other valid examples: `300px` and `7.2 cm`. (Note: These values may also be set to `default`, which values alone enable the `xsize` and `ysize` options on Stata graph commands to influence the graph output size. Any values other than `default` override the `xsize` and `ysize` options.)\n",
121121
"- `echo`: controls the echo of commands, with the default being 'None':\n",
122-
" - 'True': the kernel will echo all commands. \n",
123-
" - 'False': the kernel will not echo single-line commands.\n",
124-
" - 'None': the kernel will not echo any command. \n",
122+
" - 'True': echo all commands. \n",
123+
" - 'False': for Stata 18.5+, not echo any command (native Stata implementation); otherwise echo (only) multi-line commands.\n",
124+
" - 'None': not echo any command (custom nbstata implementation). \n",
125125
"- `missing`: What to display for a missing value in the output of the `%browse`, `%head`, and `%tail` magics. Default is '.', following Stata. To defer to pandas's format for `NaN`, specify 'pandas'.\n",
126126
"- `browse_auto_height`: Whether to set 'height: 100%' for the [%browse](#browse-head-tail-and-frame-equivalents) widget (default: 'True'):\n",
127127
" - 'True': allows browse widget to expand to height of its container, such as when using 'Create New View for Output' in Jupyter Lab.\n",
@@ -442,7 +442,9 @@
442442
"cell_type": "markdown",
443443
"metadata": {},
444444
"source": [
445-
"The default `echo = None` configuration does some complicated things under the hood to emulate functionality that *pystata* does not directly support: running multi-line Stata code without echoing the commands. While extensive automatic tests are in place to help ensure its reliability, unanticipated issues may arise. If, while using this mode, a particular code cell is not working as expected, try placing the `%%echo` magic at the top of it to see if that resolves the issue. (If so, please report that [here](https://github.com/hugetim/nbstata/issues/new?labels=bug).) You can also avoid such potential issues by setting the config `echo = False`, which will at least not echo single-line Stata commands though it will echo multiple commands."
445+
"With Stata 18.5+, `echo = False` is recommended.\n",
446+
"\n",
447+
"The default `echo = None` configuration does some complicated things under the hood to emulate functionality that *pystata* does not directly support: running multi-line Stata code without echoing the commands. While extensive automatic tests are in place to help ensure its reliability, unanticipated issues may arise. If, while using this mode, a particular code cell is not working as expected, try placing the `%%echo` magic at the top of it to see if that resolves the issue. (If so, please report that [here](https://github.com/hugetim/nbstata/issues/new?labels=bug).) You can also avoid such potential issues by setting the config `echo = False`, which will at least not echo single-line Stata commands though it will echo multiple commands for Stata 17 and 18.0."
446448
]
447449
},
448450
{

0 commit comments

Comments
 (0)