Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pyproject.toml to automatically enable "Deploy as" option #66

Open
tdpetrou opened this issue Feb 7, 2023 · 2 comments
Open

Comments

@tdpetrou
Copy link
Contributor

tdpetrou commented Feb 7, 2023

I finally had a chance to look at pyproject.toml and noticed that there is no instruction to automatically copy jupyter-config/nbconfig/notebook.d/jupyter_to_medium.json into the local user directoryetc/jupyter/nbconfig/notebook.d during installation. This enables the "File -> Deploy as" dropdown menu option in the notebook.

Currently, users will need to run jupyter bundlerextension enable --py jupyter_to_medium._bundler --sys-prefix in order to get this option to appear.

With the old setup.py packaging scipt, this was accomplished through the use of data_files. See the examples in the Jupyter notebook documentation here.

Briefly looking at poetry, It doesn't appear that there is support for it. A long discussion can be seen here.

@spoorn created poeblix, a poetry plugin for this exact case.

Any thoughts @mjam03 ?

@mjam03
Copy link
Collaborator

mjam03 commented Mar 27, 2023

Hey,

Sorry for the long silence - just got round to checking this out this morning.

Yeah looks great - I'll go through at some point this week and:

  • implement this
  • update the package in general
  • see if there are any other issues I can solve quickly

Apologies for dropping the ball here - got busy with some other stuff. Time to give jupyter-to-medium some love.

Mark

@mjam03
Copy link
Collaborator

mjam03 commented Mar 27, 2023

I've gone through and updated the package dependencies to bring us into 2022/2023 - I've also just checked out the data_files idea and unfortunately poeblix won't work right out of the box.

Here we can see that it joins these paths and sticks 'data' in there so we can't construct that nice clean path to etc/jupyter/nbconfig/notebook.d:

https://github.com/spoorn/poeblix/blob/274c55aa4b85b8651ac31bc79fda67c3cd4e6c5e/src/poeblix/plugins.py#L178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants