MCPcopy Create free account

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

Functions643 in github.com/copier-org/copier

↓ 1 callersFunctionencode_data
(data: dict[str, str])
tests/test_cli.py:243
↓ 1 callersFunctionescape_git_path
Escape paths that will be used as literal gitwildmatch patterns. If the path was returned by a Git command, it should be unescaped completely.
copier/_tools.py:209
↓ 1 callersFunctionforce_str_end
Make sure a `original_str` ends with `end`. Params: original_str: String that you want to ensure ending. end: String that must ex
copier/_tools.py:143
↓ 1 callersMethodfrom_process
Create a TaskError from a CompletedProcess.
copier/errors.py:193
↓ 1 callersMethodget_default_rendered
Get default answer rendered for the questionary lib. The questionary lib expects some specific data types, and returns it when the us
copier/_user_data.py:298
↓ 1 callersFunctionget_git_objects_dir
Get the absolute path of a Git repository's objects directory.
copier/_tools.py:233
↓ 1 callersMethodget_message
Get the message that will be printed to the user.
copier/_user_data.py:370
↓ 1 callersMethodget_placeholder
Render and obtain the placeholder.
copier/_user_data.py:381
↓ 1 callersMethodget_questionary_structure
Get the question in a format that the questionary lib understands.
copier/_user_data.py:385
↓ 1 callersFunctionget_update_data
Gets data regarding if a subproject has updates. Returns a tuple containing a bool for if the project has an update, a string containing a pr
copier/_main.py:1867
↓ 1 callersFunctiongit_commands
()
tests/test_cli.py:371
↓ 1 callersMethodhide
Remove an answer by key.
copier/_user_data.py:131
↓ 1 callersMethodis_dirty
Indicate if the local template root is dirty. Only applicable for VCS-tracked templates.
copier/_subproject.py:39
↓ 1 callersFunctionis_git_bundle
Indicate if a path is a valid git bundle.
copier/_vcs.py:115
↓ 1 callersFunctionis_git_shallow_repo
Indicate if a given path is a git shallow repo directory.
copier/_vcs.py:104
↓ 1 callersFunctionis_in_git_repo
Indicate if a given path is in a git repo directory.
copier/_vcs.py:95
↓ 1 callersMethodis_trusted
Check if a repository is trusted.
copier/_settings.py:122
↓ 1 callersFunctionparse_yaml_list
Shallowly parse a YAML string that contains a list of items. All items remain raw strings, only the outermost list is parsed. Args:
copier/_user_data.py:549
↓ 1 callersFunctionparse_yaml_string
Parse a YAML string and raise a ValueError if parsing failed. This method is needed because :meth:`prompt` requires a ``ValueError`` to repea
copier/_user_data.py:537
↓ 1 callersFunctionscantree
A recursive extension of `os.scandir`.
copier/_tools.py:267
↓ 1 callersFunctionset_git_alternates
Set Git alternates to borrow Git objects from other repositories. Alternates are paths of other repositories' object directories written to `
copier/_tools.py:251
↓ 1 callersFunctiontemplate_path_with_dot_config
( tmp_path_factory: pytest.TempPathFactory, )
tests/test_cli.py:39
↓ 1 callersFunctionvalid_version
Tell if a string is a valid [PEP 440][] version specifier. [PEP 440]: https://peps.python.org/pep-0440/
copier/_vcs.py:422
↓ 1 callersFunctionverify_copier_version
Raise an error if the current Copier version is less than the given version. Args: version_str: Minimal copier version for th
copier/_template.py:130
↓ 1 callersMethodversion
PEP440-compliant version object.
copier/_template.py:634
Method__call__
(self, **kwargs)
tests/test_prompt.py:969
Method__call__
(self, *args, **kwargs)
tests/test_prompt.py:996
Method__call__
( self, cmd: tuple[str, ...], *, timeout: int | None = ... )
tests/helpers.py:74
Method__delitem__
(self, key: _K)
copier/_types.py:87
Method__enter__
Allow using worker as a context manager.
copier/_main.py:266
Method__exit__
(self, type: None, value: None, traceback: None)
copier/_main.py:271
Function__getattr__
(name: str)
copier/vcs.py:20
Function__getattr__
(name: str)
copier/subproject.py:20
Function__getattr__
(name: str)
copier/cli.py:20
Function__getattr__
(name: str)
copier/__init__.py:23
Function__getattr__
(name: str)
copier/types.py:20
Function__getattr__
(name: str)
copier/tools.py:20
Function__getattr__
(name: str)
copier/jinja_ext.py:20
Function__getattr__
(name: str)
copier/user_data.py:20
Function__getattr__
(name: str)
copier/settings.py:24
Function__getattr__
(name: str)
copier/main.py:20
Function__getattr__
(name: str)
copier/template.py:20
Method__getitem__
(self, key: _K)
copier/_types.py:78
Method__init__
(self, message: str)
copier/errors.py:62
Method__init__
(self, conf_path: Path, quiet: bool)
copier/errors.py:80
Method__init__
(self, conf_paths: PathSeq)
copier/errors.py:89
Method__init__
(self, *, path: Path)
copier/errors.py:106
Method__init__
(self, *, path: Path)
copier/errors.py:113
Method__init__
(self, *, path: Path, hint: str = "")
copier/errors.py:120
Method__init__
( self, answers: AnswersMap, last_question: Question, template: Template )
copier/errors.py:148
Method__init__
(self, features: Sequence[str])
copier/errors.py:159
Method__init__
(self, message: str)
copier/errors.py:237
Method__init__
(self, mapping: Mapping[_K, Callable[[], _V]] | None = None)
copier/_types.py:74
Method__init__
(self, executable: str | None = None)
copier/_cli.py:120
Method__init__
(self, name: str, format: str, help: str | None = None)
tests/test_templated_prompt.py:40
Method__init__
(self, environment: Environment)
tests/test_jinja2_extensions.py:30
Method__iter__
(self)
copier/_types.py:91
Method__len__
(self)
copier/_types.py:94
Method__setitem__
(self, key: _K, value: _V)
copier/_types.py:83
Method__str__
(self)
copier/errors.py:65
Method__str__
(self)
copier/_types.py:107
Function_cache_dir
Redirect the git template mirror cache to a temporary directory. Avoids polluting the user's real Copier cache with the templates cloned duri
tests/conftest.py:125
Method_check_secret_question_default_value
( cls, v: bool, info: ValidationInfo )
copier/_user_data.py:240
Method_check_type
(cls, v: str, info: ValidationInfo)
copier/_user_data.py:232
Method_check_var_name
(cls, v: str)
copier/_user_data.py:225
Method_cleanup
(self)
copier/_template.py:235
Method_cleanup
Remove temporary files and folders created by the subproject.
copier/_subproject.py:51
Function_decorator
(func: Callable[_P, _T])
copier/_main.py:102
Method_formatted_choices
Obtain choices rendered and properly formatted.
copier/_user_data.py:335
Function_include
(loader: yaml.Loader, node: yaml.Node)
copier/_template.py:95
Method_load_external_data
(path: str)
copier/_main.py:334
Function_make_secret
()
copier/_user_data.py:54
Function_mock_git
(*args: str)
tests/test_vcs.py:401
Function_now
()
copier/_user_data.py:44
Method_pathjoin
( *path: str, mode: Literal["posix", "windows", "native"] = "posix" )
copier/_main.py:751
Method_raw_answers
Get last answers, loaded raw as yaml.
copier/_subproject.py:57
Method_raw_config
Get template configuration, raw. It reads [the `copier.yml` file][the-copieryml-file].
copier/_template.py:253
Method_render
(path: str)
copier/_main.py:330
Function_spawn
( cmd: tuple[str, ...], *, timeout: int | None = spawn_timeout )
tests/conftest.py:52
Function_template_path_with_dot_config
(config_folder: str)
tests/test_cli.py:42
Method_validate
(answer: str)
copier/_user_data.py:388
Function_wrapper
(*args: _P.args, **kwargs: _P.kwargs)
copier/_main.py:104
Method_yield_support
Support function for the yield tag. Sets the `yield_name` and `yield_iterable` in the yield context then calls the provided caller fu
copier/_jinja_ext.py:97
Methodall_exclusions
Combine default, template and user-chosen exclusions.
copier/_main.py:690
Methodall_skip_if_exists
Combine default and template skip-if-exists patterns.
copier/_main.py:695
Methodanswers_relpath
Obtain the proper relative path for the answers file. It comes from: 1. User choice. 2. Template default. 3. Copier
copier/_main.py:671
Methodanswers_relpath
Get the answers file relative path, as specified in the template. If not specified, returns the default `.copier-answers.yml`. See [
copier/_template.py:270
Functionas_operation
Decorator to set the current operation context, if not defined already. This value is used to template specific configuration options.
copier/_main.py:96
Functionbuilder
(**question)
tests/test_prompt.py:974
Functioncast_to_str
Parse anything to str. Params: value: Anything to be casted to a str.
copier/_tools.py:98
Methodcombined
Answers combined from different sources, sorted by priority.
copier/_user_data.py:113
Methodcommit
If the template is VCS-tracked, get its commit description.
copier/_template.py:282
Methodcommit_hash
If the template is VCS-tracked, get its commit full hash.
copier/_template.py:290
Methodconfig_data
Get config from the template. It reads [the `copier.yml` file][the-copieryml-file] to get its [settings][available-settings].
copier/_template.py:297
Functionconfig_path
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/conftest.py:110
Methoddata_file_switch
Update [data][] with provided values. Arguments: path: The path to the YAML file to load.
copier/_cli.py:200
Methoddata_switch
Update [data][] with provided values. Arguments: values: The list of values to apply. Each value in the list is o
copier/_cli.py:184
Functiondefault_git_user_email
Unset the default Git user email.
tests/conftest.py:76
Functiondefault_git_user_name
Unset the default Git user name.
tests/conftest.py:70
Functiondefault_gitconfig
Use a clean and isolated default gitconfig avoiding user settings to break some tests. Add plumbum support to the original session-scope
tests/conftest.py:82
← previousnext →101–200 of 643, ranked by callers