MCPcopy Create free account

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

Functions643 in github.com/copier-org/copier

Functiondev_setup
Set up a development environment.
devtasks.py:12
Methodenvops
Get the Jinja configuration specified in the template, or default values. See [envops][].
copier/_template.py:309
Methodexclude
Get exclusions specified in the template, or default ones. See [exclude][].
copier/_template.py:322
Methodexternal_data
Get external data files specified in the template. See [external_data][].
copier/_template.py:335
Functionfake_which
(_cls: LocalMachine, progname: Any)
tests/test_copy.py:62
Functionfixture
(*args, **kwargs)
tests/test_prompt.py:1003
Methodgit_index_modes
Read file modes from the template's git index. This returns the mode bits for every tracked file as recorded in git's index, keyed by
copier/_template.py:584
Functiongitconfig
Use a clean and isolated gitconfig to test some specific user settings. Add plumbum support to the original function-scoped fixture.
tests/conftest.py:99
Functionhandle_remove_readonly
Handle errors when trying to remove read-only files through `shutil.rmtree`. On Windows, `shutil.rmtree` does not handle read-only files very wel
copier/_tools.py:155
Methodinner
()
copier/_cli.py:265
Methodinner
()
copier/_cli.py:353
Methodinner
()
copier/_cli.py:446
Methodinner
()
copier/_cli.py:530
Functioninterrupting_popen
(args, *a, **kw)
tests/test_cleanup.py:166
Functionis_subdict
(small: dict[Any, Any], big: dict[Any, Any])
tests/test_config.py:349
Methodjinja_env
Return a pre-configured Jinja environment. Respects template settings.
copier/_main.py:700
Methodjinja_extensions
Get Jinja2 extensions specified in the template, or `()`. See [jinja_extensions][].
copier/_template.py:343
Methodlast_answers
Last answers, excluding private ones (except _src_path and _commit).
copier/_subproject.py:65
Functionlint
Lint and format the project.
devtasks.py:19
Methodlocal_abspath
Get the absolute path to the template on disk. This may clone it if `url` points to a VCS-tracked template. Dirty changes for local V
copier/_template.py:561
Methodmain
Call [run_copy][copier.run_copy]. Params: template_src: Indicate where to get the template from.
copier/_cli.py:252
Methodmain
Call [run_recopy][copier.run_recopy]. Parameters: destination_path: Only the destination path is needed to update
copier/_cli.py:341
Methodmain
Call [run_update][copier.run_update]. Parameters: destination_path: Only the destination path is needed to update
copier/_cli.py:434
Methodmain
Call get_update_data, parse its output, and write to console. Parameters: destination_path: Only the destination
copier/_cli.py:518
Methodmessage_after_copy
Get message to print after copy action specified in the template.
copier/_template.py:351
Methodmessage_after_update
Get message to print after update action specified in the template.
copier/_template.py:356
Methodmessage_before_copy
Get message to print before copy action specified in the template.
copier/_template.py:361
Methodmessage_before_update
Get message to print before update action specified in the template.
copier/_template.py:366
Methodmetadata
Get template metadata. This data, if any, should be saved in the answers file to be able to restore the template to this same state.
copier/_template.py:371
Methodmin_copier_version
Get minimal copier version for the template and validates it. See [min_copier_version][].
copier/_template.py:461
Functionmocked_chmod
(self: Path, mode: int)
tests/test_copy.py:1491
Methodnormalize
Normalize an URL using user settings.
copier/_settings.py:126
Methodold_commit
Commit when the project was updated from this template the last time.
copier/_user_data.py:127
Functionon_page_markdown
Modify markdown content before it's converted to HTML.
mkdocs_hooks.py:13
Functionpath_is_absolute
Require absolute paths in an argument.
copier/_types.py:44
Functionpath_is_relative
Require relative paths in an argument.
copier/_types.py:53
Methodpreprocess
Preprocess hook to reset context before rendering.
copier/_jinja_ext.py:67
Methodpreserve_symlinks
Know if Copier should preserve symlinks when rendering the template. See [preserve_symlinks][].
copier/_template.py:553
Functionpytest_addoption
(parser: Parser)
tests/conftest.py:21
Methodquestions_data
Get questions from the template. See [questions][].
copier/_template.py:472
Functionremote_repo
A small local git repo exposed via a ``file://`` URL (treated as remote). A ``file://`` URL is treated as remote by ``clone()``, so this exercise
tests/test_vcs.py:102
Methodresolved_vcs_ref
Get the resolved VCS reference to use. This is either `vcs_ref` or the subproject template ref if `vcs_ref` is `VcsRef.CURRENT`.
copier/_main.py:1198
Methodsecret_questions
Get names of secret questions from the template. These questions shouldn't be saved into the answers file.
copier/_template.py:484
Functionsettings_path
(config_path: Path)
tests/conftest.py:118
Methodskip_if_exists
Get skip patterns from the template. These files will never be rewritten when rendering the template. See [skip_if_exists][].
copier/_template.py:496
Functionspawn_timeout
(request: FixtureRequest)
tests/conftest.py:38
Methodsubdirectory
Get the subdirectory as specified in the template. The subdirectory points to the real template code, allowing the templater to separ
copier/_template.py:506
Methodsubproject
Get related subproject.
copier/_main.py:1211
Methodsuper_filter
(obj: Any)
tests/test_jinja2_extensions.py:21
Methodsuper_func
(argument: Any)
tests/test_jinja2_extensions.py:33
Methodtasks
Get tasks defined in the template. See [tasks][].
copier/_template.py:518
Methodtemplate
(self)
copier/_main.py:1221
Methodtemplate
Template, as it was used the last time.
copier/_subproject.py:74
Methodtemplate_copy_root
Absolute path from where to start copying. It points to the cloned template local abspath + the rendered subdir, if any.
copier/_main.py:1233
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_answersfile_templating.py:14
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_subdirectory.py:16
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_cli.py:22
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_check_update.py:12
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_complex_questions.py:34
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_answersfile.py:19
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_tmpdir.py:12
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_minimum_version.py:19
Functiontemplate_path
(tmp_path_factory: pytest.TempPathFactory)
tests/test_tasks.py:16
Methodtemplates_suffix
Get the suffix defined for templates. By default: `.jinja`. See [templates_suffix][].
copier/_template.py:540
Functiontest_3way_merged_files_without_conflicts_are_not_marked_unmerged
( tmp_path_factory: pytest.TempPathFactory, )
tests/test_updatediff.py:1392
Functiontest_absolute_render_path_outside_destination_raises_error_on_posix
( tmp_path_factory: pytest.TempPathFactory, )
tests/test_copy.py:1389
Functiontest_absolute_render_path_outside_destination_raises_error_on_windows
( tmp_path_factory: pytest.TempPathFactory, )
tests/test_copy.py:1414
Functiontest_additional_jinja2_extensions
(tmp_path: Path)
tests/test_jinja2_extensions.py:47
Functiontest_additional_jinja2_extensions_error
( tmp_path_factory: pytest.TempPathFactory, )
tests/test_jinja2_extensions.py:56
Functiontest_answer_changes
( tmp_path_factory: TempPathFactory, spawn: Spawn, interactive: bool )
tests/test_conditional_file_name.py:64
Functiontest_answer_with_invalid_type
(tmp_path_factory: pytest.TempPathFactory)
tests/test_output.py:76
Functiontest_answersfile
Test copier behaves properly when using an answersfile.
tests/test_answersfile.py:60
Functiontest_answersfile_template_in_subdirectory_is_deprecated
Test that the answers file template in a subdirectory is deprecated. NOTE: The answers file is *not* rendered in the subdirectory but in the loca
tests/test_answersfile.py:205
Functiontest_answersfile_templating
Test copier behaves properly when _answers_file contains a template Checks that template is resolved successfully and that a subsequent
tests/test_answersfile_templating.py:34
Functiontest_answersfile_templating_phase
Ensure `_copier_phase` is available while render `answers_relpath`. Not because it is directly useful, but because some extensions might need
tests/test_answersfile_templating.py:123
Functiontest_answersfile_templating_with_message_before_copy
Test templated `_answers_file` setting with `_message_before_copy`. Checks that the templated answers file name is rendered correctly while h
tests/test_answersfile_templating.py:83
Functiontest_answersfile_with_custom_path
Test specifying the answers file path via template or user setting.
tests/test_answersfile.py:154
Functiontest_api
Test copier correctly processes advanced questions and answers through API.
tests/test_complex_questions.py:137
Functiontest_api
( template_path: str, tmp_path_factory: pytest.TempPathFactory, monkeypatch: pytest.MonkeyPatch, )
tests/test_tmpdir.py:42
Functiontest_api_str_data
Test copier when all data comes as a string. This happens i.e. when using the --data CLI argument.
tests/test_complex_questions.py:272
Functiontest_basic_migration
Test a basic migration running on every version
tests/test_migrations.py:25
Functiontest_binary_file_fallback_to_copy
(tmp_path_factory: pytest.TempPathFactory)
tests/test_empty_suffix.py:39
Functiontest_cast_to_bool_ignores_surrounding_whitespace
( value: str, expected: bool )
tests/test_tools.py:40
Functiontest_cast_to_bool_treats_blank_strings_as_false
(value: str)
tests/test_tools.py:29
Functiontest_check_update_help
(capsys: pytest.CaptureFixture[str])
tests/test_cli.py:518
Functiontest_cleanup
Copier creates dst_path, fails to copy and removes it.
tests/test_cleanup.py:16
Functiontest_cleanup_on_interrupt_during_copy_task
Test cleaning up when copy is interrupted during task.
tests/test_cleanup.py:70
Functiontest_cleanup_on_interrupt_during_git_clone
Test cleaning up when copy is interrupted during git clone.
tests/test_cleanup.py:145
Functiontest_cleanup_on_interrupt_during_update_task
Test cleaning up when update is interrupted during task.
tests/test_cleanup.py:105
Functiontest_cli
( template_path: str, tmp_path_factory: pytest.TempPathFactory, monkeypatch: pytest.MonkeyPatch, )
tests/test_tmpdir.py:71
Functiontest_cli_data_parsed_by_question_type
( tmp_path_factory: pytest.TempPathFactory, type_, answer, expected )
tests/test_cli.py:107
Functiontest_cli_interactive
Test copier correctly processes advanced questions and answers through CLI.
tests/test_complex_questions.py:171
Functiontest_cli_interatively_with_flag_data_and_type_casts
Assert how choices work when copier is invoked with --data interactively.
tests/test_complex_questions.py:310
Functiontest_clone
()
tests/test_vcs.py:82
Functiontest_commit_hash
(tmp_path_factory: pytest.TempPathFactory)
tests/test_copy.py:454
Functiontest_commit_hooks_respected
Commit hooks are taken into account when producing the update diff.
tests/test_updatediff.py:322
Functiontest_conditional_computed_value
(tmp_path_factory: pytest.TempPathFactory)
tests/test_recopy.py:135
Functiontest_conditional_computed_value
(tmp_path_factory: pytest.TempPathFactory)
tests/test_updatediff.py:2104
Functiontest_config_data_empty
()
tests/test_config.py:307
Functiontest_config_data_is_loaded_from_file
()
tests/test_config.py:34
← previousnext →201–300 of 643, ranked by callers