8080labs / pyforest

pyforest - feel the bliss of automated imports
https://8080labs.com
MIT License
1.08k stars 196 forks source link

Imports work but are not imputed in the first cell on kaggle notebooks platform #50

Closed miwojc closed 2 years ago

miwojc commented 2 years ago

Environment

Description of Issue

Reproduction Steps

  1. create new kaggle notebook
  2. install pyforest with !pip install upgrade pyforest
  3. restart notebook
  4. run np.sum([1, 2, 3])

What steps have you taken to resolve this already?

searched github issues, there is one closed by i still get the same issue https://github.com/8080labs/pyforest/issues/31

Anything else?

Thank you for your help!

image

miwojc commented 2 years ago

Now, after reading the documentation, which i should have done in the first place i understand that pyforest is intended for use with Jupyter Notebook or Lab so closing this issue.

FlorianWetschoreck commented 2 years ago

Thank you for handling this issue yourself. You are correct that the code export does not work in Kaggle notebooks (currently) because they do not allow/handle the notebook extension like Jupyter does.

As an alternative to the automatic code export, you can manually call pyforest.active_imports() to get the code that would be needed for the current imports.