execnb 0.1.12__tar.gz → 0.1.14__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.12/execnb.egg-info → execnb-0.1.14}/PKG-INFO +15 -2
- execnb-0.1.14/execnb/__init__.py +1 -0
- {execnb-0.1.12 → execnb-0.1.14}/execnb/_modidx.py +2 -1
- {execnb-0.1.12 → execnb-0.1.14}/execnb/shell.py +10 -7
- {execnb-0.1.12 → execnb-0.1.14/execnb.egg-info}/PKG-INFO +15 -2
- execnb-0.1.14/pyproject.toml +11 -0
- {execnb-0.1.12 → execnb-0.1.14}/settings.ini +3 -2
- execnb-0.1.12/execnb/__init__.py +0 -1
- execnb-0.1.12/pyproject.toml +0 -3
- {execnb-0.1.12 → execnb-0.1.14}/LICENSE +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/MANIFEST.in +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/README.md +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/execnb/nbio.py +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/execnb.egg-info/SOURCES.txt +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/execnb.egg-info/dependency_links.txt +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/execnb.egg-info/entry_points.txt +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/execnb.egg-info/not-zip-safe +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/execnb.egg-info/requires.txt +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/execnb.egg-info/top_level.txt +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/setup.cfg +0 -0
- {execnb-0.1.12 → execnb-0.1.14}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: execnb
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.14
|
4
4
|
Summary: A description of your project
|
5
5
|
Home-page: https://github.com/AnswerDotAI/execnb/
|
6
6
|
Author: Jeremy Howard
|
@@ -22,6 +22,19 @@ Provides-Extra: dev
|
|
22
22
|
Requires-Dist: matplotlib; extra == "dev"
|
23
23
|
Requires-Dist: Pillow; extra == "dev"
|
24
24
|
Requires-Dist: mistletoe; extra == "dev"
|
25
|
+
Dynamic: author
|
26
|
+
Dynamic: author-email
|
27
|
+
Dynamic: classifier
|
28
|
+
Dynamic: description
|
29
|
+
Dynamic: description-content-type
|
30
|
+
Dynamic: home-page
|
31
|
+
Dynamic: keywords
|
32
|
+
Dynamic: license
|
33
|
+
Dynamic: license-file
|
34
|
+
Dynamic: provides-extra
|
35
|
+
Dynamic: requires-dist
|
36
|
+
Dynamic: requires-python
|
37
|
+
Dynamic: summary
|
25
38
|
|
26
39
|
# execnb
|
27
40
|
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.1.14"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Autogenerated by nbdev
|
2
2
|
|
3
|
-
d = { 'settings': { 'branch': '
|
3
|
+
d = { 'settings': { 'branch': 'main',
|
4
4
|
'doc_baseurl': '/execnb/',
|
5
5
|
'doc_host': 'https://AnswerDotAI.github.io',
|
6
6
|
'git_url': 'https://github.com/AnswerDotAI/execnb/',
|
@@ -35,6 +35,7 @@ d = { 'settings': { 'branch': 'master',
|
|
35
35
|
'execnb.shell.CaptureShell.set_path': ('shell.html#captureshell.set_path', 'execnb/shell.py'),
|
36
36
|
'execnb.shell.ExecutionInfo.__repr__': ('shell.html#executioninfo.__repr__', 'execnb/shell.py'),
|
37
37
|
'execnb.shell.ExecutionResult.__repr__': ('shell.html#executionresult.__repr__', 'execnb/shell.py'),
|
38
|
+
'execnb.shell.NbResult': ('shell.html#nbresult', 'execnb/shell.py'),
|
38
39
|
'execnb.shell.SmartCompleter': ('shell.html#smartcompleter', 'execnb/shell.py'),
|
39
40
|
'execnb.shell.SmartCompleter.__call__': ('shell.html#smartcompleter.__call__', 'execnb/shell.py'),
|
40
41
|
'execnb.shell.SmartCompleter.__init__': ('shell.html#smartcompleter.__init__', 'execnb/shell.py'),
|
@@ -34,8 +34,8 @@ from .nbio import _dict2obj
|
|
34
34
|
|
35
35
|
|
36
36
|
# %% auto 0
|
37
|
-
__all__ = ['CaptureShell', 'format_exc', 'render_outputs', 'find_output', 'out_exec', 'out_stream', 'out_error',
|
38
|
-
'SmartCompleter']
|
37
|
+
__all__ = ['CaptureShell', 'format_exc', 'NbResult', 'render_outputs', 'find_output', 'out_exec', 'out_stream', 'out_error',
|
38
|
+
'exec_nb', 'SmartCompleter']
|
39
39
|
|
40
40
|
# %% ../nbs/02_shell.ipynb
|
41
41
|
class _CustDisplayHook(DisplayHook):
|
@@ -102,6 +102,9 @@ def format_exc(e):
|
|
102
102
|
"Format exception `e` as a string list"
|
103
103
|
return traceback.format_exception(type(e), e, e.__traceback__)
|
104
104
|
|
105
|
+
# %% ../nbs/02_shell.ipynb
|
106
|
+
class NbResult(list): pass
|
107
|
+
|
105
108
|
# %% ../nbs/02_shell.ipynb
|
106
109
|
def _out_stream(text, name): return dict(name=name, output_type='stream', text=text.splitlines(True))
|
107
110
|
def _out_exc(e):
|
@@ -122,14 +125,14 @@ def _mk_out(data, meta, output_type='display_data'):
|
|
122
125
|
return dict(data=fd, metadata=meta, output_type=output_type)
|
123
126
|
|
124
127
|
def _out_nb(o, fmt):
|
125
|
-
res =
|
128
|
+
res = NbResult()
|
126
129
|
if o.stdout: res.append(_out_stream(o.stdout, 'stdout'))
|
127
130
|
if o.stderr: res.append(_out_stream(o.stderr, 'stderr'))
|
128
131
|
if o.exception: res.append(_out_exc(o.exception))
|
129
|
-
|
132
|
+
res.result = o.result.result
|
130
133
|
for x in o.display_objects: res.append(_mk_out(x.data, x.metadata))
|
131
|
-
if
|
132
|
-
res.append(_mk_out(*fmt.format(
|
134
|
+
if res.result is not None and not o.quiet:
|
135
|
+
res.append(_mk_out(*fmt.format(res.result), 'execute_result'))
|
133
136
|
if 'execution_count' not in o: o['execution_count']=None
|
134
137
|
for p in res:
|
135
138
|
if p["output_type"]=="execute_result": p['execution_count'] = o['execution_count']
|
@@ -185,8 +188,8 @@ def render_outputs(outputs, ansi_renderer=_strip, include_imgs=True, pygments=Fa
|
|
185
188
|
if include_imgs:
|
186
189
|
if d := _g('image/jpeg'): return f'<img src="data:image/jpeg;base64,{d}"/>'
|
187
190
|
if d := _g('image/png'): return f'<img src="data:image/png;base64,{d}"/>'
|
191
|
+
if d := _g('image/svg+xml'): return d
|
188
192
|
if d := _g('text/plain'): return _pre(d)
|
189
|
-
if d := _g('image/svg+xml'): return d
|
190
193
|
|
191
194
|
return ''
|
192
195
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: execnb
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.14
|
4
4
|
Summary: A description of your project
|
5
5
|
Home-page: https://github.com/AnswerDotAI/execnb/
|
6
6
|
Author: Jeremy Howard
|
@@ -22,6 +22,19 @@ Provides-Extra: dev
|
|
22
22
|
Requires-Dist: matplotlib; extra == "dev"
|
23
23
|
Requires-Dist: Pillow; extra == "dev"
|
24
24
|
Requires-Dist: mistletoe; extra == "dev"
|
25
|
+
Dynamic: author
|
26
|
+
Dynamic: author-email
|
27
|
+
Dynamic: classifier
|
28
|
+
Dynamic: description
|
29
|
+
Dynamic: description-content-type
|
30
|
+
Dynamic: home-page
|
31
|
+
Dynamic: keywords
|
32
|
+
Dynamic: license
|
33
|
+
Dynamic: license-file
|
34
|
+
Dynamic: provides-extra
|
35
|
+
Dynamic: requires-dist
|
36
|
+
Dynamic: requires-python
|
37
|
+
Dynamic: summary
|
25
38
|
|
26
39
|
# execnb
|
27
40
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["setuptools>=64.0"]
|
3
|
+
build-backend = "setuptools.build_meta"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name="execnb"
|
7
|
+
requires-python=">=3.7"
|
8
|
+
dynamic = [ "keywords", "description", "version", "dependencies", "optional-dependencies", "readme", "license", "authors", "classifiers", "entry-points", "scripts", "urls"]
|
9
|
+
|
10
|
+
[tool.uv]
|
11
|
+
cache-keys = [{ file = "pyproject.toml" }, { file = "settings.ini" }, { file = "setup.py" }]
|
@@ -8,8 +8,8 @@ keywords = some keywords
|
|
8
8
|
user = AnswerDotAI
|
9
9
|
author = Jeremy Howard
|
10
10
|
author_email = j@fast.ai
|
11
|
-
branch =
|
12
|
-
version = 0.1.
|
11
|
+
branch = main
|
12
|
+
version = 0.1.14
|
13
13
|
min_python = 3.7
|
14
14
|
requirements = fastcore>=1.5.5 ipython
|
15
15
|
dev_requirements = matplotlib Pillow mistletoe
|
@@ -41,4 +41,5 @@ clear_all = False
|
|
41
41
|
put_version_in_init = True
|
42
42
|
cell_number = False
|
43
43
|
skip_procs =
|
44
|
+
update_pyproject = True
|
44
45
|
|
execnb-0.1.12/execnb/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.1.12"
|
execnb-0.1.12/pyproject.toml
DELETED
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
|