MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / _make_pyproject

Function _make_pyproject

lib/cli/tests/deploy/test_validate.py:23–49  ·  view source on GitHub ↗
(
    name: str = "my_crew",
    dependencies: Iterable[str] = ("crewai>=1.14.0",),
    *,
    hatchling: bool = False,
    flow: bool = False,
    extra: str = "",
)

Source from the content-addressed store, hash-verified

21
22
23def _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
52def _scaffold_standard_crew(

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected