enhancement env var for extra_template_basedirs#2028
Open
ndmlny-qs wants to merge 1 commit intojupyter:mainfrom
Open
enhancement env var for extra_template_basedirs#2028ndmlny-qs wants to merge 1 commit intojupyter:mainfrom
ndmlny-qs wants to merge 1 commit intojupyter:mainfrom
Conversation
This commit add the following three items. - Updates the method `_default_extra_template_basedirs` in the module `templateexporter.py` to search for a new environment variable called `NBCONVERT_EXTRA_TEMPLATE_BASEDIRS`. This environment variable will be added to the basedirs list if it is found, and it exists. - Updates the tests to ensure if the new environment variable exists then it is included in the `TemplateExporter.template_paths`. - Adds a context manager method that modifies the `os.environ` dictionary. Closes jupyter#2026
Author
|
@Carreau let me know if you'd like additional items added or any changes or more tests. Thanks! |
Member
|
I have two worries:
Let me think about it a bit. |
Member
|
I've posted a followup in #2026 as I'd like to better understand the use case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit add the following three items.
_default_extra_template_basedirsin the moduletemplateexporter.pyto search for a new environment variable calledNBCONVERT_EXTRA_TEMPLATE_BASEDIRS. This environment variable will be added to the basedirs list if it is found, and it exists.TemplateExporter.template_paths.os.environdictionary.Closes #2026