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/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions RELEASE-SHA256.txt
Original file line number Diff line number Diff line change
@@ -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
7 changes: 3 additions & 4 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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)
```

Expand All @@ -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. |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/golded_ftn/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion tests/test_contracts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections.abc import Iterable
from dataclasses import asdict
from os import PathLike, fspath
from pathlib import Path

Expand Down Expand Up @@ -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",
)

Expand Down Expand Up @@ -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(
Expand Down
Loading