-
Notifications
You must be signed in to change notification settings - Fork 21
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
Pass additional configuration options to the jupyter lite build
command
#169
Pass additional configuration options to the jupyter lite build
command
#169
Conversation
91d9dd6
to
ee7b4ee
Compare
Thanks @agriyakhetarpal. Is there any reason why we can't just let the users pass a dictionary of options with values in Letting the user provide an entirely custom command seems like it might be too flexible, without much benefit over just allowing for extra options. |
This is what I was thinking as well with allowing a custom |
Yeah, checking for conflicts with the existing options, and if found raising, but leaving anything beyond that to the |
d0b669d
to
a032812
Compare
a032812
to
6eb6680
Compare
Thanks, here's a very crude implementation in 6eb6680 – I feel that Also, I un-silenced JupyterLite in 617a614, maybe it's good for us because we can inspect the logs both when checks pass and when they don't? Happy to revert the change if you disagree! |
Thanks @agriyakhetarpal. This is starting to look good. I'll take a closer look later today.
I see, what you've done is not to un-silence the output by default, but just override the default in the Can you add the example from #168 (comment) for changing the path to where |
Ah, apologies if I was too terse. I indeed mean to do it for |
I have now done this in f6e6d3b, happy to receive comments on the wording and if the location of this section is alright. I enabled some admonitions for this page by enabling the |
Co-Authored-By: Albert Steppi <[email protected]>
Co-Authored-By: Albert Steppi <[email protected]>
Co-authored-by: Albert Steppi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more suggestions for the exception raised when conflicting options are supplied.
Co-authored-by: Albert Steppi <[email protected]>
Co-authored-by: Albert Steppi <[email protected]>
@agriyakhetarpal. Do you still consider this to be a work in progress, and if so, what else are you planning to do? |
I just merged |
jupyter lite build
commandjupyter lite build
command
Edited the title and the description. I think this is the only remaining point that we can think to address:
If someone does not pass in a custom option via |
Yes. I think it would be good to add a sentence saying that options in the |
Or I guess there are environment variables, a json config file, and command line options? |
The documentation seems to be quite sparse about it – the JSON configuration file isn't mentioned on the CLI documentation page, and https://jupyterlite.readthedocs.io/en/stable/howto/configure/config_files.html explains which JSON files affect the build command, but there is no reference about the priority as such. I think the priority is CLI > environment variables > JSON configuration file, but I need to check for the second comparison. |
Or, we can not state the comparison directly through the sentence added in a9ca886, considering this is a feature for power users and they can figure out things as they try it (and no one would, in realistic contexts, use a mixture of all three: This is ready for re-review/merging on my end. |
Co-authored-by: Albert Steppi <[email protected]>
Thanks @agriyakhetarpal, this looks good to me now. |
Description
This PR closes #168. It aims to implement additional options from the JupyterLite CLI, i.e., the
jupyter lite build
command that is currently wrapped in a subprocess call inside a Sphinx app. This enables the use of, say, custom environments from a file as requested in #168 (comment), allowing overrides in case of conflicts whereenvironment.yml
might refer to a file that is not being used forjupyterlite-sphinx
but for setting up general environments withmamba
orconda
.Changes made
jupyterlite_build_command_options
as a configuration option to allow power users ofjupyterlite-sphinx
to customise their JupyterLite build procedure with a dictionary of options.Task list
setup()
function?Additional context
Since the
jupyterlite-pyodide
kernel doesn't support pre-installing packages right now, it's not possible to addrequirements.txt
files. Users shall have to use theemscripten-forge
channel and thexeus
kernel to get the packages they need.