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

execute notebooks to verify them #21

Open
giocaizzi opened this issue Jul 5, 2023 · 2 comments · Fixed by #44
Open

execute notebooks to verify them #21

giocaizzi opened this issue Jul 5, 2023 · 2 comments · Fixed by #44
Assignees
Labels
bug Something isn't working CI/CD

Comments

@giocaizzi
Copy link
Owner

run all notebooks to:

  • avoid code changes to brake code
@giocaizzi giocaizzi self-assigned this Jul 22, 2023
giocaizzi added a commit that referenced this issue Jul 22, 2023
giocaizzi added a commit that referenced this issue Jul 22, 2023
@giocaizzi
Copy link
Owner Author

giocaizzi commented Jul 22, 2023

fails unexpectedly

Run jupyter nbconvert --to notebook --execute --inplace docsrc/source/examples/*
  
[NbConvertApp] Converting notebook docsrc/source/examples/estimator.ipynb to notebook
[NbConvertApp] Writing 610 bytes to docsrc/source/examples/estimator.ipynb
[NbConvertApp] Converting notebook docsrc/source/examples/preprocessing.ipynb to notebook
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.12/x64/bin/jupyter-nbconvert", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/jupyter_core/application.py", line 285, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/traitlets/config/application.py", line 1043, in launch_instance
    app.start()
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 414, in start
    self.convert_notebooks()
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 589, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 555, in convert_single_notebook
    output, resources = self.export_single_notebook(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 481, in export_single_notebook
    output, resources = self.exporter.from_filename(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 201, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 220, in from_file
    return self.from_notebook_node(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/exporters/notebook.py", line 36, in from_notebook_node
    nb_copy, resources = super().from_notebook_node(nb, resources, **kw)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 154, in from_notebook_node
    nb_copy, resources = self._preprocess(nb_copy, resources)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 352, in _preprocess
    nbc, resc = preprocessor(nbc, resc)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/preprocessors/base.py", line 48, in __call__
    return self.preprocess(nb, resources)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/preprocessors/execute.py", line 100, in preprocess
    self.preprocess_cell(cell, resources, index)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbconvert/preprocessors/execute.py", line 121, in preprocess_cell
    cell = self.execute_cell(cell, index, store_history=True)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/jupyter_core/utils/__init__.py", line 166, in wrapped
    return loop.run_until_complete(inner)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbclient/client.py", line 1058, in async_execute_cell
    await self._check_raise_for_error(cell, cell_index, exec_reply)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/nbclient/client.py", line 914, in _check_raise_for_error
    raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
%load_ext autoreload
%autoreload 2

from py3dinterpolations.core.griddata import GridData
from py3dinterpolations.modelling.preprocessor import Preprocessor
from py3dinterpolations.plotting.plotting import plot_downsampling

import pandas as pd
------------------


---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 4
      1 get_ipython().run_line_magic('load_ext', 'autoreload')
      2 get_ipython().run_line_magic('autoreload', '2')
----> 4 from py3dinterpolations.core.griddata import GridData
      5 from py3dinterpolations.modelling.preprocessor import Preprocessor
      6 from py3dinterpolations.plotting.plotting import plot_downsampling

File /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/py3dinterpolations/__init__.py:14
     [11](https://github.com/giocaizzi/py3dinterpolations/actions/runs/5632177285/job/15259936878#step:6:11) __email__ = "[email protected]"
     [13](https://github.com/giocaizzi/py3dinterpolations/actions/runs/5632177285/job/15259936878#step:6:14) from .core.griddata import GridData
---> [14](https://github.com/giocaizzi/py3dinterpolations/actions/runs/5632177285/job/15259936878#step:6:15) from .modelling.interpolate import interpolate
     [15](https://github.com/giocaizzi/py3dinterpolations/actions/runs/5632177285/job/15259936878#step:6:16) from .plotting.plotting import plot_3d_model, plot_2d_model
     [17](https://github.com/giocaizzi/py3dinterpolations/actions/runs/5632177285/job/15259936878#step:6:18) __all__ = ["__version__", "GridData", "interpolate", "plot_3d_model", "plot_2d_model"]

ModuleNotFoundError: No module named 'py3dinterpolations.modelling'

Error: Process completed with exit code 1.

@giocaizzi giocaizzi reopened this Jul 22, 2023
@giocaizzi giocaizzi added the bug Something isn't working label Jul 22, 2023
@giocaizzi giocaizzi mentioned this issue Jul 22, 2023
Merged
@giocaizzi
Copy link
Owner Author

@giocaizzi giocaizzi reopened this Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI/CD
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant