Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line execution of a jupyter notebook fails in default Anaconda 4.1. #34

Closed
ijstokes opened this issue Jul 7, 2016 · 11 comments
Closed

Comments

@ijstokes
Copy link
Contributor

ijstokes commented Jul 7, 2016

From @rtrhd on July 2, 2016 15:30

Command line execution of a jupyter notebook with jupyter nbconvert --to notebook --execute fails after upgrading to Anaconda 4.1.

On saving a jupyter ipython notebook the kernel name is changed from the conventional python2 or python3 to the conda specific form Python [Root] but this is not recognised by nbconvert.

This form is also not recognised when the notebook is opened in the browser in an Anaconda 4.0 installation causing problems sharing notebooks.

The behaviour was observed on OSX/3.5 and Linux/2.7.

Explicit removal of the package nb_conda_kernels resolves the problem, but this package is included by default in Anaconda 4.1.

jupyter nbconvert --to notebook --execute test_python_root.ipynb
[NbConvertApp] Converting notebook test_python_root.ipynb to notebook
[NbConvertApp] Executing notebook with kernel: Python [Root]
Traceback (most recent call last):
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/jupyter_client/kernelspec.py", line 173, in get_kernel_spec
    resource_dir = d[kernel_name.lower()]
KeyError: 'python [root]'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/ron/anaconda3/bin/jupyter-nbconvert", line 6, in <module>
    main()
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 596, in launch_instance
    app.start()
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/nbconvertapp.py", line 293, in start
    self.convert_notebooks()
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/nbconvertapp.py", line 457, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/nbconvertapp.py", line 428, in convert_single_notebook
    output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/nbconvertapp.py", line 357, in export_single_notebook
    output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/exporters/exporter.py", line 165, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/exporters/exporter.py", line 183, in from_file
    return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/exporters/notebook.py", line 26, in from_notebook_node
    nb_copy, resources = super(NotebookExporter, self).from_notebook_node(nb, resources, **kw)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/exporters/exporter.py", line 130, in from_notebook_node
    nb_copy, resources = self._preprocess(nb_copy, resources)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/exporters/exporter.py", line 302, in _preprocess
    nbc, resc = preprocessor(nbc, resc)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/preprocessors/base.py", line 47, in __call__
    return self.preprocess(nb,resources)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/nbconvert/preprocessors/execute.py", line 141, in preprocess
    cwd=path)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/jupyter_client/manager.py", line 429, in start_new_kernel
    km.start_kernel(**kwargs)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/jupyter_client/manager.py", line 230, in start_kernel
    kernel_cmd = self.format_kernel_cmd(extra_arguments=extra_arguments)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/jupyter_client/manager.py", line 170, in format_kernel_cmd
    cmd = self.kernel_spec.argv + extra_arguments
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/jupyter_client/manager.py", line 82, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/Users/ron/anaconda3/lib/python3.5/site-packages/jupyter_client/kernelspec.py", line 175, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named Python [Root]

Copied from original issue: ContinuumIO/anaconda-issues#877

@ijstokes
Copy link
Contributor Author

ijstokes commented Jul 7, 2016

From @bollwyvl on July 5, 2016 15:54

In the near term, the kernel_name (in the current environment) can be specified at the CLI:

jupyter nbconvert Notebook.ipynb --to=html --ExecutePreprocessor.kernel_name=python

Ideally, we'd be able to overload the kernel manager in nbconvert as we have done in the notebook. However, it looks like there is no way to override the kernel discovery of the --execute flag with configuration.

In the case of root, we should likely not append the name... or better still, figure out a less-invasive way to do it.

@ijstokes
Copy link
Contributor Author

ijstokes commented Jul 7, 2016

Ack, this is pretty bad. We need to figure out a much better solution to this problem. nbconvert is a thing lots of people do. I'm going to move this to nb_conda_kernel repo where the action will take place (and where the problem originates).

@dhimmel
Copy link

dhimmel commented May 1, 2017

I use nb_conda_kernels and I'd like to execute notebooks in place using nbconvert, since I have pipelines of notebooks and would like to execute these programatically. Unfortunately the --ExecutePreprocessor.kernel_name=python workaround is not working for me.

Here are the steps to reproduce. Define the following environment.yml:

name: conda-test
dependencies:
- conda-forge::nb_conda_kernels=2.1.0
- ipykernel=4.5.2
- ipywidgets=6.0.0
- nbconvert=5.1.1
- notebook=5.0.0

Install and activate the conda-test environment with:

conda env create --file environment.yml
source activate conda-test

Create a notebook with a single cell as follows, and use the kernel chooser menu to choose Python [conda env:conda-test]

import sys
sys.base_prefix

Running from an interactive Jupyter browser, the cell outputs:

'/home/dhimmel/anaconda3/envs/conda-test'

That is the correct version of python. With the environment activated, run:

jupyter nbconvert --inplace --execute test.ipynb

Producing the following output (which is this issue):

jupyter_client.kernelspec.NoSuchKernel: No such kernel named conda-env-conda-test-py

However, if I try the workaround and run:

jupyter nbconvert --inplace --execute --ExecutePreprocessor.kernel_name=python test.ipynb

The cell outputs:

'/home/dhimmel/anaconda3/envs/integrate'

Ahh! This is another one of my environments, not the environment which is activated. I don't believe this used to be an issue... IIRC, when a conda environment was activated, nbconvert would use that kernel. Perhaps this issue was comorbid with jupyter/jupyter#245.

@damianavila
Copy link
Contributor

Mmm... I tried you command and I am getting the correct prefix, the conda-test one.
Are you sure you are not in the integrate environment when you run the workaround?

@dhimmel
Copy link

dhimmel commented May 2, 2017

Are you sure you are not in the integrate environment when you run the workaround?

Yes certain. However, I was using the integrate environment around the time of jupyter/jupyter#245. Therefore, I suspect there is some configuration that differs between us and is causing the problem.

@damianavila do you know which configuration files determine kernels for nbviewer? If you are okay with uploading your configuration files, I can compare them to mine. One issue is that I've struggled to learn which config files do what wrt to kernels.

@damianavila
Copy link
Contributor

@damianavila do you know which configuration files determine kernels for nbviewer?

nbviewer does not run any kernel, AFAIK... and the kernel name gets saved in the notebook document itself...

If you are okay with uploading your configuration files, I can compare them to mine. One issue is that I've struggled to learn which config files do what wrt to kernels.

Which configuration files do you want me to post? There are several ones... for kernels installed manually by yourself, you should specifically look is some directories to check the kernelspec, for instance:

damian-S400CA :: ~ :: 
$ ls -la /home/damian/miniconda3/envs/conda-test/share/jupyter/kernels/
total 12
drwxrwxr-x 3 damian damian 4096 may  2 11:34 .
drwxrwxr-x 4 damian damian 4096 may  2 11:34 ..
drwxrwxr-x 2 damian damian 4096 may  2 11:34 python3
damian-S400CA :: ~ :: 
$ cat /home/damian/miniconda3/envs/conda-test/share/jupyter/kernels/python3/
kernel.json     logo-32x32.png  logo-64x64.png  
damian-S400CA :: ~ :: 
$ cat /home/damian/miniconda3/envs/conda-test/share/jupyter/kernels/python3/kernel.json 
{
 "argv": [
  "/media/data/miniconda3/envs/conda-test/bin/python",
  "-m",
  "ipykernel",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python 3",
 "language": "python"
}

@dhimmel
Copy link

dhimmel commented May 3, 2017

@damianavila the conda-test kernel looks the same between us:

cat ~/anaconda3/envs/conda-test/share/jupyter/kernels/python3/kernel.json
{
 "argv": [
  "/home/dhimmel/anaconda3/envs/conda-test/bin/python",
  "-m",
  "ipykernel",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python 3",
 "language": "python"
}

Installed kenels

Here's the Jupyter kernel documentation, which was helpful for the following sections. I ran jupyter kernelspec list:

Available kernels:
  cognoma-machine-learning    /home/dhimmel/.local/share/jupyter/kernels/cognoma-machine-learning
  python3                     /home/dhimmel/.local/share/jupyter/kernels/python3

I must have installed the cognoma-machine-learning environment before I used nb_conda_kernels. therefore, I removed that environment with jupyter kernelspec remove cognoma-machine-learning. Then, through jupyter --paths, I found the directory and located the offending kernel specification ~/.local/share/jupyter/kernels/python3/kernel.json, which contained:

{
 "language": "python",
 "argv": [
  "/home/dhimmel/anaconda3/envs/integrate/bin/python",
  "-m",
  "ipykernel",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python 3"
}

I edited kernel.json so the first element in argv was /home/dhimmel/anaconda3/bin/python (my conda root environment's python). @damianavila, which python do you have here?

Now when I rerun nbconvert with --ExecutePreprocessor.kernel_name=python, I get '/home/dhimmel/anaconda3'. And when I run it without --ExecutePreprocessor.kernel_name with the activated environment, I still get a No such kernel named conda-env-conda-test-py error.

Mmm... I tried you command and I am getting the correct prefix, the conda-test one.

So the question is why is @damianavila getting the correct prefix while I am not. Perhaps I am using newer versions of Jupyter / conda / anaconda (since I don't think this bug used to exist)?

@ijstokes any advice? My goal is to use nbconvert to execute a notebook that uses a specified conda environment with nb_conda_kernels.

@damianavila
Copy link
Contributor

Suggestion: remove any kernelspec from /.local/share/jupyter. That is probably clobbering the kernel in you environment...

If I run jupyter kernelspec list I see:

$ jupyter kernelspec list
Available kernels:
  python3    /media/data/miniconda3/envs/conda-test/share/jupyter/kernels/python3

Which is the python executable in you conda-test environment.

@dhimmel
Copy link

dhimmel commented May 3, 2017

That is probably clobbering the kernel in you environment

@damianavila yes! I ran jupyter kernelspec remove python3. Now the --ExecutePreprocessor.kernel_name=python workaround works. The notebook cell outputs '/home/dhimmel/anaconda3/envs/conda-test'.

Without the conda-test environment activated, running jupyter kernelspec list now returns:

Available kernels:
  python3    /home/dhimmel/anaconda3/lib/python3.6/site-packages/ipykernel/resources

With conda-test activated, jupyter kernelspec list now returns:

Available kernels:
  python3    /home/dhimmel/anaconda3/envs/conda-test/share/jupyter/kernels/python3

@damianavila
Copy link
Contributor

damianavila commented May 3, 2017

@dhimmel nice to see it is working for you 😉

dhimmel added a commit to dhimmel/biorxiv-licenses that referenced this issue Jun 14, 2017
nb_conda_kernels was causing execute.py to fail.
See anaconda/nb_conda_kernels#34
kangwonlee added a commit to kangwonlee/momisp that referenced this issue Oct 21, 2017
…latest/api/kernelspec.html;

--ExecutePreprocessor.kernel_name to python # ijstokes et al, Command line execution of a jupyter notebook fails in default Anaconda 4.1, anaconda/nb_conda_kernels#34
@mcg1969
Copy link
Collaborator

mcg1969 commented Aug 24, 2018

I'm closing this as a duplicate of #77. I suppose I could close that one instead, I offered some comments in that issue that are at least relevant. I invite comments on the wisdom of my idea.

@mcg1969 mcg1969 closed this as completed Aug 24, 2018
kangwonlee added a commit to kangwonlee/test_ipynb that referenced this issue Apr 13, 2019
…latest/api/kernelspec.html;

--ExecutePreprocessor.kernel_name to python # ijstokes et al, Command line execution of a jupyter notebook fails in default Anaconda 4.1, anaconda/nb_conda_kernels#34
kangwonlee added a commit to kangwonlee/nmisp that referenced this issue Aug 17, 2019
f2d3ce0 Merge branch 'hotfix/cython-filename'
62714a3 debugged updating build h265db76_0
01670ac trying python >= 3.7.3 for nightly
5c7f145 update python if 3.7.4 h265db76_0
5333e5c python version in env files
7f05632 Revert "lower version of pytest-xdist for nightly"
bedde74 nightly python = 3.7.3
36d0772 lower version of pytest-xdist for nightly
fcb9008 Merge branch 'hotfix/video-to-list'
da2f0be link to the list of moving pictures instead of one
dfc929f Merge commit '127e51700c5c066292fbb344a0882e4c30c62eb4' into feature/update-test
127e517 Merge branch 'release/19080401'
bbfd18a Merge branch 'feature/update-env' into develop
2ccf41a nightly>=2019.07 py37 Win64
9e16d6b sorted packages
c2d1110 sorted package order
efb3cda updated link to pkg list
9340ad7 added 2019.07
1b138b6 added anaconda dates
82f2471 Merge branch 'feature/ipynb-code-lines' into develop
7e5a054 -std=c++11
272dc97 line breaks in c++ code (cont)
e113f99 line breaks in c++ code (cont)
1dbfe99 line breaks in c++ code (cont)
21b828e line breaks in c++ code (cont)
c418f84 -std=c++11
8537452 line breaks in c++ code (cont)
626dea9 line breaks in c++ code (cont)
6a0a326 line breaks in c++ code (cont)
885b2fb line breaks in c++ code (start)
40001fa indent if block
03514ce Merge tag '19072901' into develop
ffee3fd Merge branch 'release/19072901'
cc722a4 POSIX only for now
abcb04c Merge branch 'feature/merge-test-ipynb-pycpp' into develop
f40a916 windows : trying to install miniconda under $HOME
662fe4c check if miniconda path exists
3b8da32 indicate windows cache found condition
80884f3 env 3.7.3 : added cython & requests
7efbe05 added __init__.py
1b0b618 License to BSD 3-Clause
336d919 added cython & requests
604fdb7 added cython & requests
fa262d5 added cython & requests
58a6637 added requests
7b2ad12 added cython and requests
33ee74e copied files from test ipynb pycpp
6ec68ab https://docs.anaconda.com/anaconda/packages/old-pkg-lists/5.0.1/py3.6_win-64/
6322c68 Anaconda 5.0.1 statsmodels=0.8.0
4b78f40 Merge branch 'feature/separated-scripts' into develop
0e2c0dc pytest-dist<1.27.0
b60282b indicate CONDA_PYTHON
f2059e8 whitespace
e31aaf0 indicate CONDA_PYTHON
96ef213 whitespace
c8619b2 Merge commit 'f09c46a729d083f7ba943abdc1d58763552f1d9f' into feature/faster-build
4c2d6bb Added separated scripts
27fa5af added py373 for anaconda3 2019.03
f09c46a separated before_install and install sh files
f1f5ce3 py373 : pytest-xdist >= 1.26.1 (py37)
313696b added py373 for anaconda 2019.03
c71223d Merge commit '11c1a5662761b7d34764c16b2850d676f41bf155' into feature/update-utils
2405e5a Merge commit '11c1a5662761b7d34764c16b2850d676f41bf155' into feature/utils/subtree
eef5b7c Merge tag 'test_ipynb/19060902' into develop
6ca6f7a Add 'utils/nbutils/' from commit '5c832a16df03447fc8a3306babb01b24738cde5d'
f867332 Merge commit '3f87332cad4b9dc935530dc9c24329fa1f60d5a4' into develop
39dda1f Merge commit '3f87332cad4b9dc935530dc9c24329fa1f60d5a4' into develop
846b310 py nightly : pytest-xdist>=1.28.0
9b35253 py 371 : pytest-xdist=1.26.1
13ad42b py 3.7 : pytest.xdist=1.26.1
ed781f5 added pluggy>=0.11 for pytest-dist
cad94c9 updated nightly : https://docs.anaconda.com/anaconda/packages/py3.7_win-64/
96122ba Merge commit '54ecf2f6b4101aa9afd0e7e86e179c3c4cd531c7' into feature/pytest-xdist
b0b0447 Merge commit '54ecf2f6b4101aa9afd0e7e86e179c3c4cd531c7' into feature/pytest-xdist
ba7b6bc py36 : pytest-xdist=1.24.1
5f1b522 py36 : pytest-xdist=1.17.1
66fc007 pytest-xdist channels to default
0bcbf81 test envs : added  condaforge::pytest-xdist
a2b51f9 Merge branch 'feature/test_ipynb' into develop
0117eb0 test_ipynb_file() : fstring -> %s for back. comp.
dfff8e4 env for 3.5 source
2f751c4 added env for python 3.5
982d58e Merge commit '632fb609bfb8f4ec6d70b136a9cb42d7f5fffac8' into feature/subtree/test
7642bf2 added yml for Anaconda 2018.12
b5d526c Merge branch 'feature/subtree' into develop
f9453cd single test timeout -> 3600 sec
522ae41 Merge commit 'c96eea3e79534c07aa9abfc43ec8403af06344db' into feature/subtree
cc0bc93 Merge commit 'dc398d1355e13ed7df57710a054e4fd463d19c57' into feature/subtree
c6ef284 Add 'tests/' from commit '2efb9cad60ee5a26c4bed628f1b6a0be262eb040'
7bad11f SymbolLister : renamed has_symbol() -> calls_sympy_symbol() to clarify the meaning
afe8669 TestRemoveOutput.test_delete_output_file() : removed unnecessary enumerate()
5532ef2 TestRemoveOutput : Create a separate test file
9136b81 revised MyLineConverterTesterBase.input_file_name
1b81e2e Revised TestSymbolLister.input_file_name to an existing file
d9f1840 Revised input file path to TestRemoveOutput.input_file_name
719f03d Added test_use_default_filename_if_missing()
7aa4ed0 set to Anaconda 5.0.1 python 3.6
1cc0d65 added env 3.6
6a88887 revised env nightly
aab14e4 revised env 3.5
2af842c coding style
471ed2e added tests for individual chapters
dfe1588 implemented test_cell_processor()
3c21111 check_process_line() : try exec() converted string
4ddfd34 added more test cases
3c4d0d9 test cases for N/m
3a4c651 added class MyLineConverterTesterBase(unittest.TestCase) as superclass for TestSymbolConverter
01a1cfa added basic test cases for line converters
b1fc55d added test cases for multiple symbols
2e9550f added test cases for Symbol()
185d1d6 find_symbol_name_location() : locate symbol name location : start:end
be6c653 added test_unit_underline_wrap_bracket()
06a9be3 started class TestSymbolConverter
a6bccdc renamed SymbolConverter -> SymbolLister
4d3c2ca added test/test_remove_output.py
7d2a0f7 added ipynb file with output : to test output removal program
b0ddd02 CellProcessorBase : virtual class // moved has_symbol() to SymbolConverter class // //// CellListProcessor : may accept cell_processor as an argument // //// FileProcessor : may accept cell processor as the argument. Would pass to instantiate the cell list processor
be6136e moved symbol_lines_in_file() function to symbol_converter.py
a4689b9 renamed CellProcessor class to CellProcessorBase : to make a virtual class later
10ae99a separated ipynb_remove_output.py and nb_file_util.py
8f2651c results in dictionaries indicating levels //// FileProcessor // process_nb_file() : added argument b_write_file // process_nb_node() : return result from CellListProcessor.process_cells() // //// CellListProcessor // added process_cells() : make an instance of the CellProcessor class & call for each cell // //// CellProcessor // added has_field() and implemented has_output() && has_source() using it // added has_symbol() : return dictionary of line numbers and source code line // process_cell() : just calls has_symbol() (maybe better as a virtual method) ////
0e5f4d8 FileProcessor : __init__() : at first, set nb_node member as None // added process_nb_file() : read file, call process_nb_node, and write file
f928049 started FileProcessor : file interface : read, write, run ipynb
31fe95a added test_cells_with_symbol() : find source lines with symbol in a given file name
5a1d09d started test_replace_symbol() : test cases for file level replace results
b847d7d added test_has_symbol() : compare the results from cells
b31aff9 added test_read_notebook()
5551d01 added self.input_file_name in setUp()
a5ee9f0 removed with block
389d265 test sample notebook
82a979d added sample.ipynb
05bbbc4 started test_nbutils.py
3f8a4fe added check_kernel_spec() ; https://jupyter-client.readthedocs.io/en/latest/api/kernelspec.html; --ExecutePreprocessor.kernel_name to python # ijstokes et al, Command line execution of a jupyter notebook fails in default Anaconda 4.1, anaconda/nb_conda_kernels#34
2c4720f removed python version 3.6 to save test time added additional reference : Anaconda Inc., Using conda with Travis CI, Conda documentation, https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
1537561 relocated files for tests : # https://lord.io/blog/2014/travis-multiple-subdirs/ removed utility recursive_rename.py

git-subtree-dir: tests
git-subtree-split: f2d3ce0
kangwonlee added a commit to kangwonlee/momisp that referenced this issue Aug 18, 2019
f2d3ce0 Merge branch 'hotfix/cython-filename'
62714a3 debugged updating build h265db76_0
01670ac trying python >= 3.7.3 for nightly
5c7f145 update python if 3.7.4 h265db76_0
5333e5c python version in env files
7f05632 Revert "lower version of pytest-xdist for nightly"
bedde74 nightly python = 3.7.3
36d0772 lower version of pytest-xdist for nightly
fcb9008 Merge branch 'hotfix/video-to-list'
da2f0be link to the list of moving pictures instead of one
dfc929f Merge commit '127e51700c5c066292fbb344a0882e4c30c62eb4' into feature/update-test
127e517 Merge branch 'release/19080401'
bbfd18a Merge branch 'feature/update-env' into develop
2ccf41a nightly>=2019.07 py37 Win64
9e16d6b sorted packages
c2d1110 sorted package order
efb3cda updated link to pkg list
9340ad7 added 2019.07
1b138b6 added anaconda dates
82f2471 Merge branch 'feature/ipynb-code-lines' into develop
7e5a054 -std=c++11
272dc97 line breaks in c++ code (cont)
e113f99 line breaks in c++ code (cont)
1dbfe99 line breaks in c++ code (cont)
21b828e line breaks in c++ code (cont)
c418f84 -std=c++11
8537452 line breaks in c++ code (cont)
626dea9 line breaks in c++ code (cont)
6a0a326 line breaks in c++ code (cont)
885b2fb line breaks in c++ code (start)
40001fa indent if block
03514ce Merge tag '19072901' into develop
ffee3fd Merge branch 'release/19072901'
cc722a4 POSIX only for now
abcb04c Merge branch 'feature/merge-test-ipynb-pycpp' into develop
f40a916 windows : trying to install miniconda under $HOME
662fe4c check if miniconda path exists
3b8da32 indicate windows cache found condition
80884f3 env 3.7.3 : added cython & requests
7efbe05 added __init__.py
1b0b618 License to BSD 3-Clause
336d919 added cython & requests
604fdb7 added cython & requests
fa262d5 added cython & requests
58a6637 added requests
7b2ad12 added cython and requests
33ee74e copied files from test ipynb pycpp
6ec68ab https://docs.anaconda.com/anaconda/packages/old-pkg-lists/5.0.1/py3.6_win-64/
6322c68 Anaconda 5.0.1 statsmodels=0.8.0
4b78f40 Merge branch 'feature/separated-scripts' into develop
0e2c0dc pytest-dist<1.27.0
b60282b indicate CONDA_PYTHON
f2059e8 whitespace
e31aaf0 indicate CONDA_PYTHON
96ef213 whitespace
c8619b2 Merge commit 'f09c46a729d083f7ba943abdc1d58763552f1d9f' into feature/faster-build
4c2d6bb Added separated scripts
27fa5af added py373 for anaconda3 2019.03
f09c46a separated before_install and install sh files
f1f5ce3 py373 : pytest-xdist >= 1.26.1 (py37)
313696b added py373 for anaconda 2019.03
c71223d Merge commit '11c1a5662761b7d34764c16b2850d676f41bf155' into feature/update-utils
2405e5a Merge commit '11c1a5662761b7d34764c16b2850d676f41bf155' into feature/utils/subtree
eef5b7c Merge tag 'test_ipynb/19060902' into develop
11c1a56 Merge branch 'release/test_ipynb/19060902'
6d84a87 os.path.basename()
e587025 os.path.split() -> os.path.dirname()
6ca6f7a Add 'utils/nbutils/' from commit '5c832a16df03447fc8a3306babb01b24738cde5d'
f867332 Merge commit '3f87332cad4b9dc935530dc9c24329fa1f60d5a4' into develop
39dda1f Merge commit '3f87332cad4b9dc935530dc9c24329fa1f60d5a4' into develop
eec42fc Merge tag '19051201' into develop
3f87332 Merge branch 'release/19051201'
ddd21ce _exec_notebook_nix() : white space
0289d48 py nightly source
3dc2a21 Merge branch 'feature/update' into develop
c06f1de updated nightly : https://docs.anaconda.com/anaconda/packages/py3.7_win-64/
2a15ad2 py 3.7.1 : pytest-xdist=1.26.1
82cea90 py 3.7 : pytest.xdist=1.26.1
846b310 py nightly : pytest-xdist>=1.28.0
9b35253 py 371 : pytest-xdist=1.26.1
13ad42b py 3.7 : pytest.xdist=1.26.1
ed781f5 added pluggy>=0.11 for pytest-dist
cad94c9 updated nightly : https://docs.anaconda.com/anaconda/packages/py3.7_win-64/
96122ba Merge commit '54ecf2f6b4101aa9afd0e7e86e179c3c4cd531c7' into feature/pytest-xdist
b0b0447 Merge commit '54ecf2f6b4101aa9afd0e7e86e179c3c4cd531c7' into feature/pytest-xdist
e262523 Merge tag '19041401' into develop
54ecf2f Merge branch 'release/19041401'
6223450 revised nightly
2850644 Merge branch 'feature/pytest-xdist' into develop
acd7952 Merge branch 'feature/add-env-py35' into develop
f5616ba test envs : added  pytest-xdist
2afcdb3 added env for python 3.5
c73b832 test_ipynb_file() : fstring -> %s for back. comp.
ba7b6bc py36 : pytest-xdist=1.24.1
5f1b522 py36 : pytest-xdist=1.17.1
66fc007 pytest-xdist channels to default
0bcbf81 test envs : added  condaforge::pytest-xdist
a2b51f9 Merge branch 'feature/test_ipynb' into develop
0117eb0 test_ipynb_file() : fstring -> %s for back. comp.
dfff8e4 env for 3.5 source
2f751c4 added env for python 3.5
982d58e Merge commit '632fb609bfb8f4ec6d70b136a9cb42d7f5fffac8' into feature/subtree/test
2e816a2 Merge tag '19041001' into develop
7642bf2 added yml for Anaconda 2018.12
b5d526c Merge branch 'feature/subtree' into develop
f9453cd single test timeout -> 3600 sec
522ae41 Merge commit 'c96eea3e79534c07aa9abfc43ec8403af06344db' into feature/subtree
cc0bc93 Merge commit 'dc398d1355e13ed7df57710a054e4fd463d19c57' into feature/subtree
c6ef284 Add 'tests/' from commit '2efb9cad60ee5a26c4bed628f1b6a0be262eb040'
7bad11f SymbolLister : renamed has_symbol() -> calls_sympy_symbol() to clarify the meaning
afe8669 TestRemoveOutput.test_delete_output_file() : removed unnecessary enumerate()
5532ef2 TestRemoveOutput : Create a separate test file
9136b81 revised MyLineConverterTesterBase.input_file_name
1b81e2e Revised TestSymbolLister.input_file_name to an existing file
d9f1840 Revised input file path to TestRemoveOutput.input_file_name
719f03d Added test_use_default_filename_if_missing()
7aa4ed0 set to Anaconda 5.0.1 python 3.6
1cc0d65 added env 3.6
6a88887 revised env nightly
aab14e4 revised env 3.5
2af842c coding style
471ed2e added tests for individual chapters
dfe1588 implemented test_cell_processor()
3c21111 check_process_line() : try exec() converted string
4ddfd34 added more test cases
3c4d0d9 test cases for N/m
3a4c651 added class MyLineConverterTesterBase(unittest.TestCase) as superclass for TestSymbolConverter
01a1cfa added basic test cases for line converters
b1fc55d added test cases for multiple symbols
2e9550f added test cases for Symbol()
185d1d6 find_symbol_name_location() : locate symbol name location : start:end
be6c653 added test_unit_underline_wrap_bracket()
06a9be3 started class TestSymbolConverter
a6bccdc renamed SymbolConverter -> SymbolLister
4d3c2ca added test/test_remove_output.py
7d2a0f7 added ipynb file with output : to test output removal program
b0ddd02 CellProcessorBase : virtual class // moved has_symbol() to SymbolConverter class // //// CellListProcessor : may accept cell_processor as an argument // //// FileProcessor : may accept cell processor as the argument. Would pass to instantiate the cell list processor
be6136e moved symbol_lines_in_file() function to symbol_converter.py
a4689b9 renamed CellProcessor class to CellProcessorBase : to make a virtual class later
10ae99a separated ipynb_remove_output.py and nb_file_util.py
8f2651c results in dictionaries indicating levels //// FileProcessor // process_nb_file() : added argument b_write_file // process_nb_node() : return result from CellListProcessor.process_cells() // //// CellListProcessor // added process_cells() : make an instance of the CellProcessor class & call for each cell // //// CellProcessor // added has_field() and implemented has_output() && has_source() using it // added has_symbol() : return dictionary of line numbers and source code line // process_cell() : just calls has_symbol() (maybe better as a virtual method) ////
0e5f4d8 FileProcessor : __init__() : at first, set nb_node member as None // added process_nb_file() : read file, call process_nb_node, and write file
f928049 started FileProcessor : file interface : read, write, run ipynb
31fe95a added test_cells_with_symbol() : find source lines with symbol in a given file name
5a1d09d started test_replace_symbol() : test cases for file level replace results
b847d7d added test_has_symbol() : compare the results from cells
b31aff9 added test_read_notebook()
5551d01 added self.input_file_name in setUp()
a5ee9f0 removed with block
389d265 test sample notebook
82a979d added sample.ipynb
05bbbc4 started test_nbutils.py
3f8a4fe added check_kernel_spec() ; https://jupyter-client.readthedocs.io/en/latest/api/kernelspec.html; --ExecutePreprocessor.kernel_name to python # ijstokes et al, Command line execution of a jupyter notebook fails in default Anaconda 4.1, anaconda/nb_conda_kernels#34
2c4720f removed python version 3.6 to save test time added additional reference : Anaconda Inc., Using conda with Travis CI, Conda documentation, https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
1537561 relocated files for tests : # https://lord.io/blog/2014/travis-multiple-subdirs/ removed utility recursive_rename.py

git-subtree-dir: tests
git-subtree-split: f2d3ce0
kangwonlee added a commit to kangwonlee/tutorial that referenced this issue Aug 18, 2019
096fa0b Merge branch 'hotfix/15-min'
ff074c4 15min GDB video -> CppCon list
f2d3ce0 Merge branch 'hotfix/cython-filename'
62714a3 debugged updating build h265db76_0
01670ac trying python >= 3.7.3 for nightly
5c7f145 update python if 3.7.4 h265db76_0
5333e5c python version in env files
7f05632 Revert "lower version of pytest-xdist for nightly"
bedde74 nightly python = 3.7.3
36d0772 lower version of pytest-xdist for nightly
fcb9008 Merge branch 'hotfix/video-to-list'
da2f0be link to the list of moving pictures instead of one
dfc929f Merge commit '127e51700c5c066292fbb344a0882e4c30c62eb4' into feature/update-test
127e517 Merge branch 'release/19080401'
bbfd18a Merge branch 'feature/update-env' into develop
2ccf41a nightly>=2019.07 py37 Win64
9e16d6b sorted packages
c2d1110 sorted package order
efb3cda updated link to pkg list
9340ad7 added 2019.07
1b138b6 added anaconda dates
82f2471 Merge branch 'feature/ipynb-code-lines' into develop
7e5a054 -std=c++11
272dc97 line breaks in c++ code (cont)
e113f99 line breaks in c++ code (cont)
1dbfe99 line breaks in c++ code (cont)
21b828e line breaks in c++ code (cont)
c418f84 -std=c++11
8537452 line breaks in c++ code (cont)
626dea9 line breaks in c++ code (cont)
6a0a326 line breaks in c++ code (cont)
885b2fb line breaks in c++ code (start)
40001fa indent if block
03514ce Merge tag '19072901' into develop
ffee3fd Merge branch 'release/19072901'
cc722a4 POSIX only for now
abcb04c Merge branch 'feature/merge-test-ipynb-pycpp' into develop
f40a916 windows : trying to install miniconda under $HOME
662fe4c check if miniconda path exists
3b8da32 indicate windows cache found condition
80884f3 env 3.7.3 : added cython & requests
7efbe05 added __init__.py
1b0b618 License to BSD 3-Clause
336d919 added cython & requests
604fdb7 added cython & requests
fa262d5 added cython & requests
58a6637 added requests
7b2ad12 added cython and requests
33ee74e copied files from test ipynb pycpp
6ec68ab https://docs.anaconda.com/anaconda/packages/old-pkg-lists/5.0.1/py3.6_win-64/
6322c68 Anaconda 5.0.1 statsmodels=0.8.0
4b78f40 Merge branch 'feature/separated-scripts' into develop
0e2c0dc pytest-dist<1.27.0
b60282b indicate CONDA_PYTHON
f2059e8 whitespace
e31aaf0 indicate CONDA_PYTHON
96ef213 whitespace
c8619b2 Merge commit 'f09c46a729d083f7ba943abdc1d58763552f1d9f' into feature/faster-build
4c2d6bb Added separated scripts
27fa5af added py373 for anaconda3 2019.03
f09c46a separated before_install and install sh files
f1f5ce3 py373 : pytest-xdist >= 1.26.1 (py37)
313696b added py373 for anaconda 2019.03
c71223d Merge commit '11c1a5662761b7d34764c16b2850d676f41bf155' into feature/update-utils
2405e5a Merge commit '11c1a5662761b7d34764c16b2850d676f41bf155' into feature/utils/subtree
eef5b7c Merge tag 'test_ipynb/19060902' into develop
6ca6f7a Add 'utils/nbutils/' from commit '5c832a16df03447fc8a3306babb01b24738cde5d'
f867332 Merge commit '3f87332cad4b9dc935530dc9c24329fa1f60d5a4' into develop
39dda1f Merge commit '3f87332cad4b9dc935530dc9c24329fa1f60d5a4' into develop
846b310 py nightly : pytest-xdist>=1.28.0
9b35253 py 371 : pytest-xdist=1.26.1
13ad42b py 3.7 : pytest.xdist=1.26.1
ed781f5 added pluggy>=0.11 for pytest-dist
cad94c9 updated nightly : https://docs.anaconda.com/anaconda/packages/py3.7_win-64/
96122ba Merge commit '54ecf2f6b4101aa9afd0e7e86e179c3c4cd531c7' into feature/pytest-xdist
b0b0447 Merge commit '54ecf2f6b4101aa9afd0e7e86e179c3c4cd531c7' into feature/pytest-xdist
ba7b6bc py36 : pytest-xdist=1.24.1
5f1b522 py36 : pytest-xdist=1.17.1
66fc007 pytest-xdist channels to default
0bcbf81 test envs : added  condaforge::pytest-xdist
a2b51f9 Merge branch 'feature/test_ipynb' into develop
0117eb0 test_ipynb_file() : fstring -> %s for back. comp.
dfff8e4 env for 3.5 source
2f751c4 added env for python 3.5
982d58e Merge commit '632fb609bfb8f4ec6d70b136a9cb42d7f5fffac8' into feature/subtree/test
7642bf2 added yml for Anaconda 2018.12
b5d526c Merge branch 'feature/subtree' into develop
f9453cd single test timeout -> 3600 sec
522ae41 Merge commit 'c96eea3e79534c07aa9abfc43ec8403af06344db' into feature/subtree
cc0bc93 Merge commit 'dc398d1355e13ed7df57710a054e4fd463d19c57' into feature/subtree
c6ef284 Add 'tests/' from commit '2efb9cad60ee5a26c4bed628f1b6a0be262eb040'
7bad11f SymbolLister : renamed has_symbol() -> calls_sympy_symbol() to clarify the meaning
afe8669 TestRemoveOutput.test_delete_output_file() : removed unnecessary enumerate()
5532ef2 TestRemoveOutput : Create a separate test file
9136b81 revised MyLineConverterTesterBase.input_file_name
1b81e2e Revised TestSymbolLister.input_file_name to an existing file
d9f1840 Revised input file path to TestRemoveOutput.input_file_name
719f03d Added test_use_default_filename_if_missing()
7aa4ed0 set to Anaconda 5.0.1 python 3.6
1cc0d65 added env 3.6
6a88887 revised env nightly
aab14e4 revised env 3.5
2af842c coding style
471ed2e added tests for individual chapters
dfe1588 implemented test_cell_processor()
3c21111 check_process_line() : try exec() converted string
4ddfd34 added more test cases
3c4d0d9 test cases for N/m
3a4c651 added class MyLineConverterTesterBase(unittest.TestCase) as superclass for TestSymbolConverter
01a1cfa added basic test cases for line converters
b1fc55d added test cases for multiple symbols
2e9550f added test cases for Symbol()
185d1d6 find_symbol_name_location() : locate symbol name location : start:end
be6c653 added test_unit_underline_wrap_bracket()
06a9be3 started class TestSymbolConverter
a6bccdc renamed SymbolConverter -> SymbolLister
4d3c2ca added test/test_remove_output.py
7d2a0f7 added ipynb file with output : to test output removal program
b0ddd02 CellProcessorBase : virtual class // moved has_symbol() to SymbolConverter class // //// CellListProcessor : may accept cell_processor as an argument // //// FileProcessor : may accept cell processor as the argument. Would pass to instantiate the cell list processor
be6136e moved symbol_lines_in_file() function to symbol_converter.py
a4689b9 renamed CellProcessor class to CellProcessorBase : to make a virtual class later
10ae99a separated ipynb_remove_output.py and nb_file_util.py
8f2651c results in dictionaries indicating levels //// FileProcessor // process_nb_file() : added argument b_write_file // process_nb_node() : return result from CellListProcessor.process_cells() // //// CellListProcessor // added process_cells() : make an instance of the CellProcessor class & call for each cell // //// CellProcessor // added has_field() and implemented has_output() && has_source() using it // added has_symbol() : return dictionary of line numbers and source code line // process_cell() : just calls has_symbol() (maybe better as a virtual method) ////
0e5f4d8 FileProcessor : __init__() : at first, set nb_node member as None // added process_nb_file() : read file, call process_nb_node, and write file
f928049 started FileProcessor : file interface : read, write, run ipynb
31fe95a added test_cells_with_symbol() : find source lines with symbol in a given file name
5a1d09d started test_replace_symbol() : test cases for file level replace results
b847d7d added test_has_symbol() : compare the results from cells
b31aff9 added test_read_notebook()
5551d01 added self.input_file_name in setUp()
a5ee9f0 removed with block
389d265 test sample notebook
82a979d added sample.ipynb
05bbbc4 started test_nbutils.py
3f8a4fe added check_kernel_spec() ; https://jupyter-client.readthedocs.io/en/latest/api/kernelspec.html; --ExecutePreprocessor.kernel_name to python # ijstokes et al, Command line execution of a jupyter notebook fails in default Anaconda 4.1, anaconda/nb_conda_kernels#34
2c4720f removed python version 3.6 to save test time added additional reference : Anaconda Inc., Using conda with Travis CI, Conda documentation, https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
1537561 relocated files for tests : # https://lord.io/blog/2014/travis-multiple-subdirs/ removed utility recursive_rename.py

git-subtree-dir: tests
git-subtree-split: 096fa0b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants