execnb 0.1.9__tar.gz → 0.1.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {execnb-0.1.9/execnb.egg-info → execnb-0.1.11}/PKG-INFO +4 -4
- {execnb-0.1.9 → execnb-0.1.11}/README.md +3 -3
- execnb-0.1.11/execnb/__init__.py +1 -0
- {execnb-0.1.9 → execnb-0.1.11}/execnb/_modidx.py +2 -2
- {execnb-0.1.9 → execnb-0.1.11}/execnb/shell.py +8 -7
- {execnb-0.1.9 → execnb-0.1.11/execnb.egg-info}/PKG-INFO +4 -4
- {execnb-0.1.9 → execnb-0.1.11}/settings.ini +1 -1
- execnb-0.1.9/execnb/__init__.py +0 -1
- {execnb-0.1.9 → execnb-0.1.11}/LICENSE +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/MANIFEST.in +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/execnb/nbio.py +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/execnb.egg-info/SOURCES.txt +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/execnb.egg-info/dependency_links.txt +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/execnb.egg-info/entry_points.txt +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/execnb.egg-info/not-zip-safe +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/execnb.egg-info/requires.txt +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/execnb.egg-info/top_level.txt +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/pyproject.toml +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/setup.cfg +0 -0
- {execnb-0.1.9 → execnb-0.1.11}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: execnb
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.11
|
4
4
|
Summary: A description of your project
|
5
5
|
Home-page: https://github.com/AnswerDotAI/execnb/
|
6
6
|
Author: Jeremy Howard
|
@@ -48,7 +48,7 @@ mamba installed.)
|
|
48
48
|
## How to use
|
49
49
|
|
50
50
|
Use
|
51
|
-
[`CaptureShell`](https://
|
51
|
+
[`CaptureShell`](https://AnswerDotAI.github.io/execnb/shell.html#captureshell)
|
52
52
|
to run Jupyter code and capture notebook outputs, without running a
|
53
53
|
Jupyter server (or even having it installed):
|
54
54
|
|
@@ -69,7 +69,7 @@ s.run('1+1')
|
|
69
69
|
'execution_count': 1}]
|
70
70
|
|
71
71
|
To execute a notebook and save it with outputs filled in, use
|
72
|
-
[`CaptureShell.execute`](https://
|
72
|
+
[`CaptureShell.execute`](https://AnswerDotAI.github.io/execnb/shell.html#captureshell.execute):
|
73
73
|
|
74
74
|
``` python
|
75
75
|
try:
|
@@ -81,7 +81,7 @@ finally: Path('tmp.ipynb').unlink()
|
|
81
81
|
[{'name': 'stdout', 'output_type': 'stream', 'text': ['1\n']}, {'data': {'text/plain': ['2']}, 'execution_count': 3, 'metadata': {}, 'output_type': 'execute_result'}]
|
82
82
|
|
83
83
|
You can also execute notebooks from the command line with
|
84
|
-
[`exec_nb`](https://
|
84
|
+
[`exec_nb`](https://AnswerDotAI.github.io/execnb/shell.html#exec_nb):
|
85
85
|
|
86
86
|
``` python
|
87
87
|
!exec_nb --help
|
@@ -23,7 +23,7 @@ mamba installed.)
|
|
23
23
|
## How to use
|
24
24
|
|
25
25
|
Use
|
26
|
-
[`CaptureShell`](https://
|
26
|
+
[`CaptureShell`](https://AnswerDotAI.github.io/execnb/shell.html#captureshell)
|
27
27
|
to run Jupyter code and capture notebook outputs, without running a
|
28
28
|
Jupyter server (or even having it installed):
|
29
29
|
|
@@ -44,7 +44,7 @@ s.run('1+1')
|
|
44
44
|
'execution_count': 1}]
|
45
45
|
|
46
46
|
To execute a notebook and save it with outputs filled in, use
|
47
|
-
[`CaptureShell.execute`](https://
|
47
|
+
[`CaptureShell.execute`](https://AnswerDotAI.github.io/execnb/shell.html#captureshell.execute):
|
48
48
|
|
49
49
|
``` python
|
50
50
|
try:
|
@@ -56,7 +56,7 @@ finally: Path('tmp.ipynb').unlink()
|
|
56
56
|
[{'name': 'stdout', 'output_type': 'stream', 'text': ['1\n']}, {'data': {'text/plain': ['2']}, 'execution_count': 3, 'metadata': {}, 'output_type': 'execute_result'}]
|
57
57
|
|
58
58
|
You can also execute notebooks from the command line with
|
59
|
-
[`exec_nb`](https://
|
59
|
+
[`exec_nb`](https://AnswerDotAI.github.io/execnb/shell.html#exec_nb):
|
60
60
|
|
61
61
|
``` python
|
62
62
|
!exec_nb --help
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.1.11"
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
d = { 'settings': { 'branch': 'master',
|
4
4
|
'doc_baseurl': '/execnb/',
|
5
|
-
'doc_host': 'https://
|
6
|
-
'git_url': 'https://github.com/
|
5
|
+
'doc_host': 'https://AnswerDotAI.github.io',
|
6
|
+
'git_url': 'https://github.com/AnswerDotAI/execnb/',
|
7
7
|
'lib_path': 'execnb'},
|
8
8
|
'syms': { 'execnb.nbio': { 'execnb.nbio.NbCell': ('nbio.html#nbcell', 'execnb/nbio.py'),
|
9
9
|
'execnb.nbio.NbCell.__eq__': ('nbio.html#nbcell.__eq__', 'execnb/nbio.py'),
|
@@ -18,7 +18,7 @@ from IPython.core.interactiveshell import InteractiveShell, ExecutionInfo, Execu
|
|
18
18
|
from IPython.core.displayhook import DisplayHook
|
19
19
|
from IPython.utils.capture import capture_output
|
20
20
|
from IPython.utils.text import strip_ansi
|
21
|
-
from IPython.core.completer import IPCompleter,provisionalcompleter
|
21
|
+
from IPython.core.completer import IPCompleter,provisionalcompleter,Completer
|
22
22
|
from IPython.core.hooks import CommandChainDispatcher
|
23
23
|
from IPython.core.completerlib import module_completer
|
24
24
|
from IPython.utils.strdispatch import StrDispatch
|
@@ -99,8 +99,8 @@ def run_cell(self:CaptureShell, raw_cell, store_history=False, silent=False, she
|
|
99
99
|
|
100
100
|
# %% ../nbs/02_shell.ipynb
|
101
101
|
def format_exc(e):
|
102
|
-
"Format exception `e` as a string"
|
103
|
-
return
|
102
|
+
"Format exception `e` as a string list"
|
103
|
+
return traceback.format_exception(type(e), e, e.__traceback__)
|
104
104
|
|
105
105
|
# %% ../nbs/02_shell.ipynb
|
106
106
|
def _out_stream(text, name): return dict(name=name, output_type='stream', text=text.splitlines(True))
|
@@ -131,7 +131,8 @@ def _out_nb(o, fmt):
|
|
131
131
|
if r is not None and not o.quiet:
|
132
132
|
res.append(_mk_out(*fmt.format(r), 'execute_result'))
|
133
133
|
if 'execution_count' not in o: o['execution_count']=None
|
134
|
-
for p in res:
|
134
|
+
for p in res:
|
135
|
+
if p["output_type"]=="execute_result": p['execution_count'] = o['execution_count']
|
135
136
|
return res
|
136
137
|
|
137
138
|
# %% ../nbs/02_shell.ipynb
|
@@ -306,9 +307,9 @@ class SmartCompleter(IPCompleter):
|
|
306
307
|
def __call__(self, c):
|
307
308
|
if not c: return []
|
308
309
|
with provisionalcompleter():
|
309
|
-
|
310
|
-
|
311
|
-
|
310
|
+
res = [o.text.rpartition('.')[-1] for o in self.completions(c, len(c)) if o.type!='magic']
|
311
|
+
if res and res[0][-1]=='=': res = [o for o in res if o[-1]=='=']
|
312
|
+
return res
|
312
313
|
|
313
314
|
# %% ../nbs/02_shell.ipynb
|
314
315
|
@patch
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: execnb
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.11
|
4
4
|
Summary: A description of your project
|
5
5
|
Home-page: https://github.com/AnswerDotAI/execnb/
|
6
6
|
Author: Jeremy Howard
|
@@ -48,7 +48,7 @@ mamba installed.)
|
|
48
48
|
## How to use
|
49
49
|
|
50
50
|
Use
|
51
|
-
[`CaptureShell`](https://
|
51
|
+
[`CaptureShell`](https://AnswerDotAI.github.io/execnb/shell.html#captureshell)
|
52
52
|
to run Jupyter code and capture notebook outputs, without running a
|
53
53
|
Jupyter server (or even having it installed):
|
54
54
|
|
@@ -69,7 +69,7 @@ s.run('1+1')
|
|
69
69
|
'execution_count': 1}]
|
70
70
|
|
71
71
|
To execute a notebook and save it with outputs filled in, use
|
72
|
-
[`CaptureShell.execute`](https://
|
72
|
+
[`CaptureShell.execute`](https://AnswerDotAI.github.io/execnb/shell.html#captureshell.execute):
|
73
73
|
|
74
74
|
``` python
|
75
75
|
try:
|
@@ -81,7 +81,7 @@ finally: Path('tmp.ipynb').unlink()
|
|
81
81
|
[{'name': 'stdout', 'output_type': 'stream', 'text': ['1\n']}, {'data': {'text/plain': ['2']}, 'execution_count': 3, 'metadata': {}, 'output_type': 'execute_result'}]
|
82
82
|
|
83
83
|
You can also execute notebooks from the command line with
|
84
|
-
[`exec_nb`](https://
|
84
|
+
[`exec_nb`](https://AnswerDotAI.github.io/execnb/shell.html#exec_nb):
|
85
85
|
|
86
86
|
``` python
|
87
87
|
!exec_nb --help
|
execnb-0.1.9/execnb/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.1.9"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|