ipython / ipython

Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
https://ipython.readthedocs.org
BSD 3-Clause "New" or "Revised" License
16.32k stars 4.45k forks source link

cell_id param missing from `run_cell` methods #14569

Open antazoey opened 1 month ago

antazoey commented 1 month ago

The run_cell() method is missing doc-str for the param cell_id. I was trying to figure out if this param would help me control the output number in cell display but there is no doc on it so I have no idea what it does.

Carreau commented 3 weeks ago

I believe cell_id is an opaque value given by the frontend, we just stick in the reply for the frontend to match the request with the reply and/or this might be used for widgets.

If my memory serve you need to look in ipykernel to change the output number.

The commit that introduces it references upstream issues:

Allow to get cellid from ipykernel

Other side of https://github.com/ipython/ipykernel/pull/886

half of https://github.com/ipython/ipython/issues/13579

This may help you, and yes, we should document it.

amansharma612 commented 3 weeks ago

Hi, I am contributing for the first time, and this seems like a good starting point. Can I take up this issue?

Carreau commented 3 weeks ago

You don't need to ask; you can just send one (or multiples), PRs, or even just investigate what you find on how cell_id is used, and comment about your finds here