fix(packaging): remove the memory-service integration this CLI reintroduced #12
+2
-1
@@ -95,7 +95,7 @@ skip-excluded-dirs = true
|
|||||||
path = "hatch_build.py"
|
path = "hatch_build.py"
|
||||||
|
|
||||||
[tool.hatch.build.targets.wheel]
|
[tool.hatch.build.targets.wheel]
|
||||||
packages = ["synapse", "nexusos_cli"]
|
packages = ["synapse", "nexusos_cli", "modules"]
|
||||||
|
|
||||||
[tool.hatch.build.targets.wheel.force-include]
|
[tool.hatch.build.targets.wheel.force-include]
|
||||||
"VERSION" = "synapse/_resources/VERSION"
|
"VERSION" = "synapse/_resources/VERSION"
|
||||||
@@ -112,6 +112,7 @@ include = [
|
|||||||
"/data/playbooks",
|
"/data/playbooks",
|
||||||
"/docs",
|
"/docs",
|
||||||
"/management",
|
"/management",
|
||||||
|
"/modules",
|
||||||
"/nexusos_cli",
|
"/nexusos_cli",
|
||||||
"/scripts",
|
"/scripts",
|
||||||
"/synapse",
|
"/synapse",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from pathlib import Path
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parents[1]
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
SHIPPED_PACKAGES = ("synapse", "nexusos_cli")
|
SHIPPED_PACKAGES = ("synapse", "nexusos_cli", "modules")
|
||||||
|
|
||||||
# Import name -> distribution name, where PyPI disagrees with the module.
|
# Import name -> distribution name, where PyPI disagrees with the module.
|
||||||
DISTRIBUTION_OF = {
|
DISTRIBUTION_OF = {
|
||||||
@@ -32,7 +32,7 @@ DISTRIBUTION_OF = {
|
|||||||
TRANSITIVE = {"starlette", "socketio", "engineio"}
|
TRANSITIVE = {"starlette", "socketio", "engineio"}
|
||||||
|
|
||||||
# Modules that ship inside this repo.
|
# Modules that ship inside this repo.
|
||||||
FIRST_PARTY = {"synapse", "nexusos_cli", "management", "bin", "tests"}
|
FIRST_PARTY = {"synapse", "nexusos_cli", "modules", "management", "bin", "tests"}
|
||||||
|
|
||||||
|
|
||||||
def _pyproject() -> dict:
|
def _pyproject() -> dict:
|
||||||
@@ -55,6 +55,12 @@ def _declared() -> set[str]:
|
|||||||
return {_requirement_name(s) for s in specs}
|
return {_requirement_name(s) for s in specs}
|
||||||
|
|
||||||
|
|
||||||
|
def test_wheel_includes_every_shipped_package():
|
||||||
|
wheel = _pyproject()["tool"]["hatch"]["build"]["targets"]["wheel"]
|
||||||
|
configured = set(wheel["packages"])
|
||||||
|
assert configured == set(SHIPPED_PACKAGES)
|
||||||
|
|
||||||
|
|
||||||
def _imported_modules() -> set[str]:
|
def _imported_modules() -> set[str]:
|
||||||
"""Top-level module names imported anywhere in the shipped packages."""
|
"""Top-level module names imported anywhere in the shipped packages."""
|
||||||
found: set[str] = set()
|
found: set[str] = set()
|
||||||
@@ -88,7 +94,7 @@ def test_every_third_party_import_is_a_declared_dependency():
|
|||||||
if DISTRIBUTION_OF.get(module, module).lower().replace("_", "-") not in declared
|
if DISTRIBUTION_OF.get(module, module).lower().replace("_", "-") not in declared
|
||||||
)
|
)
|
||||||
assert not missing, (
|
assert not missing, (
|
||||||
"synapse/nexusos_cli import these, but pyproject.toml declares no "
|
"a shipped package imports these, but pyproject.toml declares no "
|
||||||
f"distribution for them: {missing}. Add them to [project] dependencies "
|
f"distribution for them: {missing}. Add them to [project] dependencies "
|
||||||
"or an extra (and to DISTRIBUTION_OF here if the names differ)."
|
"or an extra (and to DISTRIBUTION_OF here if the names differ)."
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user