(
name: str = "my_crew",
dependencies: Iterable[str] = ("crewai>=1.14.0",),
*,
hatchling: bool = False,
flow: bool = False,
extra: str = "",
)
| 27 | |
| 28 | |
| 29 | def _make_pyproject( |
| 30 | name: str = "my_crew", |
| 31 | dependencies: Iterable[str] = ("crewai>=1.14.0",), |
| 32 | *, |
| 33 | hatchling: bool = False, |
| 34 | flow: bool = False, |
| 35 | extra: str = "", |
| 36 | ) -> str: |
| 37 | deps = ", ".join(f'"{d}"' for d in dependencies) |
| 38 | lines = [ |
| 39 | "[project]", |
| 40 | f'name = "{name}"', |
| 41 | 'version = "0.1.0"', |
| 42 | f"dependencies = [{deps}]", |
| 43 | ] |
| 44 | if hatchling: |
| 45 | lines += [ |
| 46 | "", |
| 47 | "[build-system]", |
| 48 | 'requires = ["hatchling"]', |
| 49 | 'build-backend = "hatchling.build"', |
| 50 | ] |
| 51 | if flow: |
| 52 | lines += ["", "[tool.crewai]", 'type = "flow"'] |
| 53 | if extra: |
| 54 | lines += ["", extra] |
| 55 | return "\n".join(lines) + "\n" |
| 56 | |
| 57 | |
| 58 | def _scaffold_standard_crew( |
no test coverage detected