Skip to content

Commit ea20723

Browse files
committed
update README.md
1 parent 8d3cf77 commit ea20723

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CASParser
22

3-
[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
3+
[![code style: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
44
[![GitHub](https://img.shields.io/github/license/codereverser/casparser)](https://github.com/codereverser/casparser/blob/main/LICENSE)
55
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/codereverser/casparser/run-pytest.yml?branch=main)
66
[![codecov](https://codecov.io/gh/codereverser/casparser/branch/main/graph/badge.svg?token=DYZ7TXWRGI)](https://codecov.io/gh/codereverser/casparser)
@@ -10,7 +10,7 @@ Parse Consolidated Account Statement (CAS) PDF files generated from CAMS/KFINTEC
1010

1111
`casparser` also includes a command line tool with the following analysis tools
1212
- `summary`- print portfolio summary
13-
- `gains` - Print capital gains report (summary and detailed)
13+
- (**BETA**) `gains` - Print capital gains report (summary and detailed)
1414
- with option to generate csv files for ITR in schedule 112A format
1515

1616

casparser/process/regex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
# Normal Transaction entries
4141
TRANSACTION_RE1 = rf"{date_re}\t\t([^0-9].*)\t\t{amt_re}\t\t{amt_re}\t\t{amt_re}\t\t{amt_re}"
42-
# Zero unit transactions
42+
# Zero unit transactions (ref: #88)
4343
TRANSACTION_RE2 = rf"{date_re}\t\t([^0-9].*)\t\t{amt_re}\t\t(?:{amt_re})*\t\t{amt_re}\t\t{amt_re}"
4444
# Segregated portfolio entries
4545
TRANSACTION_RE3 = rf"{date_re}\t\t([^0-9].*)\t\t{amt_re}\t\t{amt_re}(?:\t\t{amt_re}\t\t{amt_re})*"

tests/test_process.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ def test_transaction_type(self):
7777
amount=None,
7878
)
7979

80+
assert parse_transaction(
81+
"01-Jan-2021\t\tIDCW Reinvestment @ Rs.0.003 per unit\t\t0.32\t\t\t\t1001.40\t\t12.34"
82+
) == ParsedTransaction(
83+
date="01-Jan-2021",
84+
description="IDCW Reinvestment @ Rs.0.003 per unit",
85+
units="0.000",
86+
balance="12.34",
87+
nav="1001.40",
88+
amount="0.32",
89+
)
90+
8091
def test_dividend_transactions(self):
8192
assert get_transaction_type("IDCW Reinvestment @ Rs.2.00 per unit", Decimal(1.0)) == (
8293
TransactionType.DIVIDEND_REINVEST,

0 commit comments

Comments
 (0)