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

Function _make_pyproject

lib/cli/tests/deploy/test_validate.py:29–55  ·  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

27
28
29def _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
58def _scaffold_standard_crew(

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected