MCPcopy
hub / github.com/reflex-dev/reflex / Package

Class Package

scripts/check_min_deps.py:118–149  ·  view source on GitHub ↗

A workspace package that can be checked against its minimum dependencies.

Source from the content-addressed store, hash-verified

116
117@dataclass(frozen=True)
118class Package:
119 """A workspace package that can be checked against its minimum dependencies."""
120
121 name: str
122 """The package directory name (e.g. ``reflex-base``), used as the CLI identifier."""
123
124 project_dir: Path
125 """Directory containing the package's ``pyproject.toml`` (the editable install target)."""
126
127 source_dir: Path
128 """Directory of importable source that pyright should type-check."""
129
130 extras: tuple[str, ...]
131 """Names of optional-dependency groups to install alongside the package."""
132
133 local_dev_sources: tuple[Path, ...] = ()
134 """Project dirs of sibling workspace packages this package pins to a ``*.dev`` release.
135
136 These are installed editable from the local checkout (rather than PyPI) in both
137 resolutions, because the pinned development version is not published.
138 """
139
140 def install_target(self) -> str:
141 """Build the editable install target, including any extras.
142
143 Returns:
144 The path passed to ``uv pip install -e``, with ``[extra,...]`` appended.
145 """
146 target = str(self.project_dir)
147 if self.extras:
148 target += "[" + ",".join(self.extras) + "]"
149 return target
150
151
152def _load_pyproject(path: Path) -> dict:

Callers 1

discover_packagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected