refactor(P21): rename acdl_platform/ -> core/ (REQ-53)
---ci--- project: acdl phase: 21 milestone: v1.6 status: execute ---/ci--- Rename the acdl_platform/ package to core/ across the directory, all imports in tests/scripts/pipelines/workflows, and doc references. The package is imported as core.confidence_signal / core.contract_resolver / core.outbox_writer. The deploy workflow's platform-repo checkout dir is renamed acdl-platform/ -> platform/ (workspace path, not the python package). Both .gitea + .github workflows stay byte-identical. Note: the original target name 'platform/' shadows Python's stdlib platform module (pytest's import uuid -> platform.system() fails when the repo root is on sys.path, which every test does). 'core/' avoids the clash while honoring the intent (drop the verbose acdl_platform). Tests: 154 pass. run_ci.sh green.
This commit is contained in:
@@ -25,7 +25,7 @@ class TestContractSchema:
|
||||
|
||||
class TestResolveStaticAsset:
|
||||
def test_resolve_static_asset_contract(self, tmp_path):
|
||||
from acdl_platform.contract_resolver import resolve
|
||||
from core.contract_resolver import resolve
|
||||
stack = resolve(str(ROOT / "contracts/static-asset.yaml"), str(ROOT))
|
||||
assert stack["stack"]["name"] == "static-asset"
|
||||
assert stack["stack"]["kind"] == "l2"
|
||||
@@ -33,7 +33,7 @@ class TestResolveStaticAsset:
|
||||
assert len(stack["resources"]) >= 1
|
||||
|
||||
def test_resolve_static_asset_has_s3_resource(self):
|
||||
from acdl_platform.contract_resolver import resolve
|
||||
from core.contract_resolver import resolve
|
||||
stack = resolve(str(ROOT / "contracts/static-asset.yaml"), str(ROOT))
|
||||
s3_res = [r for r in stack["resources"] if r["type"] == "aws:s3:bucket"]
|
||||
assert len(s3_res) == 1
|
||||
@@ -41,7 +41,7 @@ class TestResolveStaticAsset:
|
||||
assert s3_res[0]["inputs"]["region"] == "us-east-1"
|
||||
|
||||
def test_resolve_static_asset_validates_against_stack_schema(self):
|
||||
from acdl_platform.contract_resolver import resolve
|
||||
from core.contract_resolver import resolve
|
||||
stack = resolve(str(ROOT / "contracts/static-asset.yaml"), str(ROOT))
|
||||
schema = json.load(open(ROOT / "schemas/stack.schema.json"))
|
||||
jsonschema.validate(stack, schema)
|
||||
@@ -63,7 +63,7 @@ class TestResolveMicroservice:
|
||||
with open(contract_path, "w") as fh:
|
||||
yaml.dump(contract, fh)
|
||||
try:
|
||||
from acdl_platform.contract_resolver import resolve
|
||||
from core.contract_resolver import resolve
|
||||
stack = resolve(str(contract_path), str(ROOT))
|
||||
assert stack["stack"]["name"] == "microservice"
|
||||
assert stack["stack"]["kind"] == "l2"
|
||||
@@ -86,7 +86,7 @@ class TestResolveL1Direct:
|
||||
contract_path = tmp_path / "test-s3.yaml"
|
||||
with open(contract_path, "w") as fh:
|
||||
yaml.dump(contract, fh)
|
||||
from acdl_platform.contract_resolver import resolve
|
||||
from core.contract_resolver import resolve
|
||||
stack = resolve(str(contract_path), str(ROOT))
|
||||
assert stack["stack"]["name"] == "s3"
|
||||
assert stack["stack"]["kind"] == "l1"
|
||||
@@ -104,7 +104,7 @@ class TestResolveL1Direct:
|
||||
contract_path = tmp_path / "test-s3-schema.yaml"
|
||||
with open(contract_path, "w") as fh:
|
||||
yaml.dump(contract, fh)
|
||||
from acdl_platform.contract_resolver import resolve
|
||||
from core.contract_resolver import resolve
|
||||
stack = resolve(str(contract_path), str(ROOT))
|
||||
schema = json.load(open(ROOT / "schemas/stack.schema.json"))
|
||||
jsonschema.validate(stack, schema)
|
||||
@@ -121,7 +121,7 @@ class TestResolveErrors:
|
||||
contract_path = tmp_path / "bad.yaml"
|
||||
with open(contract_path, "w") as fh:
|
||||
yaml.dump(contract, fh)
|
||||
from acdl_platform.contract_resolver import resolve
|
||||
from core.contract_resolver import resolve
|
||||
with pytest.raises(ValueError, match="not found in registry"):
|
||||
resolve(str(contract_path), str(ROOT))
|
||||
|
||||
@@ -130,7 +130,7 @@ class TestResolveErrors:
|
||||
contract_path = tmp_path / "incomplete.yaml"
|
||||
with open(contract_path, "w") as fh:
|
||||
yaml.dump(contract, fh)
|
||||
from acdl_platform.contract_resolver import resolve
|
||||
from core.contract_resolver import resolve
|
||||
with pytest.raises(jsonschema.ValidationError):
|
||||
resolve(str(contract_path), str(ROOT))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user