diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dc0a858..53a9c1c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ on: tag: description: Reviewed GitHub release tag required: true - default: v1.4.0 + default: v1.5.0 type: string permissions: contents: read diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aa312e..0846642 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.5.0 — 2026-10-27 + +- Rename ParsedMessage.area_code to area, including serialized message fields. + ## 1.4.0 — 2026-10-25 - Add recoverable writer contracts, physical base identity, staged mutations and diff --git a/README.md b/README.md index 12c2da1..7c55014 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ Repository: [`golded-ftn-python`](https://github.com/golded-dev/golded-ftn-python). The distribution remains `golded-ftn`; imports use `golded_ftn`. -The source is public on GitHub. [Version 1.4.0 is available on PyPI](https://pypi.org/project/golded-ftn/1.4.0/). +The source is public on GitHub. [Version 1.5.0 is available on PyPI](https://pypi.org/project/golded-ftn/1.5.0/). Install with Python 3.12 or newer: ```sh -python -m pip install golded-ftn==1.4.0 +python -m pip install golded-ftn==1.5.0 ``` Shared FTN message values, reader/writer protocols and text helpers for Python @@ -21,7 +21,7 @@ git clone https://github.com/golded-dev/golded-ftn-python.git cd golded-ftn-python uv sync --locked uv build -python -m pip install dist/golded_ftn-1.4.0-py3-none-any.whl +python -m pip install dist/golded_ftn-1.5.0-py3-none-any.whl ``` ```python diff --git a/RELEASE-SHA256.txt b/RELEASE-SHA256.txt index 1ca8c0a..887b3ee 100644 --- a/RELEASE-SHA256.txt +++ b/RELEASE-SHA256.txt @@ -1,2 +1,2 @@ -0637eb67f19485792d195d5b099c89c076bc50ce1a617b0cbf32079aa9494840 dist/golded_ftn-1.4.0-py3-none-any.whl -81ad0db681edc81e3011921422899e20876eae3f1dbf05dc122b9fa5cf4b5045 dist/golded_ftn-1.4.0.tar.gz +2119b573a56f7779ab013589b23d004ef4d4f2390a4c0530269a57dd1e6d1b17 dist/golded_ftn-1.5.0-py3-none-any.whl +77edb452254be66992dd3894175a4dd4c2964403d125ed5eb616bdf648bb1be0 dist/golded_ftn-1.5.0.tar.gz diff --git a/docs/api.md b/docs/api.md index 40bc174..b0f3bc0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,7 +1,6 @@ # API reference for golded-ftn -This reference covers all public names exported by `golded_ftn` in the 1.3.0 candidate -working tree. Import public values and functions from `golded_ftn`. Core owns +This reference covers all public names exported by `golded_ftn` in version 1.5.0. Import public values and functions from `golded_ftn`. Core owns values, protocols and pure text helpers. Concrete format packages own files, serialization, record validation and writer sessions. @@ -422,7 +421,7 @@ ParsedMessage(*, msgno: int, from_name: str, to_name: str, subject: str, body_text: str, attributes_raw: int, posted_at=None, external_id=None, from_address=None, to_address=None, reply_to_msgno=None, reply1st_msgno=None, reply_next_msgno=None, - area_code=None, area_name=None, area_sort_order=None, + area=None, area_name=None, area_sort_order=None, area_meta_key=None, control_lines=None, provenance=None) ``` @@ -441,7 +440,7 @@ ParsedMessage(*, msgno: int, from_name: str, to_name: str, subject: str, | `reply_to_msgno` | `int \| None` | `None` | Format-specific parent message link. | | `reply1st_msgno` | `int \| None` | `None` | Format-specific first reply link. | | `reply_next_msgno` | `int \| None` | `None` | Format-specific next reply link. | -| `area_code` | `str \| None` | `None` | Area code when supplied by the reader. | +| `area` | `str \| None` | `None` | Area code when supplied by the reader. | | `area_name` | `str \| None` | `None` | Area name when supplied by the reader. | | `area_sort_order` | `int \| None` | `None` | Area ordering value when supplied. | | `area_meta_key` | `str \| None` | `None` | Consumer metadata key when supplied. | diff --git a/pyproject.toml b/pyproject.toml index 2384c20..609e7a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "golded-ftn" -version = "1.4.0" +version = "1.5.0" description = "Shared FTN message contracts, values and text helpers" readme = "README.md" requires-python = ">=3.12" diff --git a/src/golded_ftn/models.py b/src/golded_ftn/models.py index 6b6f5ea..9045099 100644 --- a/src/golded_ftn/models.py +++ b/src/golded_ftn/models.py @@ -161,7 +161,7 @@ class ParsedMessage: reply_to_msgno: int | None = None reply1st_msgno: int | None = None reply_next_msgno: int | None = None - area_code: str | None = None + area: str | None = None area_name: str | None = None area_sort_order: int | None = None area_meta_key: str | None = None diff --git a/tests/test_contracts.py b/tests/test_contracts.py index c32a532..845588e 100644 --- a/tests/test_contracts.py +++ b/tests/test_contracts.py @@ -1,4 +1,5 @@ from collections.abc import Iterable +from dataclasses import asdict from os import PathLike, fspath from pathlib import Path @@ -41,7 +42,7 @@ def read( body_text="Message body", attributes_raw=0, external_id="fake:1", - area_code="GENERAL", + area="GENERAL", area_name="General", ) @@ -69,6 +70,9 @@ def test_consumers() -> None: (source,) = catalog.sources(Path("/bbs/messages")) (message,) = reader.read(source.path) assert source.code == "GENERAL" and message.subject == "Hello" + assert message.area == "GENERAL" + assert asdict(message)["area"] == "GENERAL" + assert "area_code" not in asdict(message) assert Path(source.path) == Path("/bbs/messages") / "general" assert ( writer.write(