plan-doc 0.1.2__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plan-doc
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Typed parser for plan-file YAML frontmatter (schema v1) — strict validation, first-block-only extraction, foreign-document discrimination
5
5
  Author-email: Mike Donnelly <82827803+m0j0d@users.noreply.github.com>
6
6
  License: MIT
7
- Project-URL: Homepage, https://github.com/m0j0d/libs/tree/main/plan-doc
8
- Project-URL: Repository, https://github.com/m0j0d/libs
9
- Project-URL: Issues, https://github.com/m0j0d/libs/issues
7
+ Project-URL: Homepage, https://pypi.org/project/plan-doc/
10
8
  Classifier: Programming Language :: Python :: 3
11
9
  Classifier: Programming Language :: Python :: 3.10
12
10
  Classifier: Programming Language :: Python :: 3.11
@@ -32,6 +30,8 @@ plan documents. Validation is strict on plan-doc's own fields (loud failures
32
30
  on bad values and typos) but lenient on foreign top-level fields a host
33
31
  project carries alongside the schema (captured in `.extra`).
34
32
 
33
+ Source is maintained in a private monorepo. Releases are built and published by GitHub Actions through a PyPI Trusted Publisher; provenance attestations are visible on the PyPI file listing.
34
+
35
35
  ```python
36
36
  from pathlib import Path
37
37
  from plan_doc import PlanDoc, PlanDocError, NonDraftPrFrontmatterError
@@ -7,6 +7,8 @@ plan documents. Validation is strict on plan-doc's own fields (loud failures
7
7
  on bad values and typos) but lenient on foreign top-level fields a host
8
8
  project carries alongside the schema (captured in `.extra`).
9
9
 
10
+ Source is maintained in a private monorepo. Releases are built and published by GitHub Actions through a PyPI Trusted Publisher; provenance attestations are visible on the PyPI file listing.
11
+
10
12
  ```python
11
13
  from pathlib import Path
12
14
  from plan_doc import PlanDoc, PlanDocError, NonDraftPrFrontmatterError
@@ -1,12 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plan-doc
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Typed parser for plan-file YAML frontmatter (schema v1) — strict validation, first-block-only extraction, foreign-document discrimination
5
5
  Author-email: Mike Donnelly <82827803+m0j0d@users.noreply.github.com>
6
6
  License: MIT
7
- Project-URL: Homepage, https://github.com/m0j0d/libs/tree/main/plan-doc
8
- Project-URL: Repository, https://github.com/m0j0d/libs
9
- Project-URL: Issues, https://github.com/m0j0d/libs/issues
7
+ Project-URL: Homepage, https://pypi.org/project/plan-doc/
10
8
  Classifier: Programming Language :: Python :: 3
11
9
  Classifier: Programming Language :: Python :: 3.10
12
10
  Classifier: Programming Language :: Python :: 3.11
@@ -32,6 +30,8 @@ plan documents. Validation is strict on plan-doc's own fields (loud failures
32
30
  on bad values and typos) but lenient on foreign top-level fields a host
33
31
  project carries alongside the schema (captured in `.extra`).
34
32
 
33
+ Source is maintained in a private monorepo. Releases are built and published by GitHub Actions through a PyPI Trusted Publisher; provenance attestations are visible on the PyPI file listing.
34
+
35
35
  ```python
36
36
  from pathlib import Path
37
37
  from plan_doc import PlanDoc, PlanDocError, NonDraftPrFrontmatterError
@@ -23,7 +23,7 @@ Design decisions:
23
23
  Schema v1 fields:
24
24
  plan_schema int required when block present; must equal 1
25
25
  template str optional; values: "minimal", "standard"
26
- disposal str optional; values: "delete-on-merge", "deferred"
26
+ disposal str optional; values: "delete-on-merge", "deferred", "keep-as-record"
27
27
  phase str optional
28
28
  cleanup_trigger str optional
29
29
  ticket str optional
@@ -112,7 +112,7 @@ class NonDraftPrFrontmatterError(PlanDocError):
112
112
  # ---------------------------------------------------------------------------
113
113
 
114
114
  _SUPPORTED_SCHEMA_VERSIONS = {1}
115
- _ALLOWED_DISPOSAL_VALUES = {"delete-on-merge", "deferred"}
115
+ _ALLOWED_DISPOSAL_VALUES = {"delete-on-merge", "deferred", "keep-as-record"}
116
116
  _KNOWN_FIELDS = frozenset({
117
117
  "plan_schema",
118
118
  "template",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "plan-doc"
3
- version = "0.1.2"
3
+ version = "0.1.4"
4
4
  description = "Typed parser for plan-file YAML frontmatter (schema v1) — strict validation, first-block-only extraction, foreign-document discrimination"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -28,9 +28,7 @@ dev = [
28
28
  ]
29
29
 
30
30
  [project.urls]
31
- Homepage = "https://github.com/m0j0d/libs/tree/main/plan-doc"
32
- Repository = "https://github.com/m0j0d/libs"
33
- Issues = "https://github.com/m0j0d/libs/issues"
31
+ Homepage = "https://pypi.org/project/plan-doc/"
34
32
 
35
33
  [build-system]
36
34
  requires = ["setuptools>=61.0"]
@@ -98,6 +98,19 @@ def test_from_path_raises_on_invalid_disposal_value(tmp_path):
98
98
  assert "disposal" in str(exc_info.value).lower()
99
99
 
100
100
 
101
+ def test_from_path_accepts_keep_as_record_disposal(tmp_path):
102
+ content = textwrap.dedent("""\
103
+ ---
104
+ plan_schema: 1
105
+ disposal: keep-as-record
106
+ ---
107
+ # My Plan
108
+ """)
109
+ plan = _write_plan(tmp_path, content)
110
+ doc = PlanDoc.from_path(plan)
111
+ assert doc.disposal == "keep-as-record"
112
+
113
+
101
114
  # ---------------------------------------------------------------------------
102
115
  # A1 — no frontmatter raises PlanDocError with actionable message
103
116
  # ---------------------------------------------------------------------------
File without changes
File without changes