MCPcopy Create free account

hub / github.com/copier-org/copier / functions

Functions643 in github.com/copier-org/copier

↓ 246 callersFunctionbuild_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 callersMethodrun_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 callersFunctionrun_copy
Copy a template to a destination, from zero.
copier/_main.py:1701
↓ 83 callersFunctionload_answersfile_data
Load answers data from a `$dst_path/$answers_file` file if it exists.
copier/_user_data.py:587
↓ 69 callersFunctionrun_update
Update a subproject, from its template.
copier/_main.py:1809
↓ 56 callersFunctiongit_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 callersFunctionexpect_prompt
Check that we get a prompt in the standard form
tests/helpers.py:142
↓ 39 callersFunctionspawn
Spawn a copier process TUI to interact with.
tests/conftest.py:43
↓ 21 callersFunctionget_git
Gets `git` command, or fails if it's not available.
copier/_vcs.py:39
↓ 18 callersFunctiongit_init
Initialize a Git repository with a first commit. Args: message: The first commit message.
tests/helpers.py:187
↓ 14 callersMethodrun_update
Update a subproject that was already generated. See [updating a project][updating-a-project].
copier/_main.py:1311
↓ 13 callersFunctionrender
(tmp_path: Path, **kwargs: Any)
tests/helpers.py:101
↓ 11 callersFunctiondeprecate_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 callersFunctiondeprecate_module_as_internal
Deprecate a module as internal with a warning. Args: name: The module name.
copier/_deprecation.py:13
↓ 10 callersMethodfrom_file
Load settings from a file.
copier/_settings.py:93
↓ 10 callersFunctionrun_recopy
Update a subproject from its template, discarding subproject evolution.
copier/_main.py:1755
↓ 9 callersFunctionclone
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 callersMethod_render_string
Render one templated string. Args: string: The template source string. extra_context:
copier/_main.py:1165
↓ 8 callersMethodrender_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 callersMethod__init__
( self, command: str | Sequence[str], returncode: int, stdout: str | bytes | N
copier/errors.py:179
↓ 7 callersFunctionload_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 callersFunctionquestion_tree
(tmp_path_factory: pytest.TempPathFactory)
tests/test_prompt.py:973
↓ 6 callersFunctioncopier
Multiple choices are properly remembered and selected in TUI when updating.
tests/test_prompt.py:1000
↓ 5 callersFunction_get_mirror_path
Compute the deterministic on-disk location of the mirror for `url`.
copier/_vcs.py:228
↓ 5 callersMethod_render_context
Produce render context for Jinja.
copier/_main.py:435
↓ 5 callersFunctioncast_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 callersFunction_handle_exceptions
Handle exceptions while running a method.
copier/_cli.py:76
↓ 4 callersMethodcast_answer
Cast answer to expected type.
copier/_user_data.py:247
↓ 4 callersFunctionget_repo
Transform `url` into a git-parseable origin URL. Args: url: Valid examples: - gh:copier-org/copier -
copier/_vcs.py:125
↓ 4 callersMethodget_type_name
Render the type name and return it.
copier/_user_data.py:447
↓ 4 callersFunctionget_yield_context
Get or create yield context for an environment.
copier/_jinja_ext.py:27
↓ 4 callersFunctionnormalize_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 callersMethod_render_allowed
Determine if a file or directory can be rendered. Args: dst_relpath: Relative path to destination. is
copier/_main.py:517
↓ 3 callersMethodget_default
Get the default value for this question, casted to its expected type.
copier/_user_data.py:267
↓ 3 callersFunctionget_git_version
Get the installed git version.
copier/_vcs.py:52
↓ 3 callersMethodget_when
Get skip condition for question.
copier/_user_data.py:471
↓ 3 callersMethodparse_answer
Parse the answer according to the question's type.
copier/_user_data.py:500
↓ 3 callersFunctionprintf
Print string with common format.
copier/_tools.py:65
↓ 3 callersFunctiontry_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 callersMethoduse
Set the current phase for the duration of a context.
copier/_types.py:112
↓ 3 callersMethodvalidate_answer
Validate user answer.
copier/_user_data.py:460
↓ 2 callersMethod_check_unsafe
Check whether a template uses unsafe features.
copier/_main.py:299
↓ 2 callersFunction_default_settings_path
()
copier/_settings.py:131
↓ 2 callersMethod_default_settings_path
()
copier/_settings.py:89
↓ 2 callersMethod_execute_tasks
Run the given tasks. Arguments: tasks: The list of tasks to run.
copier/_main.py:389
↓ 2 callersMethod_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 callersMethod_git_commit
(self, message: str = "dumb commit")
copier/_main.py:1679
↓ 2 callersFunction_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 callersFunction_is_trusted
( trust_or_settings: Iterable[str] | SettingsModel, repository: str )
copier/_settings.py:135
↓ 2 callersFunction_normalize
(url: str)
copier/_settings.py:152
↓ 2 callersMethod_path_matcher
Produce a function that matches against specified patterns.
copier/_main.py:473
↓ 2 callersMethod_print_message
(self, message: str)
copier/_main.py:363
↓ 2 callersFunctionassert_file
(tmp_path: Path, *path: str)
tests/helpers.py:106
↓ 2 callersFunctioncheck_invalid
Check that invalid input is reported correctly
tests/test_complex_questions.py:122
↓ 2 callersFunctioncopier_version
Get closest match for the installed copier version.
copier/_tools.py:51
↓ 2 callersFunctiondeprecate_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 callersFunctionempty_dir
(dir: Path)
tests/test_tmpdir.py:36
↓ 2 callersMethodexpect
(self, tui: PopenSpawn)
tests/test_templated_prompt.py:45
↓ 2 callersFunctionfilter_config
Separates config and questions data.
copier/_template.py:60
↓ 2 callersFunctionget_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 callersMethodget_multiline
Get the value for multiline.
copier/_user_data.py:456
↓ 2 callersFunctionis_git_available
Indicate if `git` is available in the system.
copier/_vcs.py:59
↓ 2 callersFunctionis_git_repo_root
Indicate if a given path is a git repo root directory.
copier/_vcs.py:82
↓ 2 callersFunctionis_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 callersFunctionload_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 callersMethodmatch_exclude
Get a callable to match paths against all exclusions.
copier/_main.py:760
↓ 2 callersMethodmatch_skip
Get a callable to match paths against all skip-if-exists patterns.
copier/_main.py:772
↓ 2 callersMethodmigration_tasks
Get migration objects that match current version spec. Versions are compared using PEP 440. See [migrations][]. Args:
copier/_template.py:382
↓ 2 callersMethodparse
Parse the `yield` tag.
copier/_jinja_ext.py:77
↓ 2 callersFunctionprintf_exception
Print exception with common format.
copier/_tools.py:86
↓ 2 callersMethodrun_recopy
Update a subproject, keeping answers but discarding evolution.
copier/_main.py:1291
↓ 1 callersMethod__init__
(self, environment: Environment)
tests/test_jinja2_extensions.py:18
↓ 1 callersMethod_answers_to_remember
Get only answers that will be remembered in the copier answers file.
copier/_main.py:367
↓ 1 callersMethod_apply_update
(self)
copier/_main.py:1362
↓ 1 callersMethod_ask
Ask the questions of the questionnaire and record their answers.
copier/_main.py:592
↓ 1 callersMethod_cleanup
Execute all stored cleanup methods.
copier/_main.py:294
↓ 1 callersFunction_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 callersFunction_encode
(data: str)
tests/test_settings.py:99
↓ 1 callersFunction_encode
(data: str)
tests/test_settings_deprecated.py:97
↓ 1 callersFunction_encode
(data: str)
tests/test_answersfile.py:391
↓ 1 callersFunction_force_rmtree
Remove `path`, coping with git's read-only files (e.g. on Windows).
copier/_vcs.py:251
↓ 1 callersFunction_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 callersFunction_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 callersMethod_git_initialize_repo
Initialize a git repository in the current directory.
copier/_main.py:1672
↓ 1 callersFunction_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 callersMethod_parse_answer
Parse a single answer according to the question's type.
copier/_user_data.py:516
↓ 1 callersMethod_print_template_update_info
(self, subproject_template: Template)
copier/_main.py:1301
↓ 1 callersFunction_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 callersMethod_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 callersMethod_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 callersMethod_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 callersMethod_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 callersMethod_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 callersMethod_render_template
Render the template in the subproject root.
copier/_main.py:776
↓ 1 callersMethod_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 callersMethod_solve_render_conflict
Properly solve render conflicts. It can ask the user if running in interactive mode.
copier/_main.py:480
↓ 1 callersFunction_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 callersMethod_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 callersMethodcurrent
Get the current phase.
copier/_types.py:121
↓ 1 callersFunctiondeprecate_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