diff --git a/README.md b/README.md index 05065a7..a16d0a1 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@

Your trained model, schema and verified structure. One file.

- Website source - Documentation - Playground + Website + Documentation + Playground Version 0.2.0 Source on GitHub CI status - MIT license + MIT license Part of eshkra

@@ -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 @@ -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 @@ -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. @@ -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 @@ -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 diff --git a/tests/test_readme.py b/tests/test_readme.py index 1f38482..011f512 100644 --- a/tests/test_readme.py +++ b/tests/test_readme.py @@ -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 @@ -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)