feat: Add resolved template repository path as _repo_dir to the context#1771
Merged
ericof merged 2 commits intocookiecutter:mainfrom Sep 9, 2022
tmeckel:feat/context-repo-dir
Merged
feat: Add resolved template repository path as _repo_dir to the context#1771ericof merged 2 commits intocookiecutter:mainfrom tmeckel:feat/context-repo-dir
ericof merged 2 commits intocookiecutter:mainfrom
tmeckel:feat/context-repo-dir
Conversation
* Add resolved template repository path as _repo_dir to the context
* corrected test test_echo_undefined_variable_error to check for new context item _repo_dir
Contributor
Author
|
Someone @audreyfeldroy, @browniebroke, @ericof, @hackebrot, @insspb, @pydanny, @simobasso, @ssbarnea up to for a review of this mini PR, consisting of one line? 😁 |
Contributor
Author
|
@ericof Érico when will this be available in a new release i.e. when will there be a new release? |
Member
|
@tmeckel We will sprint on the next weeks to get a new release out |
|
Hoping for this change in a new release soon :) |
This was referenced Sep 19, 2022
|
Before this is released, is there any workaround whatsoever to get access to this in a hooks script? |
|
@ericof any hope a of release soon? 🙏 |
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 PR contains a small change, which includes the resolved repository path from the
determine_repo_diras item_repo_dirto the Cookiecutter context.This allows to define Python packages in the template and to reference them by extending the
sys.pathwith normal import statements, e.g. in hook scripts.Sample: