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