Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Install the qualified Python pair
run: |
uv venv .dev/docs-host-python
uv pip install --python .dev/docs-host-python/bin/python --only-binary=:all: --refresh morphir==0.1.0 morphir-python==0.1.0
uv pip install --python .dev/docs-host-python/bin/python --only-binary=:all: --refresh morphir==0.1.1 morphir-python==0.1.2
- name: Run displayed recipe, offline bundle checks and MoonBit refusal probes
run: .dev/docs-host-python/bin/python scripts/docs_hosts.py qualify
- uses: actions/upload-artifact@v6
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ The library and CLI are separate distributions:
Install just the library and SDK:

```bash
pip install morphir==0.1.0
# or: uv add morphir==0.1.0
pip install morphir==0.1.1
# or: uv add morphir==0.1.1
```

Install the CLI, which also installs the library:

```bash
python -m pip install --only-binary=:all: morphir-python==0.1.0
# or: uv add morphir-python==0.1.0
python -m pip install --only-binary=:all: morphir-python==0.1.2
# or: uv add morphir-python==0.1.2
```

For an isolated command-line installation, use the
Expand Down
4 changes: 2 additions & 2 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ as well as the version before copying an integration command.

| Tool | Qualified identity | Python compiler route | IR and artifacts |
| --- | --- | --- | --- |
| `morphir-python` | Python distribution 0.1.0, core 0.1.0, native 0.1.1 | In-process typed API and CLI | v3 Library by default; explicit draft v4; versioned JSON |
| `finos/morphir` | Rust product CLI 0.4.0-beta.10 | Python Extism bundle 0.4.2, MEP 0.1 | Explicit v3/v4 JSON; compile writes `morphir-ir.json` |
| `morphir-python` | Python distribution 0.1.2, core 0.1.1, native 0.1.2 | In-process typed API and CLI | v3 Library by default; explicit draft v4; versioned JSON |
| `finos/morphir` | Rust product CLI 0.4.0-beta.10 | Python WASM/process bundle 0.5.0, legacy MEP 0.1 at this host pin | Explicit v3/v4 JSON; compile writes `morphir-ir.json` |
| MoonBit-based `morphir` | Source pin documented in the MoonBit guide | Current `core-wasm-process` and `native-process` adapters do not run the Python Extism guest | Portable MEP 0.2 draft, IR v4 model envelope; Ion default, explicit JSON tuple |

## Verify the provider
Expand Down
12 changes: 6 additions & 6 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ your project's `mise.toml`:
[tools]
python = "3.14"
uv = "0.12.10"
"pypi:morphir-python" = { version = "0.1.0", uvx_args = "--no-build" }
"pypi:morphir-python" = { version = "0.1.2", uvx_args = "--no-build" }
```
<!-- /example -->

Expand Down Expand Up @@ -44,7 +44,7 @@ pipx = "pypi:pipx"
python = "3.14"
uv = "0.12.10"
pipx = { version = "1.18.4", python = "3.14", expose = ["pipx"] }
"pipx:morphir-python" = { version = "0.1.0", python = "3.14", uvx = false, pipx_args = "--pip-args='--only-binary=:all:'" }
"pipx:morphir-python" = { version = "0.1.2", python = "3.14", uvx = false, pipx_args = "--pip-args='--only-binary=:all:'" }
```
<!-- /example -->

Expand Down Expand Up @@ -80,13 +80,13 @@ Choose a package according to what your application needs.
| `morphir-python` | The CLI and `morphir_tools.python` compiler API | `morphir`, Typer and an exact compatible native compiler |
| `morphir-python-native` | Compiler implementation dependency | Installed automatically by `morphir-python` |

The released quickstarts use `morphir-python==0.1.0`, `morphir==0.1.0` and
`morphir-python-native==0.1.1`. The core and CLI have independent versions.
The released quickstarts use `morphir-python==0.1.2`, `morphir==0.1.1` and
`morphir-python-native==0.1.2`. The core and CLI have independent versions.

```bash
python3.14 -m venv .venv
. .venv/bin/activate
python -m pip install --only-binary=:all: morphir==0.1.0 morphir-python==0.1.0
python -m pip install --only-binary=:all: morphir==0.1.1 morphir-python==0.1.2
morphir-python --help
```

Expand All @@ -106,7 +106,7 @@ requires Rust 1.98 or later and is distinct from the wheel-only quickstart.
## Use only the library

```bash
python -m pip install morphir==0.1.0
python -m pip install morphir==0.1.1
```

The [IR and SDK examples](library.md) work without the native compiler. Installing
Expand Down
2 changes: 1 addition & 1 deletion docs/library.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Work with IR and the SDK

**Released:** CPython 3.14 and `morphir==0.1.0`. These examples need neither the
**Released:** CPython 3.14 and `morphir==0.1.1`. These examples need neither the
CLI nor the native compiler. Install only `morphir` as described in
[installation](installation.md#use-only-the-library).

Expand Down
95 changes: 55 additions & 40 deletions docs/python-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,24 @@ available there.
| Language | `python` (`.py`) |
| Target | `python` |
| IR versions | `3`, `4` |
| Published 0.4.2 MEP version | `0.1` |
| Development 0.5.0 MEP versions | `0.2.0-draft.1`, `0.1` |
| Published 0.5.0 MEP versions | `0.2.0-draft.1`, `0.1` |
| Multiple source documents | `multiDocument: true`, from `0.4.2` |

Extension `0.4.2` pairs with `morphir-python==0.1.0` and
`morphir-python-native==0.1.1`, qualified with `morphir==0.1.0`.
The native API reports compiler version `0.4.2`.
Use `0.4.2` or later with hosts that require an explicit multi-document claim;
`0.4.1` omits that claim.
Extension `0.5.0` pairs with `morphir-python==0.1.2` and
`morphir-python-native==0.1.2`, using published Rust SDK `0.4.0`.
The bridge API remains revision `1`; core `morphir==0.1.1` includes the updated
documentation metadata.

Development extension `0.5.0` pairs with `morphir-python==0.1.1` and
`morphir-python-native==0.1.2`, using published Rust SDK `0.4.0`. These Python
and extension versions are candidates, not published installation targets.
The bridge API remains revision `1`; the core `morphir` library remains `0.1.0`.
Historical extension `0.4.2` pairs with `morphir-python==0.1.0`,
`morphir-python-native==0.1.1` and `morphir==0.1.0`; its compiler version is
`0.4.2`. Use `0.4.2` or later with hosts that require an explicit multi-document
claim; `0.4.1` omits that claim.

## Model protocol in the development candidate
## Model protocol in release 0.5.0

Package, protocol, envelope, claims and IR versions identify different contracts:

| Contract | Candidate value |
| Contract | Value |
| --- | --- |
| Compiler / extension package | `0.5.0` |
| Rust extension SDK dependency | exactly `0.4.0` from crates.io |
Expand Down Expand Up @@ -70,10 +68,13 @@ handles requests only, so notification silence and exit describe the adapter and
guest route, not notification delivery inside the WASM guest.

The declaration is in [`rust/extension.toml`](https://github.com/finos/morphir-python/blob/main/rust/extension.toml).
The released host recipe below uses legacy MEP `0.1`. For new-draft protocol
checks, use the [source-pinned MCK](releasing.md#qualify-both-extension-runtimes)
recorded in the release evidence.

## Install the qualified release bundle

This recipe uses **finos/morphir 0.4.0-beta.10** and Python extension **0.4.2**.
This recipe uses **finos/morphir 0.4.0-beta.10** and Python extension **0.5.0**.
Use the Rust product CLI, not the MoonBit executable of the same name. The
[compatibility guide](compatibility.md) explains the difference. CPython is not
needed to run the installed WASM guest.
Expand All @@ -86,14 +87,14 @@ prints the absolute `MORPHIR_HOST` and `PYTHON_BUNDLE` paths. Pins live in
and [rust/extension.toml](https://github.com/finos/morphir-python/blob/main/rust/extension.toml).
Run the printed `--version` command and check it reports 0.4.0-beta.10.

For manual acquisition, download the 0.4.2 `.wasm`, `.wasm.sha256` and `.release.json` assets
from the [extension release](https://github.com/finos/morphir-python/releases/tag/extension/python/v0.4.2).
For manual acquisition, download the 0.5.0 `.wasm`, `.wasm.sha256` and `.release.json` assets
from the [extension release](https://github.com/finos/morphir-python/releases/tag/extension/python/v0.5.0).
Verify the SHA-256 values in the pin file before using them, then rename the
`.release.json` descriptor to `release.json` in the same bundle directory.
The WASM digest is
`10acafa0f0282c5240e9620a5f2bb21629cc7580b9add528e7b77c7e54db22b5`.
`791d6cc60f442b1088b291e9aed4f2740a38b0f0cc920f5f7418735c2b88aeb6`.
The descriptor digest is
`72770f73f05a72535fd8c86ad4629175019037441a758b827c1ba47cc9a52ebd`.
`a78df591623388a95f3f7f8f7465422cee3dd4f6d86a64224d2a02291d8a81b3`.
The host release has platform-specific archives; use the declared target and
hash rather than an unversioned executable from PATH.

Expand All @@ -110,7 +111,7 @@ before compiling. It is the exact recipe run by documentation qualification.
#!/usr/bin/env bash
set -euo pipefail
# MORPHIR_HOST is the verified finos/morphir 0.4.0-beta.10 executable.
# PYTHON_BUNDLE is the verified 0.4.2 bundle directory containing release.json.
# PYTHON_BUNDLE is the verified 0.5.0 bundle directory containing release.json.
: "${MORPHIR_HOST:?Set the verified Rust-host executable path}"
: "${PYTHON_BUNDLE:?Set the verified bundle directory}"
"$MORPHIR_HOST" --version
Expand Down Expand Up @@ -150,11 +151,11 @@ Use `python3 scripts/docs_hosts.py qualify` to repeat the displayed workflow and
offline checks. Receipts record pins, file hashes, host identity, checker and
input digest. Download failure never counts as a passing qualification.

## Choose a runtime in development
## Download and choose a runtime

Published bundles remain WASM. The process bundle is a development candidate
from the manual release-qualification workflow, not a published installation
channel yet. Its executable is a MEP guest for the finos/morphir host. The
Release `0.5.0` provides both WASM and process bundles on
[GitHub Releases](https://github.com/finos/morphir-python/releases/tag/extension/python/v0.5.0).
The process executable is a MEP guest for the finos/morphir host. The
`morphir-python` CLI continues to use its pinned native Python wheel through the
[mise/pipx installation](python-compiler.md); choosing an extension runtime does
not configure that CLI.
Expand All @@ -163,36 +164,50 @@ Use two separate canonical bundle directories and named local repositories.
The WASM bundle contains its `.wasm`, checksum and `release.json`. The process
bundle contains the raw executables, their checksums and its own `release.json`.
The canonical repository writer refuses a bundle mixing both runtimes.
The process candidate includes Linux x86_64/ARM64, macOS x86_64/ARM64 and Windows
The process bundle includes Linux x86_64/ARM64, macOS x86_64/ARM64 and Windows
x86_64. Installation chooses the matching platform and refuses an absent one.

The `process-release-candidate` workflow artifact also retains `process-assets/`:
five raw executables and checksums, a separately named process descriptor,
`morphir-python-extension-VERSION.tar.gz`, a source-bound packaging receipt and
`SHA256SUMS`. The archive contains the complete canonical process bundle, with
`release.json` and executable permissions. Its payloads match the raw assets.
These are development candidates. GitHub release publication requires matching
independent conformance evidence and the approved release tag.
The release includes five raw executables and checksums, a separately named
process descriptor, `morphir-python-extension-VERSION.tar.gz`, source-bound
qualification receipts and `SHA256SUMS`. The archive contains the complete
canonical process bundle, with `release.json` and executable permissions. Its
payloads match the raw assets. Raw MCK reports, their saved rechecks, runtime
switching evidence and host timing samples are retained alongside the bundles.

After downloading the candidate, verify and extract it in Bash:
With the [GitHub CLI](https://cli.github.com/) installed, run this in a fresh
directory using Bash, `shasum` and `tar`. Download all assets before checking
`SHA256SUMS`; it covers the qualification evidence as well as the bundles.

<!-- example: examples/install/extension-bundles.sh -->
```bash
cd process-assets
shasum -a 256 -c SHA256SUMS
mkdir ../python-process
tar -xzf morphir-python-extension-*.tar.gz -C ../python-process
export PROCESS_BUNDLE="$(cd ../python-process && pwd)"
#!/usr/bin/env bash
set -euo pipefail
VERSION=0.5.0
gh release download "extension/python/v$VERSION" \
--repo finos/morphir-python --dir python-extension-assets
(cd python-extension-assets && shasum -a 256 -c SHA256SUMS)
mkdir python-wasm python-process
cp "python-extension-assets/morphir-python-binding-$VERSION.wasm" \
"python-extension-assets/morphir-python-binding-$VERSION.wasm.sha256" python-wasm/
cp "python-extension-assets/morphir-python-binding-$VERSION.release.json" \
python-wasm/release.json
tar -xzf "python-extension-assets/morphir-python-extension-$VERSION.tar.gz" \
-C python-process
export WASM_BUNDLE="$(cd python-wasm && pwd)"
export PROCESS_BUNDLE="$(cd python-process && pwd)"
```
<!-- /example -->

The qualification workflow runs the installation and runtime-switching checks
against this extracted archive. Its original WASM bundle remains separate.
The qualification workflow runs installation and runtime-switching checks
against this extracted archive. Both directories above contain version `0.5.0`.
Historical `0.4.2` bundles remain available from their original release.

Set `WASM_BUNDLE` and `PROCESS_BUNDLE` to those unmodified directories. With
`MORPHIR_HOST` pointing at the pinned host described above, an isolated trial is:

```bash
export MORPHIR_HOME="$(mktemp -d)"
VERSION=0.5.0 # Current development candidate version from release.json.
VERSION=0.5.0
"$MORPHIR_HOST" extension repository init ./wasm-repository
"$MORPHIR_HOST" extension repository init ./process-repository
"$MORPHIR_HOST" extension repository add python-wasm --directory ./wasm-repository
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A Python model round trip

**Released:** CPython 3.14, `morphir-python==0.1.0`, `morphir==0.1.0`, native
compiler `0.1.1`. Follow [installation](installation.md) first. This recipe uses
**Released:** CPython 3.14, `morphir-python==0.1.2`, `morphir==0.1.1`, native
compiler `0.1.2`. Follow [installation](installation.md) first. This recipe uses
a POSIX shell such as Bash. The CLI commands themselves also work on Windows;
create the same source files in your editor there.

Expand Down
4 changes: 3 additions & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ published package with the same version for the candidate.

Native releases and manual release qualification cover Linux x86_64/aarch64,
macOS arm64/x86_64 and Windows x86_64. A CLI release also runs these platforms,
using its pinned published native wheels instead of rebuilding Rust. Every
using its pinned published native wheels. Every
selected platform must pass before the CLI publishes. The reused Linux wheel
already passes the same installer checks in the qualification workflow.
The shared CI qualification still checks a fresh Linux source build; the
per-platform CLI installation checks use the published native wheels.

Each installer has separate temporary mise configuration, state, cache and
package environments outside the checkout. Tests check installed versions,
Expand Down
2 changes: 1 addition & 1 deletion examples/extension.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
# MORPHIR_HOST is the verified finos/morphir 0.4.0-beta.10 executable.
# PYTHON_BUNDLE is the verified 0.4.2 bundle directory containing release.json.
# PYTHON_BUNDLE is the verified 0.5.0 bundle directory containing release.json.
: "${MORPHIR_HOST:?Set the verified Rust-host executable path}"
: "${PYTHON_BUNDLE:?Set the verified bundle directory}"
"$MORPHIR_HOST" --version
Expand Down
15 changes: 15 additions & 0 deletions examples/install/extension-bundles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
VERSION=0.5.0
gh release download "extension/python/v$VERSION" \
--repo finos/morphir-python --dir python-extension-assets
(cd python-extension-assets && shasum -a 256 -c SHA256SUMS)
mkdir python-wasm python-process
cp "python-extension-assets/morphir-python-binding-$VERSION.wasm" \
"python-extension-assets/morphir-python-binding-$VERSION.wasm.sha256" python-wasm/
cp "python-extension-assets/morphir-python-binding-$VERSION.release.json" \
python-wasm/release.json
tar -xzf "python-extension-assets/morphir-python-extension-$VERSION.tar.gz" \
-C python-process
export WASM_BUNDLE="$(cd python-wasm && pwd)"
export PROCESS_BUNDLE="$(cd python-process && pwd)"
2 changes: 1 addition & 1 deletion examples/install/mise-pipx.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pipx = "pypi:pipx"
python = "3.14"
uv = "0.12.10"
pipx = { version = "1.18.4", python = "3.14", expose = ["pipx"] }
"pipx:morphir-python" = { version = "0.1.0", python = "3.14", uvx = false, pipx_args = "--pip-args='--only-binary=:all:'" }
"pipx:morphir-python" = { version = "0.1.2", python = "3.14", uvx = false, pipx_args = "--pip-args='--only-binary=:all:'" }
2 changes: 1 addition & 1 deletion examples/install/mise-uv.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[tools]
python = "3.14"
uv = "0.12.10"
"pypi:morphir-python" = { version = "0.1.0", uvx_args = "--no-build" }
"pypi:morphir-python" = { version = "0.1.2", uvx_args = "--no-build" }
6 changes: 3 additions & 3 deletions examples/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"schema_version": 1,
"python": "3.14",
"released": {
"morphir": "0.1.0",
"morphir-python": "0.1.0",
"morphir-python-native": "0.1.1"
"morphir": "0.1.1",
"morphir-python": "0.1.2",
"morphir-python-native": "0.1.2"
},
"examples": [
{
Expand Down
Loading
Loading