macxred / pyledger

Python package to streamline the implementation and management of accounting systems.
MIT License
0 stars 0 forks source link

Feat: Refactor class hierarchy #50

Closed AlexTheWizardL closed 3 weeks ago

AlexTheWizardL commented 3 weeks ago

Refactor class hierarchy

Description:
Introduces PersistentLedger for persistent data storage and ExternalLedger for integration with external accounting systems, extending PyLedger’s modularity for various storage and integration needs.

codecov-commenter commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Flag Coverage Δ
unittests 77.61% <100.00%> (+0.05%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pyledger/__init__.py 100.00% <100.00%> (ø)
pyledger/persistent_ledger.py 100.00% <100.00%> (ø)
lasuk commented 3 weeks ago

Many thanks for introducing placeholders in the class hierarchy.

I have pushed commit 2a40f293 to simplify the new classes and to streamline the doc strings (shorten and reduce redundancy with class description in README). Please shout if you disagree.

This PR does not address the main clarification in the class hierarchy: Convert StandaloneLedger into an abstract base class without init method or properties. I suggest to work on this next and submit a new PR. This step will later simplify the addition of new entities (it removes the need to make changes to StandaloneLedger).