nteract/papermill

parameters comment instead of tag

Offen

#395 geöffnet am 05.07.2019

 (7 Kommentare) (4 Reaktionen) (0 zugewiesene Personen)Python (402 Forks)batch import
enhancementhelp wantedidea

Repository-Metriken

Stars
 (5.381 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

  • What: support writing #parameters as a comment at the top of a cell as an alternative way to tag
  • Why: it's annoying to use the tags mechanism, especially if it's just for papermill (related: #192)

Paraphrasing https://papermill.readthedocs.io/en/latest/usage-parameterize.html#how-parameters-work (which I may have written :P):

  1. if multiple parameters tags are found, injection only occurs after the first one (related: #328)
  2. if none are found, injection is at the start of the notebook

proposed here: insert 2. if none are found, injection occurs after the first cell that starts with #parameters (possibly also variants such as """ PaRaMeTeRs""")

This will not break backward-compatibility.

Happy to implement this if there's support for it.

Contributor Guide