Generator
Project generator - creates projects from configurations.
- class pypreset.generator.ProjectGenerator[source]
Bases:
objectGenerates a project from a configuration.
- Parameters:
config (
ProjectConfig)output_dir (
Path)
- __init__(config, output_dir)[source]
- Parameters:
config (
ProjectConfig)output_dir (
Path)
- Return type:
None
- pypreset.generator.generate_project(config, output_dir, initialize_git=True, install_dependencies=False)[source]
Generate a project from a configuration.
- Parameters:
config (
ProjectConfig) – The project configurationoutput_dir (
Path) – Directory to create the project ininitialize_git (
bool) – Whether to initialize a git repositoryinstall_dependencies (
bool) – Whether to run poetry install
- Return type:
- Returns:
Path to the generated project directory