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

Remove extra_paths #321

Closed
yajo opened this issue Dec 30, 2020 · 2 comments · Fixed by #314
Closed

Remove extra_paths #321

yajo opened this issue Dec 30, 2020 · 2 comments · Fixed by #314
Assignees
Labels
maintenance Boring maintenance routine
Milestone

Comments

@yajo
Copy link
Member

yajo commented Dec 30, 2020

This option is from old and very confusing.

It would allow a template to do things such as [% extend 'other.tmpl' %] while other.tmpl didn't exist. Besides, it has to indicate a path properly resolvable from the copier execution context (so, a relative path to user's CWD, or absolute path in user's machine, instead of a URL to another template, which could be local or remote).

The amount of buggy cases this feature would produce and the lack of issue reports seems to indicate that nobody uses this. I'll remove it.

If you want to share common templates, the best you can do is to use a git submodule in your template. Copier handles git submodules just fine.

@yajo yajo self-assigned this Dec 30, 2020
@yajo yajo added the maintenance Boring maintenance routine label Dec 30, 2020
@yajo yajo added this to the v6.0.0 milestone Dec 30, 2020
@yajo yajo linked a pull request Dec 30, 2020 that will close this issue
yajo added a commit that referenced this issue Dec 30, 2020
@yajo yajo closed this as completed in #314 Feb 9, 2021
yajo added a commit that referenced this issue Feb 9, 2021
* Refactor
* Fix #110.
* Rewrite test_config_exclude, test_config_exclude_overridden and test_config_include. These tests were badly designed, using a monkeypatch that would never happen in the real world, and actually producing false positives. I moved them to test_exclude.py and rewritten to test the what and not the how.
* Fix #214 by removing skip option. Relevant tests use the better skip_if_exists=["**"].
* Remove subdirectory flag from API/CLI. It was confusing and could lead to bad maintenance situations. Fixes #315.
* Remove extra_paths and fix #321
* Remember that you cannot use _copier_conf.src_path as a path now
* use dataclasses
* Create errors module, simplify some tests, fix many others
* Fix some tests, complete EnvOps removal
* Fix #214 and some tests related to it
* Reorder code
* Update docs and imports
* Modularize test_complex_questions
* Interlink worker and questionary a bit better
* Removal of Questionary class, which only had 1 meaningful method that is now merged into Worker to avoid circular dependencies.
* Fix #280 in a simple way: only user answers are type-casted inside API, and CLI transforms all `--data` using YAML always. Predictable.
* Use prereleases correctly.
* Reorder AnswersMap to have a more significative repr.
* Simpler cache for old `Question.get_choices()` method (renamed now).
* fix wrong test
* Fix test_subdirectory
* Fix test_tasks (and remove tests/demo_tasks)
* Fix path filter tests, and move it to test_exclude, where it belongs
* Make test_config pass
* Fix more wrongly designed tests
* Use cached_property backport if needed
* xfail test known to fail on mac
* force posix paths on windows
* Add typing_extensions for python < 3.8
* Sort dependencies in pyproject.toml
* Support python 3.6 str-to-datetime conversion
* Workaround https://bugs.python.org/issue43095
* xfail test_path_filter on windows
* Upgrade mkdocs and other dependencies to fix mkdocstrings/mkdocstrings#222
* Add missing reference docs.
* Add workaround for mkdocstrings/mkdocstrings#209
* Docs.
* Remove validators module
* Add workaround for mkdocstrings/mkdocstrings#225
* Restore docs autorefs as explained in mkdocstrings/mkdocstrings#226 (comment).
* Workaround mkdocstrings/pytkdocs#86
@tft7000
Copy link

tft7000 commented Aug 10, 2021

@yajo : just as a note: this feature was a main reason to look at this project instead of one of the big ones:

  • i don't use git (for each template)
  • i have a directory setup:
    • fragments/ (template parts)
    • templates/<project templates>/<template that references to different global fragments>

in a ci job i get a template name with an answer file. together I can build a setup for a specific container image. the container that is running the setup job has all the templates and fragments. it will automatically rebuild, if one of the templates changes.

I think it is a petty, if this feature will go, just because there is a potential that a user does not know what he is doing. On the other side, I would prefer support for the configuration directly in copier.yaml.

@yajo
Copy link
Member Author

yajo commented Aug 16, 2021

You can probably solve that by adding a symlink to your fragments folder, right?

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

Successfully merging a pull request may close this issue.

2 participants