Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new CAS file formats #79

Merged
merged 15 commits into from
Sep 11, 2023
Merged

Conversation

codereverser
Copy link
Owner

  • add support for both old and new CAS file formats
  • better regexp queries
  • update pydantic to v2

fixes #78

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05% 🎉

Comparison is base (4704ecc) 98.11% compared to head (9cdf6c5) 98.16%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   98.11%   98.16%   +0.05%     
==========================================
  Files          17       17              
  Lines        1004     1028      +24     
==========================================
+ Hits          985     1009      +24     
  Misses         19       19              
Files Changed Coverage Δ
casparser/parsers/pdfminer.py 98.04% <ø> (ø)
casparser/parsers/mupdf.py 97.86% <100.00%> (+0.05%) ⬆️
casparser/parsers/utils.py 100.00% <100.00%> (ø)
casparser/process/cas_detailed.py 98.63% <100.00%> (+0.04%) ⬆️
casparser/process/cas_summary.py 100.00% <100.00%> (ø)
casparser/process/regex.py 100.00% <100.00%> (ø)
casparser/process/utils.py 100.00% <100.00%> (ø)
casparser/types.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@isaac-philip
Copy link
Contributor

Thanks for the quick turn-around time.

So what I am observing is a new issue !!

For me, its unable to gather the 11 schemes that were previously showing in Total.
Now it shows below with green ticks for random 6,
I assume these 6 are computed only while others are skipped / ignored ?

Output summary i get for the same report earlier raised,

Summary
Total   :    6 schemes
Matched :    6 schemes
Error   :    0 schemes

and just does not show anything about the remaining 4 or 5(considering 0 balance) schemes in the portfolio.

@isaac-philip
Copy link
Contributor

::my environment::

  • python version - Python 3.10.6

for some reason does not install sqllite3 on python3.8.18 ?
I installed using,

$ pip install .

@codereverser
Copy link
Owner Author

By default it doesn't print 0 balance rows, to avoid clutter. You can print all schemes by passing -a / --include-all option

  -a, --include-all           Include schemes with zero valuation in the
                              summary output

for some reason does not install sqllite3 on python3.8.18

not sure about this. sqlite3 is supposed to be part of standard python library. may be some issue with the python setup?

@isaac-philip
Copy link
Contributor

took pull, installed latest Successfully installed casparser-0.7.1,

Only 1 scheme was 0 valued, like I said the issue that I raised earlier showed 11 schemes but here it shows only 6 for some reason inspite of using the -a param too.

@codereverser
Copy link
Owner Author

codereverser commented Sep 7, 2023 via email

@codereverser
Copy link
Owner Author

@isaac-philip I've pushed one more commit that may solve the issue. Can you please give it a try?

The code works fine on all CAS files I use for testing; so not sure how to fix this frankly, if it still doesn't work 😐

@isaac-philip
Copy link
Contributor

Unfortunately it's the same :(

@isaac-philip
Copy link
Contributor

I'll have a look to debug this, I also can't seem to find a way to share the file without revealing sensitive info.

I tried to black out but after testing the file with execution and still the name and other details were displayed on screen.

@isaac-philip
Copy link
Contributor

latest code I tested wit d same pdf, works perfect 👍🏼

Details checked,

  • Summary Total equals Matched ✅
  • Summary - No Error ✅
  • Portfolio Valuation data is matching the report/pdf ✅

Thanks ! 😃

@codereverser codereverser merged commit ebc0002 into main Sep 11, 2023
3 checks passed
@codereverser codereverser deleted the v0.7-new-file-format branch September 11, 2023 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parser not working, resulting in excalamation mark / error rather than checked
2 participants