diff --git a/.github/workflows/auctoriseal-ci.yml b/.github/workflows/auctoriseal-ci.yml index c842cce..881a53a 100644 --- a/.github/workflows/auctoriseal-ci.yml +++ b/.github/workflows/auctoriseal-ci.yml @@ -1,25 +1,58 @@ name: auctoriseal-ci on: + workflow_dispatch: pull_request: push: branches: [ main ] +permissions: + contents: read + jobs: - build_test: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + + - uses: actions/setup-python@v5 with: - node-version: 20 - - name: Build + python-version: "3.11" + + - name: Protocol gates + shell: bash run: | set -euo pipefail - node -v - npm -v || true - npm run build - - name: Test + test -f protocol/protocol.md + test -f protocol/seal.schema.json + test -f protocol/authority.schema.json + test -f protocol/revocation.schema.json + python3 - <<'PY' +import json, pathlib +req = [ + "protocol/seal.schema.json", + "protocol/authority.schema.json", + "protocol/revocation.schema.json", + "protocol/envelope.schema.json", + "protocol/error.schema.json", +] +for p in req: + fp = pathlib.Path(p) + if not fp.exists(): + raise SystemExit(f"E_MISSING_{p}") + json.loads(fp.read_text(encoding="utf-8")) +print("OK: schemas parse") +PY + + - name: Install test deps + shell: bash + run: | + set -euo pipefail + python3 -m pip install --upgrade pip + python3 -m pip install pytest + + - name: Pytest + shell: bash run: | set -euo pipefail - npm run test + python3 -m pytest -q diff --git a/auctoriseal/__init__.py b/auctoriseal/__init__.py new file mode 100644 index 0000000..2a62cf7 --- /dev/null +++ b/auctoriseal/__init__.py @@ -0,0 +1 @@ +# AUCTORISEAL namespace shim for CI import stability. diff --git a/auctoriseal/api/__init__.py b/auctoriseal/api/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/api/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/api/server.py b/auctoriseal/api/server.py new file mode 100644 index 0000000..631a0c0 --- /dev/null +++ b/auctoriseal/api/server.py @@ -0,0 +1 @@ +from ...api.server import * # noqa: F401,F403 diff --git a/auctoriseal/authority/__init__.py b/auctoriseal/authority/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/authority/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/authority/delegation.py b/auctoriseal/authority/delegation.py new file mode 100644 index 0000000..bcfd8d4 --- /dev/null +++ b/auctoriseal/authority/delegation.py @@ -0,0 +1 @@ +from ...authority.delegation import * # noqa: F401,F403 diff --git a/auctoriseal/authority/freeze.py b/auctoriseal/authority/freeze.py new file mode 100644 index 0000000..ac37592 --- /dev/null +++ b/auctoriseal/authority/freeze.py @@ -0,0 +1 @@ +from ...authority.freeze import * # noqa: F401,F403 diff --git a/auctoriseal/authority/modes.py b/auctoriseal/authority/modes.py new file mode 100644 index 0000000..9627254 --- /dev/null +++ b/auctoriseal/authority/modes.py @@ -0,0 +1 @@ +from ...authority.modes import * # noqa: F401,F403 diff --git a/auctoriseal/authority/policy.py b/auctoriseal/authority/policy.py new file mode 100644 index 0000000..cc937a0 --- /dev/null +++ b/auctoriseal/authority/policy.py @@ -0,0 +1 @@ +from ...authority.policy import * # noqa: F401,F403 diff --git a/auctoriseal/cli/__init__.py b/auctoriseal/cli/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/cli/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/cli/inspect_ledger.py b/auctoriseal/cli/inspect_ledger.py new file mode 100644 index 0000000..8bac204 --- /dev/null +++ b/auctoriseal/cli/inspect_ledger.py @@ -0,0 +1 @@ +from ...cli.inspect_ledger import * # noqa: F401,F403 diff --git a/auctoriseal/ledger/__init__.py b/auctoriseal/ledger/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/ledger/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/ledger/integrity.py b/auctoriseal/ledger/integrity.py new file mode 100644 index 0000000..b58c407 --- /dev/null +++ b/auctoriseal/ledger/integrity.py @@ -0,0 +1 @@ +from ...ledger.integrity import * # noqa: F401,F403 diff --git a/auctoriseal/ledger/reader.py b/auctoriseal/ledger/reader.py new file mode 100644 index 0000000..b8f70a5 --- /dev/null +++ b/auctoriseal/ledger/reader.py @@ -0,0 +1 @@ +from ...ledger.reader import * # noqa: F401,F403 diff --git a/auctoriseal/ledger/retention.py b/auctoriseal/ledger/retention.py new file mode 100644 index 0000000..5f9a92d --- /dev/null +++ b/auctoriseal/ledger/retention.py @@ -0,0 +1 @@ +from ...ledger.retention import * # noqa: F401,F403 diff --git a/auctoriseal/ledger/writer.py b/auctoriseal/ledger/writer.py new file mode 100644 index 0000000..ddb407b --- /dev/null +++ b/auctoriseal/ledger/writer.py @@ -0,0 +1 @@ +from ...ledger.writer import * # noqa: F401,F403 diff --git a/auctoriseal/seals/__init__.py b/auctoriseal/seals/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/seals/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/seals/issuer.py b/auctoriseal/seals/issuer.py new file mode 100644 index 0000000..cfe2754 --- /dev/null +++ b/auctoriseal/seals/issuer.py @@ -0,0 +1 @@ +from ...seals.issuer import * # noqa: F401,F403 diff --git a/auctoriseal/seals/revoker.py b/auctoriseal/seals/revoker.py new file mode 100644 index 0000000..dc9785c --- /dev/null +++ b/auctoriseal/seals/revoker.py @@ -0,0 +1 @@ +from ...seals.revoker import * # noqa: F401,F403 diff --git a/auctoriseal/seals/validator.py b/auctoriseal/seals/validator.py new file mode 100644 index 0000000..3583bb5 --- /dev/null +++ b/auctoriseal/seals/validator.py @@ -0,0 +1 @@ +from ...seals.validator import * # noqa: F401,F403 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..68a3a35 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,12 @@ +[project] +name = "auctoriseal" +version = "0.1.0" +requires-python = ">=3.11" +dependencies = [] + +[tool.pytest.ini_options] +addopts = "-q" +testpaths = ["tests"] + +[tool.ruff] +line-length = 100