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
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<p align="center">Your trained model, schema and verified structure. One file.</p>

<p align="center">
<a href="./landing/"><img src="https://img.shields.io/badge/website-303039?style=flat&amp;logo=astro&amp;logoColor=ff6a1a" alt="Website source" /></a>
<a href="./docs/"><img src="https://img.shields.io/badge/docs-303039?style=flat&amp;logo=readthedocs&amp;logoColor=ff6a1a" alt="Documentation" /></a>
<a href="./playground/"><img src="https://img.shields.io/badge/playground-303039?style=flat&amp;logo=stackblitz&amp;logoColor=ff6a1a" alt="Playground" /></a>
<a href="https://mlbundle.eshkra.dev"><img src="https://img.shields.io/badge/website-303039?style=flat&amp;logo=astro&amp;logoColor=ff6a1a" alt="Website" /></a>
<a href="https://docs.mlbundle.eshkra.dev"><img src="https://img.shields.io/badge/docs-303039?style=flat&amp;logo=readthedocs&amp;logoColor=ff6a1a" alt="Documentation" /></a>
<a href="https://playground.mlbundle.eshkra.dev"><img src="https://img.shields.io/badge/playground-303039?style=flat&amp;logo=stackblitz&amp;logoColor=ff6a1a" alt="Playground" /></a>
<a href="https://pypi.org/project/mlbundle/"><img src="https://img.shields.io/badge/version-0.2.0-b73d00?style=flat&amp;logo=pypi&amp;logoColor=white&amp;labelColor=303039" alt="Version 0.2.0" /></a>
<a href="https://github.com/UlloaSP/mlbundle"><img src="https://img.shields.io/badge/source-303039?style=flat&amp;logo=github&amp;logoColor=white" alt="Source on GitHub" /></a>
<a href="https://github.com/UlloaSP/mlbundle/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/UlloaSP/mlbundle/ci.yml?branch=main&amp;style=flat&amp;label=CI&amp;labelColor=303039" alt="CI status" /></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-b73d00?style=flat&amp;labelColor=303039" alt="MIT license" /></a>
<a href="https://github.com/UlloaSP/mlbundle/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-b73d00?style=flat&amp;labelColor=303039" alt="MIT license" /></a>
<a href="https://eshkra.dev"><img src="https://img.shields.io/badge/part_of-eshkra-b73d00?style=flat&amp;labelColor=303039" alt="Part of eshkra" /></a>
</p>

Expand Down Expand Up @@ -142,7 +142,7 @@ or training history.
Custom types fail at export. Sklearn and CatBoost own their class labels;
XGBoost can bind declared labels to a native copy. ONNX has no visualization
structure, and all-sklearn Pipeline structure is null. The
[adapter contracts](./docs/format-adapters.md) define the exact support limits.
[adapter contracts](https://docs.mlbundle.eshkra.dev/format/adapters/) define the exact support limits.

## Some notes

Expand All @@ -153,7 +153,7 @@ independent review; do not accept bundles from untrusted parties.
The reader bounds ZIP/JSON data, verifies integrity and uses closed native loaders.
Hashes detect corruption, not deliberate tampering. Native parsers and inference
still need process isolation and application-owned resource limits.
Read [SECURITY.md](./SECURITY.md) for guarantees, limits and private reporting.
Read [SECURITY.md](https://docs.mlbundle.eshkra.dev/security/) for guarantees, limits and private reporting.

Training rows stay local by default, but feature names, categories, labels and
learned structure can reveal information. Schemas and environment records remain
Expand All @@ -162,17 +162,18 @@ the library's scope.

## Documentation

The [documentation site](./docs/) includes installation, adapter guides, record
prediction and API reference. The normative contracts remain in this repository:
The [documentation site](https://docs.mlbundle.eshkra.dev) includes installation, adapter guides, record
prediction and API reference. It renders the normative contracts from this
repository unchanged:

- [Bundle format and verification](./docs/format.md)
- [Schema, mappings and explicit samples](./docs/format-schema.md)
- [Supported adapters and structure](./docs/format-adapters.md)
- [Sklearn state and trusted types](./docs/format-state.md)
- [Composite pipelines](./docs/format-pipeline.md)
- [ONNX layouts and bounds](./docs/format-onnx.md)
- [Bundle format and verification](https://docs.mlbundle.eshkra.dev/format/)
- [Schema, mappings and explicit samples](https://docs.mlbundle.eshkra.dev/format/schema/)
- [Supported adapters and structure](https://docs.mlbundle.eshkra.dev/format/adapters/)
- [Sklearn state and trusted types](https://docs.mlbundle.eshkra.dev/format/state/)
- [Composite pipelines](https://docs.mlbundle.eshkra.dev/format/pipeline/)
- [ONNX layouts and bounds](https://docs.mlbundle.eshkra.dev/format/onnx/)

The [playground](./playground/) provides editable examples and inspection of the
The [playground](https://playground.mlbundle.eshkra.dev) provides editable examples and inspection of the
generated `.mlbundle` file. It runs scikit-learn examples in the browser and
inspects uploaded files without loading their models.

Expand All @@ -192,8 +193,8 @@ uv build
```

Tests use the installed package and enforce 80% branch-inclusive coverage.
CI validates the built wheel on Windows and Linux. Read [AGENTS.md](./AGENTS.md)
for contribution rules and [publishing](./docs/publishing.md) for the owner-approved
CI validates the built wheel on Windows and Linux. Read [AGENTS.md](https://github.com/UlloaSP/mlbundle/blob/main/AGENTS.md)
for contribution rules and [publishing](https://github.com/UlloaSP/mlbundle/blob/main/docs/publishing.md) for the automatic
release workflow.

The landing, docs and playground use [Vite+](https://viteplus.dev/guide/) and a
Expand All @@ -218,7 +219,7 @@ After all checks pass on `main`, it deploys the three tested site builds to
Cloudflare. Manual **CI Pipeline** runs on `main` use the same gates and can
redeploy without publishing Python. A change to `project.version` on `main`
automatically starts the PyPI workflow after its version and branch preflight.
See [website deployment](./docs/deployment.md) and [publishing](./docs/publishing.md).
See [website deployment](https://github.com/UlloaSP/mlbundle/blob/main/docs/deployment.md) and [publishing](https://github.com/UlloaSP/mlbundle/blob/main/docs/publishing.md).

## License

Expand Down
13 changes: 12 additions & 1 deletion tests/test_readme.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Execute the README quick start and its mlbundle CLI commands."""
"""Execute the README quick start and check the links PyPI renders."""

import re
import shlex
Expand All @@ -13,6 +13,17 @@
r"```(\w+)\n(.*?)\n```", README.read_text(encoding="utf-8"), re.DOTALL
)
PYTHON = [code for language, code in BLOCKS if language == "python"]
LINKS = re.findall(
r"\]\(([^)\s]+)\)|(?:href|src|srcset)=\"([^\"]+)\"",
README.read_text(encoding="utf-8"),
)


def test_links_are_absolute():
# PyPI renders the README without the repository, so relative links break.
targets = [markdown or html for markdown, html in LINKS]
assert targets
assert [url for url in targets if not url.startswith("https://")] == []


@pytest.mark.parametrize("code", PYTHON)
Expand Down
Loading