jupyterlite / jupyterlite/pyodide-kernel

Read the execution count from the Python kernel

Open
#90 2 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Python
Stars
90
Forks
47
Avg merge
3d 13h
Merged PRs (30d)
11

Description

### Problem

https://github.com/jupyterlite/jupyterlite/pull/492 added a check to not increment the execution count if `store_history` is set to `false`.

This check happens in the base kernel class here:

https://github.com/jupyterlite/jupyterlite/blob/cb66d86e9b10cedc41f6bad77e3a25a97efb9c44/packages/kernel/src/kernel.ts#L536-L538

This means the JS, Python and potentially other kernels get that behavior automatically if they inherit from `BaseKernel`.

### Proposed Solution

We should check whether we would like to read the `execution_count` from the specialized kernels if available.

In the case of Pyolite that might mean reading it from here:

https://github.com/jupyterlite/jupyterlite/blob/72ebada70067afcd88ddcd283f4b7f0baf36cbdb/packages/pyolite-kernel/src/worker.ts#L181-L185

### Additional context

Raised in https://github.com/jupyterlite/jupyterlite/pull/492

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.