Skip to content

Commit

Permalink
Drop the Python / IPython specific compilers (ipython#40)
Browse files Browse the repository at this point in the history
* Remove IPython Python compilation conditions
* Delete unnecessary files
  • Loading branch information
tonyfast authored May 22, 2018
1 parent f0b85f2 commit 810eac3
Show file tree
Hide file tree
Showing 33 changed files with 243 additions and 1,892 deletions.
1 change: 0 additions & 1 deletion .pytest_cache/v/cache/lastfailed

This file was deleted.

26 changes: 0 additions & 26 deletions .pytest_cache/v/cache/nodeids

This file was deleted.

Binary file removed classes_importnb.png
Binary file not shown.
Binary file removed packages_importnb.png
Binary file not shown.
2 changes: 1 addition & 1 deletion readme.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
"output_type": "stream",
"text": [
"[NbConvertApp] Converting notebook readme.ipynb to markdown\n",
"[NbConvertApp] Writing 6469 bytes to readme.md\n"
"[NbConvertApp] Writing 7022 bytes to readme.md\n"
]
}
],
Expand Down
13 changes: 12 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,18 @@ For example, create a file called `tricks.yaml` containing
```

test_import (src.importnb.tests.test_unittests.TestContext) ... ok
test_reload_with_context (src.importnb.tests.test_unittests.TestContext) ...
test_reload_with_context (src.importnb.tests.test_unittests.TestContext) ... ok
test_failure (src.importnb.tests.test_unittests.TestExtension) ... expected failure
test_import (src.importnb.tests.test_unittests.TestExtension) ... ok
test_exception (src.importnb.tests.test_unittests.TestPartial) ... ok
test_traceback (src.importnb.tests.test_unittests.TestPartial) ... ok
test_imports (src.importnb.tests.test_unittests.TestRemote) ... skipped 'requires IP'

----------------------------------------------------------------------
Ran 7 tests in 2.018s

OK (skipped=1, expected failures=1)



```python
Expand Down
Binary file removed readme_files/readme_33_1.png
Binary file not shown.
Binary file removed readme_files/readme_33_2.png
Binary file not shown.
4 changes: 0 additions & 4 deletions src/importnb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
unload_ipython_extension,
reload,
Lazy,
export,
__IPYTHON__,
)
from .parameterize import Parameterize
from .nbtest import NotebookTest, testmod
Expand All @@ -25,8 +23,6 @@
unload_ipython_extension,
reload,
Lazy,
export,
__IPYTHON__,
)
from parameterize import Parameterize
from nbtest import NotebookTest, testmod
16 changes: 8 additions & 8 deletions src/importnb/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@


try:
from .compile import export, __IPYTHON__, export
except:
from compile import export, __IPYTHON__, export
__all__ = "capture_output",


if __IPYTHON__:
from IPython.utils.capture import capture_output
else:
from IPython import get_ipython

assert get_ipython(), """There is no interactive shell"""
except:
from contextlib import redirect_stdout, ExitStack
from io import StringIO

Expand Down Expand Up @@ -73,5 +69,9 @@ def stderr(self):


if __name__ == "__main__":
try:
from .utils.export import export
except:
from utils.export import export
export("capture.ipynb", "../capture.py")
__import__("doctest").testmod()
141 changes: 0 additions & 141 deletions src/importnb/compile.py

This file was deleted.

66 changes: 0 additions & 66 deletions src/importnb/compile_ipython.py

This file was deleted.

76 changes: 0 additions & 76 deletions src/importnb/compile_python.py

This file was deleted.

Loading

0 comments on commit 810eac3

Please sign in to comment.