Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/copier-org/copier
/ functions
Functions
643 in github.com/copier-org/copier
⨍
Functions
643
◇
Types & classes
57
↳
Endpoints
9
↓ 246 callers
Function
build_file_tree
Builds a file tree based on the received spec. Params: spec: A mapping from filesystem paths to file contents. If the content
tests/helpers.py:112
↓ 123 callers
Method
run_copy
Generate a subproject from zero, ignoring what was in the folder. If `dst_path` was missing, it will be created. Otherwise, `src_path
copier/_main.py:1246
↓ 113 callers
Function
run_copy
Copy a template to a destination, from zero.
copier/_main.py:1701
↓ 83 callers
Function
load_answersfile_data
Load answers data from a `$dst_path/$answers_file` file if it exists.
copier/_user_data.py:587
↓ 69 callers
Function
run_update
Update a subproject, from its template.
copier/_main.py:1809
↓ 56 callers
Function
git_save
Save the current repo state in git. Args: dst: Path to the repo to save. message: Commit message. tag: Tag to create, opt
tests/helpers.py:165
↓ 43 callers
Function
expect_prompt
Check that we get a prompt in the standard form
tests/helpers.py:142
↓ 39 callers
Function
spawn
Spawn a copier process TUI to interact with.
tests/conftest.py:43
↓ 21 callers
Function
get_git
Gets `git` command, or fails if it's not available.
copier/_vcs.py:39
↓ 18 callers
Function
git_init
Initialize a Git repository with a first commit. Args: message: The first commit message.
tests/helpers.py:187
↓ 14 callers
Method
run_update
Update a subproject that was already generated. See [updating a project][updating-a-project].
copier/_main.py:1311
↓ 13 callers
Function
render
(tmp_path: Path, **kwargs: Any)
tests/helpers.py:101
↓ 11 callers
Function
deprecate_member_as_internal
Deprecate a module member as internal with a warning. Args: member: The module member name. module: The module name.
copier/_deprecation.py:27
↓ 10 callers
Function
deprecate_module_as_internal
Deprecate a module as internal with a warning. Args: name: The module name.
copier/_deprecation.py:13
↓ 10 callers
Method
from_file
Load settings from a file.
copier/_settings.py:93
↓ 10 callers
Function
run_recopy
Update a subproject from its template, discarding subproject evolution.
copier/_main.py:1755
↓ 9 callers
Function
clone
Clone repo into some temporary destination. Remote repositories are cached as a local git mirror and checked out into a temporary worktree, s
copier/_vcs.py:344
↓ 8 callers
Method
_render_string
Render one templated string. Args: string: The template source string. extra_context:
copier/_main.py:1165
↓ 8 callers
Method
render_value
Render a single templated value using Jinja. If the value cannot be used as a template, it will be returned as is. `extra_answers` ar
copier/_user_data.py:475
↓ 7 callers
Method
__init__
( self, command: str | Sequence[str], returncode: int, stdout: str | bytes | N
copier/errors.py:179
↓ 7 callers
Function
load_settings
Load settings from a YAML file. If `settings_path` is not given, the path is determined from the `COPIER_SETTINGS_PATH` environment variable
copier/_settings.py:36
↓ 7 callers
Function
question_tree
(tmp_path_factory: pytest.TempPathFactory)
tests/test_prompt.py:973
↓ 6 callers
Function
copier
Multiple choices are properly remembered and selected in TUI when updating.
tests/test_prompt.py:1000
↓ 5 callers
Function
_get_mirror_path
Compute the deterministic on-disk location of the mirror for `url`.
copier/_vcs.py:228
↓ 5 callers
Method
_render_context
Produce render context for Jinja.
copier/_main.py:435
↓ 5 callers
Function
cast_to_bool
Parse anything to bool. Params: value: Anything to be casted to a bool. Tries to be as smart as possible. 1. Ca
copier/_tools.py:114
↓ 4 callers
Function
_handle_exceptions
Handle exceptions while running a method.
copier/_cli.py:76
↓ 4 callers
Method
cast_answer
Cast answer to expected type.
copier/_user_data.py:247
↓ 4 callers
Function
get_repo
Transform `url` into a git-parseable origin URL. Args: url: Valid examples: - gh:copier-org/copier -
copier/_vcs.py:125
↓ 4 callers
Method
get_type_name
Render the type name and return it.
copier/_user_data.py:447
↓ 4 callers
Function
get_yield_context
Get or create yield context for an environment.
copier/_jinja_ext.py:27
↓ 4 callers
Function
normalize_git_path
r"""Convert weird characters returned by Git to normal UTF-8 path strings. A filename like âñ will be reported by Git as "\\303\\242\\303\\261" (
copier/_tools.py:184
↓ 3 callers
Method
_render_allowed
Determine if a file or directory can be rendered. Args: dst_relpath: Relative path to destination. is
copier/_main.py:517
↓ 3 callers
Method
get_default
Get the default value for this question, casted to its expected type.
copier/_user_data.py:267
↓ 3 callers
Function
get_git_version
Get the installed git version.
copier/_vcs.py:52
↓ 3 callers
Method
get_when
Get skip condition for question.
copier/_user_data.py:471
↓ 3 callers
Method
parse_answer
Parse the answer according to the question's type.
copier/_user_data.py:500
↓ 3 callers
Function
printf
Print string with common format.
copier/_tools.py:65
↓ 3 callers
Function
try_enum
Try to convert a value into an enum. If the value is not a valid enum member, return the original value.
copier/_tools.py:279
↓ 3 callers
Method
use
Set the current phase for the duration of a context.
copier/_types.py:112
↓ 3 callers
Method
validate_answer
Validate user answer.
copier/_user_data.py:460
↓ 2 callers
Method
_check_unsafe
Check whether a template uses unsafe features.
copier/_main.py:299
↓ 2 callers
Function
_default_settings_path
()
copier/_settings.py:131
↓ 2 callers
Method
_default_settings_path
()
copier/_settings.py:89
↓ 2 callers
Method
_execute_tasks
Run the given tasks. Arguments: tasks: The list of tasks to run.
copier/_main.py:389
↓ 2 callers
Method
_external_data
Load external data lazily. Result keys are used for rendering, and values are the parsed contents of the YAML files specified in [ext
copier/_main.py:320
↓ 2 callers
Method
_git_commit
(self, message: str = "dumb commit")
copier/_main.py:1679
↓ 2 callers
Function
_is_remote
Tell whether `url` points to a remote repository worth caching. Local repositories (existing directories or bundle files, as well as paths ma
copier/_vcs.py:234
↓ 2 callers
Function
_is_trusted
( trust_or_settings: Iterable[str] | SettingsModel, repository: str )
copier/_settings.py:135
↓ 2 callers
Function
_normalize
(url: str)
copier/_settings.py:152
↓ 2 callers
Method
_path_matcher
Produce a function that matches against specified patterns.
copier/_main.py:473
↓ 2 callers
Method
_print_message
(self, message: str)
copier/_main.py:363
↓ 2 callers
Function
assert_file
(tmp_path: Path, *path: str)
tests/helpers.py:106
↓ 2 callers
Function
check_invalid
Check that invalid input is reported correctly
tests/test_complex_questions.py:122
↓ 2 callers
Function
copier_version
Get closest match for the installed copier version.
copier/_tools.py:51
↓ 2 callers
Function
deprecate_member
Deprecate a module member with a new import statement with a warning. Args: member: The module member name. module: The module na
copier/_deprecation.py:43
↓ 2 callers
Function
empty_dir
(dir: Path)
tests/test_tmpdir.py:36
↓ 2 callers
Method
expect
(self, tui: PopenSpawn)
tests/test_templated_prompt.py:45
↓ 2 callers
Function
filter_config
Separates config and questions data.
copier/_template.py:60
↓ 2 callers
Function
get_latest_tag
Get latest git tag, sorted by PEP 440. Args: url: Git-parseable URL of the repo. As returned by [get_repo][copier
copier/_vcs.py:161
↓ 2 callers
Method
get_multiline
Get the value for multiline.
copier/_user_data.py:456
↓ 2 callers
Function
is_git_available
Indicate if `git` is available in the system.
copier/_vcs.py:59
↓ 2 callers
Function
is_git_repo_root
Indicate if a given path is a git repo root directory.
copier/_vcs.py:82
↓ 2 callers
Function
is_trusted_repository
Check if a repository is trusted. Args: trust: The set of trusted repositories or prefixes. repository: The repository URL to che
copier/_settings.py:65
↓ 2 callers
Function
load_template_config
Load the `copier.yml` file. This is like a simple YAML load, but applying all specific quirks needed for [the `copier.yml` file][the-copierym
copier/_template.py:75
↓ 2 callers
Method
match_exclude
Get a callable to match paths against all exclusions.
copier/_main.py:760
↓ 2 callers
Method
match_skip
Get a callable to match paths against all skip-if-exists patterns.
copier/_main.py:772
↓ 2 callers
Method
migration_tasks
Get migration objects that match current version spec. Versions are compared using PEP 440. See [migrations][]. Args:
copier/_template.py:382
↓ 2 callers
Method
parse
Parse the `yield` tag.
copier/_jinja_ext.py:77
↓ 2 callers
Function
printf_exception
Print exception with common format.
copier/_tools.py:86
↓ 2 callers
Method
run_recopy
Update a subproject, keeping answers but discarding evolution.
copier/_main.py:1291
↓ 1 callers
Method
__init__
(self, environment: Environment)
tests/test_jinja2_extensions.py:18
↓ 1 callers
Method
_answers_to_remember
Get only answers that will be remembered in the copier answers file.
copier/_main.py:367
↓ 1 callers
Method
_apply_update
(self)
copier/_main.py:1362
↓ 1 callers
Method
_ask
Ask the questions of the questionnaire and record their answers.
copier/_main.py:592
↓ 1 callers
Method
_cleanup
Execute all stored cleanup methods.
copier/_main.py:294
↓ 1 callers
Function
_clone_via_cache
Create a temporary worktree of `mirror` at `ref` in `location`. `git worktree add` refuses a path that already exists, so remove the pre-allo
copier/_vcs.py:319
↓ 1 callers
Function
_encode
(data: str)
tests/test_settings.py:99
↓ 1 callers
Function
_encode
(data: str)
tests/test_settings_deprecated.py:97
↓ 1 callers
Function
_encode
(data: str)
tests/test_answersfile.py:391
↓ 1 callers
Function
_force_rmtree
Remove `path`, coping with git's read-only files (e.g. on Windows).
copier/_vcs.py:251
↓ 1 callers
Function
_get_cache_dir
Get the directory where cached git mirrors are stored. Defaults to a per-user cache directory (via `platformdirs`), but can be overridden wit
copier/_vcs.py:202
↓ 1 callers
Function
_get_or_create_mirror
Get a cached `--mirror` clone of `url`, creating or refreshing it. On first use the remote is mirror-cloned into the cache. On subsequent use
copier/_vcs.py:277
↓ 1 callers
Method
_git_initialize_repo
Initialize a git repository in the current directory.
copier/_main.py:1672
↓ 1 callers
Function
_is_valid_mirror
Tell whether `mirror` is a usable bare git repository. Guards against partial or corrupt cache entries (e.g. left behind by an interrupted cl
copier/_vcs.py:259
↓ 1 callers
Method
_parse_answer
Parse a single answer according to the question's type.
copier/_user_data.py:516
↓ 1 callers
Method
_print_template_update_info
(self, subproject_template: Template)
copier/_main.py:1301
↓ 1 callers
Function
_remove_old_files
Remove files and directories only found in "old" template. This is an internal helper method used to process a comparison of 2 directories, w
copier/_main.py:1912
↓ 1 callers
Method
_render_file
Render one file. Args: src_relpath: File to be rendered. It must be a path relative to the template
copier/_main.py:822
↓ 1 callers
Method
_render_folder
Create one folder (without content). Args: dst_relpath: Folder to be created. It must be a path relative to the
copier/_main.py:1039
↓ 1 callers
Method
_render_parts
Render a set of parts into path and context pairs. If a yield tag is found in a part, it will recursively yield multiple path and con
copier/_main.py:1052
↓ 1 callers
Method
_render_path
Render one relative path into multiple path and context pairs. Args: relpath: The relative path to be rendered. O
copier/_main.py:1146
↓ 1 callers
Method
_render_symlink
Render one symlink. Args: src_relpath: Symlink to be rendered. It must be a path relative to the
copier/_main.py:996
↓ 1 callers
Method
_render_template
Render the template in the subproject root.
copier/_main.py:776
↓ 1 callers
Method
_render_value
Render a value, which may or may not be a templated string. Args: value: The value to render. extra_
copier/_main.py:1180
↓ 1 callers
Method
_solve_render_conflict
Properly solve render conflicts. It can ask the user if running in interactive mode.
copier/_main.py:480
↓ 1 callers
Function
_strip_credentials
Remove any embedded `user:password@` credentials from `url`. Used to build the cache key so that the same repository accessed with different
copier/_vcs.py:214
↓ 1 callers
Method
_sync_git_index_executable_bit
Propagate executable-bit changes to the destination's git index. Only needed when ``core.fileMode`` is ``false`` (the Windows default
copier/_main.py:910
↓ 1 callers
Method
current
Get the current phase.
copier/_types.py:121
↓ 1 callers
Function
deprecate_answers_file_template_path
Deprecate answers file template paths in template's non-root directory.
copier/_deprecation.py:60
next →
1–100 of 643, ranked by callers