recipes icon indicating copy to clipboard operation
recipes copied to clipboard

Add placeholder recipe for `nbconvert`

Open jtpio opened this issue 1 month ago • 8 comments

Packages like otter-grader have a dependency on nbconvert specified in their dependencies:

https://github.com/ucbds-infra/otter-grader/blob/58aa0301ae0f2456d9e5bc50713c146462711ba0/pyproject.toml#L45

Trying to install it with %mamba install otter-grader works, but pulls an older version, instead of the latest 6.1.6:

Image Image

Specifying the explicit pin makes the solving of the environment fail:

Image

Maybe a simple workaround for now could be to add a placeholder recipe for nbconvert, so the environment can be solved and the otter package be imported.

cc @AntoinePrv @pancakereport

jtpio avatar Nov 10 '25 20:11 jtpio

cc @ericvd-ucb @sean-morris

pancakereport avatar Nov 10 '25 20:11 pancakereport

otter-grader can be installed with Pyodide, because the following seems to be respected by micropip, but not with %mamba install:

nbconvert = { version = ">=6.0.0", extras = ["webpdf"], markers = "sys_platform != 'emscripten' and sys_platform != 'wasi'" }

So another solution to this problem could be to make %mamba install respect "sys_platform != 'emscripten'"

jtpio avatar Nov 10 '25 20:11 jtpio

I believe the issue is coming from pyzmq that is a native package not available on emscripten-forge.

Basically we'd want jupyter-client to have a conditional dependency on pyzmq on all OS except emscripten. This is the similar to when a pure Python package has a Windows-only dependency. The fix relies on the availability of __win virtual package but I am unsure if we have one for emscripten.

EDIT: since the issue is more that nbconvert is optional for otter, it should be removed from its feedstock dependencies (and possibly put in run_constraint section).

AntoinePrv avatar Nov 10 '25 20:11 AntoinePrv

EDIT: since the issue is more that nbconvert is optional for otter, it should be removed from its feedstock dependencies (and possibly put in run_constraint section).

Here is the dependency on nbconvert-core: https://github.com/conda-forge/otter-grader-feedstock/blob/a8e2f12c3e577f438ff1b8c7a3be41b9c144bedd/recipe/meta.yaml#L42C1-L42C21

jtpio avatar Nov 10 '25 20:11 jtpio

Opened https://github.com/conda-forge/otter-grader-feedstock/pull/46

jtpio avatar Nov 10 '25 22:11 jtpio

Not all functionality is necessary for otter-grader. We need otter.check; assign, run, and grade functionality is more optional

pancakereport avatar Nov 10 '25 22:11 pancakereport

Thanks @pancakereport - assign, run, and grade would never happen in JL -- the only pieces we ever run client-side for otter grader are check and export. We could get away without export.

sean-morris avatar Nov 10 '25 22:11 sean-morris

Another approach would be to create two outputs for the conda recipe:

  • otter-grader-base with a minimal set of dependencies, for use with lite
  • otter-grader depends on otter-grader-base, plus nbconvert-core (so nothing really changes for that package)

Updated https://github.com/conda-forge/otter-grader-feedstock/pull/46

jtpio avatar Nov 10 '25 22:11 jtpio