User story to consider for dependency specifications: reproducible science

This user story is quite relevant to my own workflow, with the difference that I’m more comfortable with packaging and so I tend to make a package for my own code that I can reuse in the notebooks (which may or may not be versioned, depending on intended audience).

I don’t think PEPs 722/723 are relevant here except that they’re about dependencies–the specifics are all about formatting schemes that don’t make sense in a notebook setting. Of the two, 723 makes a little more sense because you could just have a separate cell that was TOML formatted, with metadata in it[1]. But I don’t know if I’d call that “PEP 723” or just a separate thing for notebooks.

I do sometimes need to share notebooks with others, and what I’ve done lately is to paste YAML with the conda env into a comment in the top. So embedding a block of TOML would be essentially the same, and if jupyter could actually create and install from that block that’s even better. Although honestly I’d still prefer a conda env because the requirements can be difficult to install with pip alone.

  1. this isn’t something it can do now, but it knows how to format TOML and could support this if it had a use ↩︎