Skip to content

Commit

Permalink
adds links to faq when missing params cell
Browse files Browse the repository at this point in the history
  • Loading branch information
edublancas committed Nov 3, 2021
1 parent 0594eee commit 008f57b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ploomber/sources/notebooksource.py
Expand Up @@ -232,14 +232,16 @@ def _post_init_validation(self, value):
Add a cell at the top like this:
# + tags=["parameters"]
# your code here...
upstream = None
product = None
# -
Go to: https://ploomber.io/s/params for more information
"""
if self.loc and Path(self.loc).suffix == '.ipynb':
url = ('https://papermill.readthedocs.io/'
'en/stable/usage-parameterize.html')
msg += ('. Add a cell at the top and tag it as "parameters". '
f'Click here for instructions: {url}')
'Go to the next URL for '
'details: https://ploomber.io/s/params')

raise SourceInitializationError(msg)

Expand Down

0 comments on commit 008f57b

Please sign in to comment.