diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b87133..052eef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ## [Unreleased] +## [2.8.0] - 2026-11-25 + ### Added - [`MapFeatureView.emptied`][osrlib.crawl.views.MapFeatureView.emptied] is true for an authored treasure cache the party has emptied (#316). The cache stays in `features` under the same `id` and description, so a client can draw it opened, and the flag is true exactly when `TakeTreasure` would refuse the cache with `exploration.feature.emptied`. Before, the view's feature list didn't mark an emptied cache, so a client kept offering it. @@ -710,7 +712,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - The documentation site: quickstart, guides, front-end walk-throughs, and a full reference for every command, event, rejection code, message code, RNG stream, and content id. - The typed surface: complete type hints under `py.typed`, checked in CI. -[Unreleased]: https://github.com/mmacy/osrlib-python/compare/v2.7.0...HEAD +[Unreleased]: https://github.com/mmacy/osrlib-python/compare/v2.8.0...HEAD +[2.8.0]: https://github.com/mmacy/osrlib-python/compare/v2.7.0...v2.8.0 [2.7.0]: https://github.com/mmacy/osrlib-python/compare/v2.6.0...v2.7.0 [2.6.0]: https://github.com/mmacy/osrlib-python/compare/v2.5.1...v2.6.0 [2.5.1]: https://github.com/mmacy/osrlib-python/compare/v2.5.0...v2.5.1 diff --git a/pyproject.toml b/pyproject.toml index 3fd1902..57e96b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "osrlib" -version = "2.7.0" +version = "2.8.0" description = "B/X (1981 Basic/Expert) tabletop RPG rules engine for turn-based dungeon crawlers" readme = "README.md" # The wheel ships Open Game Content (osrlib/data/*.json and its LICENSE-OGL.md diff --git a/tests/crawl_fixtures.py b/tests/crawl_fixtures.py index f4ffeb1..1811ed1 100644 --- a/tests/crawl_fixtures.py +++ b/tests/crawl_fixtures.py @@ -431,7 +431,7 @@ def build_gated_adventure() -> Adventure: FeatureSpec( id="vault", kind="treasure_cache", - description="A ferryman's strongbox.", + description="An iron strongbox.", cell=(1, 0), item_ids=("silver_seal",), ), diff --git a/tests/test_can_back_stab.py b/tests/test_can_back_stab.py index 1c6231a..6f3d98a 100644 --- a/tests/test_can_back_stab.py +++ b/tests/test_can_back_stab.py @@ -576,16 +576,16 @@ def test_a_planned_move_doesnt_change_who_can_back_stab_in_the_free_round(self): # ---------------------------------------------------------------------- the guides -def _unreleased() -> str: +def _released_in_2_8_0() -> str: changelog = (REPO / "CHANGELOG.md").read_text() - match = re.search(r"^## \[Unreleased\]\n(.*?)^## \[", changelog, flags=re.S | re.M) + match = re.search(r"^## \[2\.8\.0\][^\n]*\n(.*?)^## \[", changelog, flags=re.S | re.M) assert match is not None return match.group(1) def test_the_changelog_records_the_new_lists(): - unreleased = _unreleased() - bullet = next((line for line in unreleased.splitlines() if "(#319)" in line), "") + released = _released_in_2_8_0() + bullet = next((line for line in released.splitlines() if "(#319)" in line), "") assert "EncounterView.can_back_stab" in bullet assert "BattleRoundPreview.can_hide" in bullet assert "BattleRoundPreview.can_back_stab" in bullet diff --git a/tests/test_feature_description_docs.py b/tests/test_feature_description_docs.py index af42604..d0ac97f 100644 --- a/tests/test_feature_description_docs.py +++ b/tests/test_feature_description_docs.py @@ -87,13 +87,13 @@ def test_the_guide_links_the_two_audiences(): assert "][osrlib.crawl.dungeon.FeatureSpec.referee_notes]" in text -def test_the_unreleased_changelog_tells_an_upgrading_author(): - # One bullet under Unreleased says that the players read a cache's description since 2.6.0 - # and names the new field. No released section is rewritten to say it. +def test_the_changelog_tells_an_upgrading_author(): + # One bullet under 2.8.0 says that the players read a cache's description since 2.6.0 + # and names the new field. No other section is rewritten to say it. sections = _changelog_sections() - bullets = [line for line in sections["Unreleased"].splitlines() if line.startswith("- ")] + bullets = [line for line in sections["2.8.0"].splitlines() if line.startswith("- ")] matching = [line for line in bullets if "2.6.0" in line and "referee_notes" in line and "#318" in line] assert len(matching) == 1, bullets for name, text in sections.items(): - if name != "Unreleased": + if name != "2.8.0": assert "referee_notes" not in text, name diff --git a/tests/test_view_spell_lists.py b/tests/test_view_spell_lists.py index f1ef224..899210c 100644 --- a/tests/test_view_spell_lists.py +++ b/tests/test_view_spell_lists.py @@ -615,9 +615,9 @@ def test_the_views_guide_and_the_changelog_describe_the_lists(): root = Path(__file__).parent.parent guide = (root / "docs" / "guides" / "views-and-visibility.md").read_text() changelog = (root / "CHANGELOG.md").read_text() - unreleased = changelog.split("## [Unreleased]", 1)[1].split("\n## [", 1)[0] + released = changelog.split("## [2.8.0]", 1)[1].split("\n## [", 1)[0] for name in ("preparable_spells", "learnable_spells", "spell_slots", "spell_levels"): assert name in guide, name - assert name in unreleased, name - assert "#326" in unreleased + assert name in released, name + assert "#326" in released diff --git a/uv.lock b/uv.lock index fd54e13..be27177 100644 --- a/uv.lock +++ b/uv.lock @@ -497,7 +497,7 @@ wheels = [ [[package]] name = "osrlib" -version = "2.7.0" +version = "2.8.0" source = { editable = "." } dependencies = [ { name = "pydantic" },