beancount-cli 0.2.17__tar.gz → 0.3.0__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.
Files changed (36) hide show
  1. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/CHANGELOG.md +7 -0
  2. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/PKG-INFO +2 -2
  3. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/pyproject.toml +2 -2
  4. beancount_cli-0.3.0/src/beancount_cli/__init__.py +1 -0
  5. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_coverage_gap.py +5 -3
  6. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_price_fetch_errors.py +3 -2
  7. beancount_cli-0.2.17/src/beancount_cli/__init__.py +0 -1
  8. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/.gitignore +0 -0
  9. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/LICENSE +0 -0
  10. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/README.md +0 -0
  11. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/adapters.py +0 -0
  12. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/cli.py +0 -0
  13. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/commands/__init__.py +0 -0
  14. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/commands/account.py +0 -0
  15. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/commands/commodity.py +0 -0
  16. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/commands/common.py +0 -0
  17. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/commands/price.py +0 -0
  18. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/commands/report.py +0 -0
  19. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/commands/root.py +0 -0
  20. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/commands/transaction.py +0 -0
  21. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/config.py +0 -0
  22. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/formatting.py +0 -0
  23. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/models.py +0 -0
  24. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/py.typed +0 -0
  25. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/src/beancount_cli/services.py +0 -0
  26. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/conftest.py +0 -0
  27. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/fake_price_source.py +0 -0
  28. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/smoke_test.py +0 -0
  29. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_advanced.py +0 -0
  30. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_bql.py +0 -0
  31. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_cli.py +0 -0
  32. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_config.py +0 -0
  33. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_models.py +0 -0
  34. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_price_cash_currency.py +0 -0
  35. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_price_fill_gaps.py +0 -0
  36. {beancount_cli-0.2.17 → beancount_cli-0.3.0}/tests/test_services.py +0 -0
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-09-29
9
+
10
+ ### Changed
11
+ - Upgraded `agentyper` to `0.1.21`.
12
+ - Exit codes follow the CLI Agent Spec: validation errors (e.g. `check` finding ledger errors) now exit `2` instead of `3`, and a partial `price fetch` failure exits `3` instead of `2`.
13
+ - `--format json` keeps list results as arrays: a query matching one item returns `"data": [{...}]` instead of a bare object.
14
+
8
15
  ## [0.2.17] - 2026-09-28
9
16
 
10
17
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: beancount-cli
3
- Version: 0.2.17
3
+ Version: 0.3.0
4
4
  Summary: A CLI tool to manage Beancount ledgers
5
5
  Project-URL: Homepage, https://github.com/romamo/beancount-cli
6
6
  Project-URL: Repository, https://github.com/romamo/beancount-cli
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Topic :: Office/Business :: Financial :: Accounting
22
22
  Requires-Python: >=3.10
23
- Requires-Dist: agentyper==0.1.17
23
+ Requires-Dist: agentyper==0.1.21
24
24
  Requires-Dist: beancount==3.2.3
25
25
  Requires-Dist: beanprice2>=2.1.2
26
26
  Requires-Dist: beanquery>=0.1.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "beancount-cli"
3
- version = "0.2.17"
3
+ version = "0.3.0"
4
4
  description = "A CLI tool to manage Beancount ledgers"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -15,7 +15,7 @@ dependencies = [
15
15
  "python-dateutil>=2.8.2",
16
16
  "beanprice2>=2.1.2",
17
17
  "pydantic-settings==2.14.1",
18
- "agentyper==0.1.17",
18
+ "agentyper==0.1.21",
19
19
  ]
20
20
  keywords = ["beancount", "cli", "accounting", "automation", "agent"]
21
21
  classifiers = [
@@ -0,0 +1 @@
1
+ __version__ = "0.3.0"
@@ -1,5 +1,7 @@
1
1
  import json as jsonlib
2
2
 
3
+ import agentyper
4
+
3
5
  from beancount_cli.cli import main
4
6
 
5
7
 
@@ -63,7 +65,7 @@ def test_check_cmd_with_errors(temp_beancount_file):
63
65
  with open(temp_beancount_file, "a") as f:
64
66
  f.write("\n2022-01-01 INVALID_STATEMENT\n")
65
67
  code, out, err = _run_cli("check", str(temp_beancount_file))
66
- assert code == 3 # EXIT_VALIDATION, not system error
68
+ assert code == agentyper.EXIT_VALIDATION # not a system error
67
69
  assert "Traceback" not in err
68
70
 
69
71
 
@@ -86,11 +88,11 @@ def test_check_validation_errors_json(temp_beancount_file):
86
88
  with open(temp_beancount_file, "a") as f:
87
89
  f.write("\n2022-01-01 INVALID_STATEMENT\n")
88
90
  code, out, err = _run_cli("check", "--format", "json", str(temp_beancount_file))
89
- assert code == 3
91
+ assert code == agentyper.EXIT_VALIDATION
90
92
  payload = jsonlib.loads(err)
91
93
  assert payload["error"] is True
92
94
  assert payload["error_type"] == "BeancountValidationError"
93
- assert payload["exit_code"] == 3
95
+ assert payload["exit_code"] == agentyper.EXIT_VALIDATION
94
96
  assert isinstance(payload["errors"], list)
95
97
  assert len(payload["errors"]) > 0
96
98
 
@@ -11,6 +11,7 @@ import sys
11
11
  import textwrap
12
12
  from pathlib import Path
13
13
 
14
+ import agentyper
14
15
  import fake_price_source
15
16
  import pytest
16
17
  from beanprice import price as bp_price
@@ -61,7 +62,7 @@ def _run_fetch(tmp_path: Path, *args: str) -> subprocess.CompletedProcess:
61
62
  def test_source_error_does_not_abort_other_jobs(tmp_path):
62
63
  result = _run_fetch(tmp_path)
63
64
 
64
- assert result.returncode == 2, result.stderr # PARTIAL_FAILURE
65
+ assert result.returncode == agentyper.ExitCode.PARTIAL_FAILURE, result.stderr
65
66
  assert "price GOOD" in result.stdout
66
67
  assert "Error fetching prices" not in result.stderr
67
68
  assert "Skipped 1 jobs with source errors: FAIL" in result.stderr
@@ -72,7 +73,7 @@ def test_source_error_does_not_abort_other_jobs(tmp_path):
72
73
  def test_update_writes_prices_despite_source_error(tmp_path):
73
74
  result = _run_fetch(tmp_path, "--update")
74
75
 
75
- assert result.returncode == 2, result.stderr
76
+ assert result.returncode == agentyper.ExitCode.PARTIAL_FAILURE, result.stderr
76
77
  ledger_text = (tmp_path / "main.beancount").read_text()
77
78
  assert "price GOOD" in ledger_text
78
79
  assert "price FAIL" not in ledger_text
@@ -1 +0,0 @@
1
- __version__ = "0.2.17"
File without changes
File without changes
File without changes