Changeset - 45bc99e9acc4
[Not reviewed]
0 2 0
Ben Sturmfels (bsturmfels) - 2 months ago 2024-07-18 11:48:28
ben@sturm.com.au
Add colorama dependency

Used by statement reconciler.
2 files changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reconcile/helper.py
Show inline comments
 
"""Tool to help identify unreconciled postings.
 

	
 
Run like this:
 

	
 
  python conservancy_beancount/reconcile/helper.py \
 
    --beancount-file=$HOME/conservancy/beancount/books/2021.beancount \
 
    --prev-end-date=2021-05-13 --cur-end-date=2021-12-31 \
 
    --account="Liabilities:CreditCard:AMEX"
 

	
 
In the spirit of bc-reconcile-helper.plx (the original Perl code)
 

	
 
Not implemented:
 
 - --report-group-regex
 
 - git branch selection from bean-query-goofy-daemon.plx
 

	
 
"""
 
import argparse
 
import csv
 
from dateutil.relativedelta import relativedelta
 
import datetime
 
import decimal
 
import io
 
import sys
 
import tempfile
 
import textwrap
 
import typing
 
from typing import List
 
import os
 

	
 
from beancount import loader
 
from beancount.query.query import run_query
 

	
 

	
 
def end_of_month(date: datetime.date) -> datetime.date:
 
    """Given a date, return the last day of the month."""
 
    # Using 'day' replaces, rather than adds.
 
    return date + relativedelta(day=31)
 

	
 

	
setup.cfg
Show inline comments
...
 
@@ -12,48 +12,49 @@ long_description = file: README.rst
 
long_description_content_type = text/x-rst; charset=UTF-8
 
project_urls =
 
  Source = %(url)s
 
url = https://k.sfconservancy.org/NPO-Accounting/conservancy_beancount
 

	
 
[bdist_wheel]
 
universal = 1
 

	
 
[mypy]
 
disallow_any_unimported = False
 
disallow_untyped_calls = False
 
disallow_untyped_defs = True
 
show_error_codes = True
 
strict_equality = True
 
warn_redundant_casts = True
 
warn_return_any = True
 
warn_unreachable = True
 
warn_unused_configs = True
 

	
 
[options]
 
include_package_data = True
 
install_requires =
 
  babel>=2.6
 
  beancount>=2.2
 
  colorama
 
  GitPython>=2.0
 
  odfpy>=1.4.0,!=1.4.1
 
  pdfminer.six>=20200101
 
  python-dateutil>=2.7
 
  PyYAML>=3.0
 
  regex
 
  rt>=2.0,<3.0
 
  thefuzz
 
packages = find:
 
python_requires = >=3.6
 

	
 
[options.extras_require]
 
test =
 
  mypy>=0.770
 
  pytest>=3.0
 
  pytest-mypy
 
  types-requests
 
  types-python-dateutil
 
  types-setuptools
 
  types-PyYAML
 

	
 
[options.entry_points]
 
console_scripts =
 
  accrual-report = conservancy_beancount.reports.accrual:entry_point
0 comments (0 inline, 0 general)