flexlate_dev package¶
Development tools for template authors using Flexlate
Subpackages¶
Submodules¶
flexlate_dev.cli module¶
- flexlate_dev.cli.publish(out_path=<typer.models.ArgumentInfo object>, run_config=<typer.models.ArgumentInfo object>, template_path=<typer.models.OptionInfo object>, config_path=<typer.models.OptionInfo object>, no_input=<typer.models.OptionInfo object>, save=<typer.models.OptionInfo object>, data=<typer.models.OptionInfo object>, folder_name=<typer.models.OptionInfo object>)[source]¶
Sync rendered output of a template
- flexlate_dev.cli.publish_all(out_path=<typer.models.ArgumentInfo object>, template_path=<typer.models.OptionInfo object>, config_path=<typer.models.OptionInfo object>, always_include_default=<typer.models.OptionInfo object>, exclude=<typer.models.OptionInfo object>, no_input=<typer.models.OptionInfo object>, save=<typer.models.OptionInfo object>, data=<typer.models.OptionInfo object>)[source]¶
Sync rendered output of a template for all run configurations in the config file
- flexlate_dev.cli.serve(run_config=<typer.models.ArgumentInfo object>, out_path=<typer.models.OptionInfo object>, back_sync=<typer.models.OptionInfo object>, template_path=<typer.models.OptionInfo object>, no_input=<typer.models.OptionInfo object>, no_auto_commit=<typer.models.OptionInfo object>, config_path=<typer.models.OptionInfo object>, save=<typer.models.OptionInfo object>, data=<typer.models.OptionInfo object>, folder_name=<typer.models.OptionInfo object>)[source]¶
Run a development server with auto-reloading to see rendered output of a template
flexlate_dev.cli_validators module¶
flexlate_dev.command_runner module¶
flexlate_dev.config module¶
- class flexlate_dev.config.FlexlateDevConfig(_env_file='<object object>', _env_file_encoding=None, _env_nested_delimiter=None, _secrets_dir=None, **values)[source]¶
Bases:
BaseConfig
Flexlate Dev configuration.
- commands: List[UserCommand]¶
- data: Dict[str, UserDataConfiguration]¶
- run_configs: Dict[str, UserRootRunConfiguration]¶
- class flexlate_dev.config.FullRunConfiguration(config, data)[source]¶
Bases:
object
- __init__(config, data)¶
- config: RunConfiguration¶
- data: Optional[DataConfiguration]¶
- class flexlate_dev.config.UserDataConfiguration(**data)[source]¶
Bases:
DataConfiguration
flexlate_dev.config_schema module¶
flexlate_dev.dict_merge module¶
flexlate_dev.dirutils module¶
flexlate_dev.exc module¶
- exception flexlate_dev.exc.NoSuchCommandException[source]¶
Bases:
UserInputException
- exception flexlate_dev.exc.NoSuchDataException[source]¶
Bases:
UserInputException
- exception flexlate_dev.exc.NoSuchRunConfigurationException[source]¶
Bases:
UserInputException
- exception flexlate_dev.exc.UserInputException[source]¶
Bases:
FlexlateDevException
flexlate_dev.ext_flexlate module¶
- flexlate_dev.ext_flexlate.get_flexlate_branch_names_from_project_path(project_path)[source]¶
- Return type:
- flexlate_dev.ext_flexlate.get_non_flexlate_commits_between_commits(repo, start, end, merged_branch_name, template_branch_name)[source]¶
- Return type:
List
[Commit
]
flexlate_dev.ext_subprocess module¶
flexlate_dev.ext_threading module¶
- class flexlate_dev.ext_threading.PropagatingThread(group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None)[source]¶
Bases:
Thread
- join(timeout=None)[source]¶
Wait until the thread terminates.
This blocks the calling thread until the thread whose join() method is called terminates – either normally or through an unhandled exception or until the optional timeout occurs.
When the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). As join() always returns None, you must call is_alive() after join() to decide whether a timeout happened – if the thread is still alive, the join() call timed out.
When the timeout argument is not present or None, the operation will block until the thread terminates.
A thread can be join()ed many times.
join() raises a RuntimeError if an attempt is made to join the current thread as that would cause a deadlock. It is also an error to join() a thread before it has been started and attempts to do so raises the same exception.
- run()[source]¶
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
flexlate_dev.external_command_type module¶
flexlate_dev.get_version module¶
flexlate_dev.gitutils module¶
- flexlate_dev.gitutils.create_branch_from_commits_get_new_shas(repo, branch_name, base_commit, commits)[source]¶
flexlate_dev.ignore module¶
flexlate_dev.logger module¶
flexlate_dev.project_ops module¶
- flexlate_dev.project_ops.initialize_project_get_folder(template_path, out_root, config, run_config, jinja_env, no_input=False, data=None, save=True, default_folder_name='project')[source]¶
- Return type:
flexlate_dev.publish module¶
flexlate_dev.render module¶
flexlate_dev.styles module¶
flexlate_dev.user_command module¶
flexlate_dev.user_runner module¶
Handles resolving commands referenced by id so that the command_runner module can focus on only running a sequence of commands. Also has context of the different configuration hooks so that the command_runner module can be focused on just running commands.
- class flexlate_dev.user_runner.CommandContext(**data)[source]¶
Bases:
BaseModel
Represents the context of a command that will be provided for the user to use in templated commands
- classmethod create(template_root, out_root, no_input, save, abort_on_conflict=None, auto_commit=None)[source]¶
- options: OptionsContext¶
- paths: PathsContext¶
- class flexlate_dev.user_runner.RunnerHookType(value)[source]¶
-
An enumeration.
- POST_INIT = 'post_init'¶
- POST_UPDATE = 'post_update'¶
- PRE_CHECK = 'pre_check'¶
- PRE_UPDATE = 'pre_update'¶
- class flexlate_dev.user_runner.UserRootRunConfiguration(**data)[source]¶
Bases:
UserRunConfiguration
- publish: Optional[UserRunConfiguration]¶
- serve: Optional[UserRunConfiguration]¶
- class flexlate_dev.user_runner.UserRunConfiguration(**data)[source]¶
Bases:
RunConfiguration