diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1f3cf..7036ef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +[Home](README.md) + All notable changes to this project will be documented in this file. This file is intended to be generated and updated with `git-cliff`. diff --git a/README.md b/README.md index 9de24c6..72aa29d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # nicegui-builder +[Home](README.md) + [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Python 3.10+](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue.svg)](pyproject.toml) [![CI](https://github.com/onclefranck/nicegui-builder/actions/workflows/ci.yml/badge.svg)](https://github.com/onclefranck/nicegui-builder/actions/workflows/ci.yml) @@ -8,6 +10,11 @@ `nicegui-builder` is a Python library for building NiceGUI interfaces from declarative layouts and schema-aware plugins. +> [!WARNING] +> This is an early pre-release published to invite discovery and feedback. +> The project is not presented as production-ready or fully stabilized yet. +> Expect API changes, rough edges, and evolving behavior while the library is still taking shape. + It currently provides three main entry points: - `builder(layout)` for declarative NiceGUI rendering @@ -37,7 +44,7 @@ nicegui-builder --help ## Stable API Top-level imports from `nicegui_builder` are the supported stable public API. -See `docs/public-api.md` for the current stable surface. +See [`docs/public-api.md`](docs/public-api.md) for the current stable surface. ## Quick Start @@ -319,7 +326,7 @@ The `pydantic` plugin resolves `field__...` nodes using: - field type - field constraints and metadata -- plugin-local widget mapping in `src/nicegui_builder/plugins/pydantic/pydantic-nicegui.yml` +- plugin-local widget mapping in [`src/nicegui_builder/plugins/pydantic/pydantic-nicegui.yml`](src/nicegui_builder/plugins/pydantic/pydantic-nicegui.yml) Example: @@ -351,8 +358,8 @@ Example: ## More Docs -- `docs/public-api.md`: stable public API -- `docs/plugin.md`: how to build a new plugin -- `docs/architecture.md`: architecture and class diagram -- `docs/publishing.md`: TestPyPI and PyPI publishing guide -- `docs/product-roadmap.md`: roadmap history +- [`docs/public-api.md`](docs/public-api.md): stable public API +- [`docs/plugin.md`](docs/plugin.md): how to build a new plugin +- [`docs/architecture.md`](docs/architecture.md): architecture and class diagram +- [`docs/publishing.md`](docs/publishing.md): TestPyPI and PyPI publishing guide +- [`docs/product-roadmap.md`](docs/product-roadmap.md): roadmap history diff --git a/cspell-project-words.txt b/cspell-project-words.txt index f6ae8ab..9ae8cc4 100644 --- a/cspell-project-words.txt +++ b/cspell-project-words.txt @@ -1,11 +1,7 @@ dunder fieldvalue firstname -Honoré -Keir lastname nicegui postalcode pydantic -Québec -Starmer diff --git a/docs/architecture.md b/docs/architecture.md index 4b19382..935c093 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,5 +1,9 @@ # Architecture +[Home](../README.md) + +[Previous: Plugin Development](plugin.md) | [Next: Public API](public-api.md) + This document describes the current architecture of `nicegui-builder` in a way that is meant to be readable by humans first. The main idea is simple: @@ -383,7 +387,7 @@ If someone is new to the project, the best order is: ## Related Documents -- `README.md` for using the library -- `docs/plugin.md` for writing plugins -- `docs/public-api.md` for the stable API surface -- `docs/examples.md` for the planned example set +- [`README.md`](../README.md) for using the library +- [`docs/plugin.md`](plugin.md) for writing plugins +- [`docs/public-api.md`](public-api.md) for the stable API surface +- [`docs/examples.md`](examples.md) for the planned example set diff --git a/docs/examples.md b/docs/examples.md index 2f7e4c3..fd3c798 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -1,5 +1,9 @@ # Examples Roadmap +[Home](../README.md) + +[Previous: Public API](public-api.md) | [Next: Product Roadmap](product-roadmap.md) + This document proposes a progressive set of examples to document `nicegui-builder`. The goal is to cover the public API in increasing order of complexity, while keeping each example focused and easy to understand. @@ -18,7 +22,7 @@ Each example should ideally: A ready-to-copy VS Code debug template lives at: -- `src/nicegui_builder/examples/vscode/launch.json` +- [`src/nicegui_builder/examples/vscode/launch.json`](../src/nicegui_builder/examples/vscode/launch.json) Usage: diff --git a/docs/plugin.md b/docs/plugin.md index a50d773..c78a850 100644 --- a/docs/plugin.md +++ b/docs/plugin.md @@ -1,5 +1,9 @@ # Plugin Development +[Home](../README.md) + +[Previous: Publishing](publishing.md) | [Next: Architecture](architecture.md) + This document explains how to add a new source plugin to `nicegui-builder`. ## Goal @@ -43,7 +47,7 @@ They typically implement: - `resolve_widget(spec, variant="std")` - optional `render_form(source, flavor="")` -See `src/nicegui_builder/plugins/base.py`. +See [`src/nicegui_builder/plugins/base.py`](../src/nicegui_builder/plugins/base.py). ### Collection Plugins @@ -135,11 +139,11 @@ The `pydantic` plugin is a good reference for form-oriented plugins. Its code is organized under: -- `src/nicegui_builder/plugins/pydantic/inspect.py` -- `src/nicegui_builder/plugins/pydantic/mapping.py` -- `src/nicegui_builder/plugins/pydantic/resolve.py` -- `src/nicegui_builder/plugins/pydantic/plugin.py` -- `src/nicegui_builder/plugins/pydantic/pydantic-nicegui.yml` +- [`src/nicegui_builder/plugins/pydantic/inspect.py`](../src/nicegui_builder/plugins/pydantic/inspect.py) +- [`src/nicegui_builder/plugins/pydantic/mapping.py`](../src/nicegui_builder/plugins/pydantic/mapping.py) +- [`src/nicegui_builder/plugins/pydantic/resolve.py`](../src/nicegui_builder/plugins/pydantic/resolve.py) +- [`src/nicegui_builder/plugins/pydantic/plugin.py`](../src/nicegui_builder/plugins/pydantic/plugin.py) +- [`src/nicegui_builder/plugins/pydantic/pydantic-nicegui.yml`](../src/nicegui_builder/plugins/pydantic/pydantic-nicegui.yml) The YAML file is plugin-local on purpose, so the plugin stays self-contained. @@ -169,7 +173,7 @@ It shows how to: See: -- `src/nicegui_builder/plugins/pandas/plugin.py` +- [`src/nicegui_builder/plugins/pandas/plugin.py`](../src/nicegui_builder/plugins/pandas/plugin.py) ## Testing Guidance diff --git a/docs/product-roadmap.md b/docs/product-roadmap.md index 0ec289a..d19eb49 100644 --- a/docs/product-roadmap.md +++ b/docs/product-roadmap.md @@ -1,5 +1,9 @@ # Product Roadmap +[Home](../README.md) + +[Previous: Examples Roadmap](examples.md) + This roadmap tracks the next user-facing capabilities for `nicegui-builder`. ## 1. Rich Form Validation diff --git a/docs/public-api.md b/docs/public-api.md index c076eec..0ea4a12 100644 --- a/docs/public-api.md +++ b/docs/public-api.md @@ -1,5 +1,9 @@ # Public API +[Home](../README.md) + +[Previous: Architecture](architecture.md) | [Next: Examples Roadmap](examples.md) + This document defines the supported public API surface for `nicegui-builder`. ## Stable diff --git a/docs/publishing.md b/docs/publishing.md index 5b12df4..0cac7af 100644 --- a/docs/publishing.md +++ b/docs/publishing.md @@ -1,5 +1,9 @@ # Publishing +[Home](../README.md) + +[Next: Plugin Development](plugin.md) + This document explains how to publish `nicegui-builder` to TestPyPI and PyPI. ## Publishing Strategy @@ -28,7 +32,7 @@ Important: - every upload must use a new version - TestPyPI also rejects re-uploading the same file/version combination -The version currently lives in `pyproject.toml`. +The version currently lives in [`pyproject.toml`](../pyproject.toml). ## One-Time Setup @@ -112,11 +116,11 @@ Preview only the unreleased changes: git-cliff --unreleased ``` -If you later want GitHub-enriched metadata for a private repository, provide a token and disable offline mode in `cliff.toml`. +If you later want GitHub-enriched metadata for a private repository, provide a token and disable offline mode in [`cliff.toml`](../cliff.toml). Recommended release habit: -1. update the version in `pyproject.toml` +1. update the version in [`pyproject.toml`](../pyproject.toml) 2. run `git-cliff -o CHANGELOG.md` 3. review the generated changelog 4. commit the version bump and changelog together @@ -128,10 +132,10 @@ Use this for development and packaging validation. ### Recommended steps -1. update the version in `pyproject.toml` to a development version +1. update the version in [`pyproject.toml`](../pyproject.toml) to a development version 2. commit the change on `develop` 3. push the branch -4. trigger the `Publish TestPyPI` workflow manually in GitHub Actions +4. trigger the [`Publish TestPyPI`](../.github/workflows/publish-testpypi.yml) workflow manually in GitHub Actions 5. verify installation from TestPyPI Example install: @@ -147,11 +151,11 @@ Use this for stable releases only. ### Recommended steps 1. make sure tests pass -2. update the version in `pyproject.toml` to a stable version +2. update the version in [`pyproject.toml`](../pyproject.toml) to a stable version 3. commit the release version 4. merge the approved release PR into `main` 5. create and push a git tag like `v0.1.0` from `main` -6. let the `Publish PyPI` workflow publish the package +6. let the [`Publish PyPI`](../.github/workflows/publish-pypi.yml) workflow publish the package 7. verify installation from PyPI Example: @@ -171,13 +175,13 @@ pip install nicegui-builder The repository now includes: -- package metadata in `pyproject.toml` +- package metadata in [`pyproject.toml`](../pyproject.toml) - package-data inclusion for YAML files -- `MANIFEST.in` for source distribution completeness -- build tooling in `requirements-dev.txt` -- `git-cliff` configuration in `cliff.toml` -- `CHANGELOG.md` -- GitHub Actions workflows for TestPyPI and PyPI +- [`MANIFEST.in`](../MANIFEST.in) for source distribution completeness +- build tooling in [`requirements-dev.txt`](../requirements-dev.txt) +- `git-cliff` configuration in [`cliff.toml`](../cliff.toml) +- [`CHANGELOG.md`](../CHANGELOG.md) +- GitHub Actions workflows in [`publish-testpypi.yml`](../.github/workflows/publish-testpypi.yml) and [`publish-pypi.yml`](../.github/workflows/publish-pypi.yml) ## Practical Advice diff --git a/pyproject.toml b/pyproject.toml index 2c0f8db..7fe6f08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "nicegui-builder" -version = "0.0.0.dev1" +version = "0.0.0.dev3" description = "Plugin-first NiceGUI builders for declarative layouts, forms, and tables" readme = "README.md" license = "MIT" diff --git a/src/nicegui_builder/examples/example_contact_address.py b/src/nicegui_builder/examples/example_contact_address.py index d3ed806..44648f2 100644 --- a/src/nicegui_builder/examples/example_contact_address.py +++ b/src/nicegui_builder/examples/example_contact_address.py @@ -19,35 +19,35 @@ class ContactAddress(BaseModel): default="", title="Full name", description="The full name", - examples=["Mark Carney", "Keir Starmer", "Alex Morgan"], + examples=["Jordan Lee", "Taylor Brooks", "Alex Morgan"], ) address: str = Field( default="", title="Address line", description="The door number, the street and the suite", - examples=["1 Sussex Drive", "10 Downing Street", "55 Orchard Avenue"], + examples=["142 Willow Crest Lane", "27 Maple Court, Suite 4B", "908 Harbor View Avenue"], ) city: str = Field( default="", title="City", description="The city", - examples=["Ottawa", "London", "Boston"], + examples=["North Briar", "Maple Glen", "Harbor Point"], ) province: str = Field( default="", title="Province", description="The province", - examples=["Quebec", "", ""], + examples=["Westfield", "Lake District", "North County"], ) postalcode: str = Field( default="", title="Postal code", description="The postal code", - examples=["K1A 0A1", "SW1A 2AA", "75008"], + examples=["WL3 8QT", "MC4 2LB", "HV7 1RN"], ) country: str = Field(