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

Use ipython over pthon to execute python notebooks #38

Closed
romeokienzler opened this issue Jan 26, 2024 · 3 comments
Closed

Use ipython over pthon to execute python notebooks #38

romeokienzler opened this issue Jan 26, 2024 · 3 comments

Comments

@romeokienzler
Copy link
Member

@blumenstiel I don't remember to pros and cons completely, but when decided to convert notebooks to python over using ipython, from a user perspective we loose the capability to mix shell code into python code in a convenient (per cell) basis and also share variables between them

On the converted python code I get

  File "/opt/app-root/src/s1preprocess.py", line 59, in <module>
    get_ipython().system('gpt terrainP.xml -Pfile={zipfile} -Ptarget={output_target}')
AttributeError: 'NoneType' object has no attribute 'system'

In addition I doubt {zipfile} would be properly replaced

@blumenstiel
Copy link
Collaborator

@romeokienzler So we want ipython as an additional command type or is there another way?
We convert notebooks to reduce the maintenance but if we loose functionality we should not do that.

For the grid wrapper wie might want to exclude notebooks, because the grid wrapper is only working correctly when the component includes a main function. So it makes sense that the user needs to write a short python script to call the notebook.

@romeokienzler
Copy link
Member Author

Yes, please use ipython for notebooks, we do not only Lois functionality but also get back errors in lines of python code which is transient to the user (need to run the container image to inspect that python code)

the grid wrapper is only working correctly when the component includes a main function.

Can you please elaborate why?

@blumenstiel
Copy link
Collaborator

Fixed in #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants