Skip to content
New issue

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

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

Already on GitHub? # to your account

Per wallet application #138

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
7776588
Moved Account class from balance.py to in_transaction.py
eprbell Dec 22, 2024
af75c6d
Added originates_from field and improved comments
eprbell Dec 22, 2024
b22e4e0
Initial version of transfer analysis
eprbell Dec 22, 2024
e48601e
Transfer analysis unit tests
eprbell Dec 22, 2024
6d716e8
Added mypy exceptions for per_wallet_tax_engine.py
eprbell Dec 22, 2024
2a81157
Fixed mypy warinig: removed type annotation from enum values
eprbell Dec 24, 2024
059ab9f
Fixed mypy warinig: removed type annotation from enum values
eprbell Dec 24, 2024
8a5e004
Fixed mypy warinig: removed type annotation from enum values
eprbell Dec 24, 2024
fb71b35
Fixed mypy warinig: removed type annotation from enum values
eprbell Dec 24, 2024
8e770b7
Added a few utility methods (reset_partial_amounts, add_acquired_lot,…
eprbell Jan 13, 2025
61bda9e
Refactored get_acquired_lot_for_taxable_event (reduced indentation le…
eprbell Jan 13, 2025
ad932f3
Changed long term cap gain detection to use cost_basis_timestamp (ins…
eprbell Jan 13, 2025
b93aac0
Added cost_basis_timestamp
eprbell Jan 13, 2025
b4746b4
Changed sort_key to use cost_basis_timestamp (instead of timestamp)
eprbell Jan 13, 2025
b5ca1c3
Added cost_basis_timestamp
eprbell Jan 13, 2025
4f3e0e1
Added cost_basis_timestamp
eprbell Jan 13, 2025
7c93e24
Added cost_basis_timestamp
eprbell Jan 13, 2025
b7ab5e4
Removed and split into 3 files
eprbell Jan 13, 2025
78548ad
Full implementation of transfer analysis
eprbell Jan 13, 2025
0dfd933
Unit test for per-wallet transfer analysis
eprbell Jan 13, 2025
d50f228
Added top-level comment
eprbell Jan 13, 2025
2735bae
Added type check in LotCandidates for accounting method
eprbell Jan 13, 2025
33a480a
Added cast to make pylint happy
eprbell Jan 13, 2025
27033c2
Added EOF newline
eprbell Jan 13, 2025
a783d45
Reformatted with black
eprbell Jan 13, 2025
9223fb7
Added cast to make pylint happy
eprbell Jan 13, 2025
b90d525
Reformatted with black
eprbell Jan 13, 2025
efc81a1
Merge branch 'main' into per_wallet_application
eprbell Jan 13, 2025
d903e91
Renamed a few files to improve clarity
eprbell Jan 13, 2025
8786e6a
Merge branch 'main' into per_wallet_application
eprbell Jan 14, 2025
fd6aaf4
Update src/rp2/in_transaction.py
eprbell Jan 16, 2025
75a1c8d
Added actual amount dictionary (for per-wallet application) and moved…
eprbell Jan 16, 2025
3f9da35
Added parameter names for optional parameters
eprbell Jan 16, 2025
d61334d
Moved create_unfiltered_taxable_event_set to InputData
eprbell Jan 16, 2025
76eb950
Various improvements
eprbell Jan 16, 2025
751a94d
Minor format fixes
eprbell Jan 16, 2025
187082b
Updated to new transfer analyzer OO API
eprbell Jan 16, 2025
6eab3d3
Removed resolved TODO
eprbell Jan 16, 2025
f7a71fb
Updated to new transfer analyzer OO API
eprbell Jan 16, 2025
c5ed0fb
Renamed transfer_analysis_common.py
eprbell Jan 28, 2025
9ec01cb
Added get_acquired_lot_for_timestamp()
eprbell Jan 28, 2025
b285b82
Added account to balance map
eprbell Jan 28, 2025
afd7923
Added a few utility functions in preparation of global allocation
eprbell Jan 28, 2025
c2c4ae4
Minor changes: renamed a few symbols
eprbell Jan 28, 2025
6bd7485
Refactor of old transfer_analysis_test_common.py
eprbell Jan 28, 2025
4fcf1b6
Removed skip_transfer_pointers parameter
eprbell Jan 28, 2025
f8963bd
Minor change
eprbell Jan 30, 2025
11763b7
Fixed fee handling bug, added support for per-wallet model without tr…
eprbell Feb 2, 2025
b6f01a5
Added actual amount check. Fixed diff display problem.
eprbell Feb 2, 2025
ab53be4
Adjusted tests after fixing fee handling bug. Populated want amounts …
eprbell Feb 2, 2025
322a152
Added a few comments
eprbell Feb 2, 2025
252c83d
Added a few more tests
eprbell Feb 2, 2025
f3fdd80
Fixed a FIFO test
eprbell Feb 2, 2025
ce7af17
Added utility function to serialize InputData as string list (for diffs)
eprbell Feb 2, 2025
3a99d03
Refactored diff logic, added comments, renamed a few symbols.
eprbell Feb 2, 2025
c664165
Added local artificial id infrastructure
eprbell Feb 3, 2025
0f3f5e8
Fixed a comment
eprbell Feb 4, 2025
5ddbd4e
Added/renamed test fields.
eprbell Feb 4, 2025
84f5527
Renamed test fields.
eprbell Feb 4, 2025
06986ff
Small changes to a comment
eprbell Feb 4, 2025
556ced3
Added an exception
eprbell Feb 6, 2025
462d9e5
Fixed mypy/pylint warnings
eprbell Feb 6, 2025
878e0d3
Fixed mypy/pylint warnings
eprbell Feb 6, 2025
f42a619
Fixed mypy/pylint warnings
eprbell Feb 6, 2025
179855d
Fixed mypy/pylint warnings
eprbell Feb 6, 2025
1953f05
Fixed mypy/pylint warnings
eprbell Feb 6, 2025
67fdf19
Fixed mypy/pylint warnings
eprbell Feb 6, 2025
25f757c
Fixed mypy/pylint warnings
eprbell Feb 6, 2025
9ae5991
Fixed mypy/pylint warnings
eprbell Feb 6, 2025
773d029
Add a TODO
eprbell Feb 12, 2025
dc3fcf3
Added actual amount parameter to _create_per_wallet_input_data_from_t…
eprbell Feb 12, 2025
884f30e
Added new test from Github conversation (see https://github.com/eprbe…
eprbell Feb 12, 2025
6707251
Adjusted type hint to be friendly to Python < 3.10
eprbell Feb 12, 2025
8855cd4
Fixed Pylint warnings
eprbell Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor change
  • Loading branch information
eprbell committed Jan 30, 2025
commit f8963bd33b4da37078900bcdc9bfc105706572a7
7 changes: 3 additions & 4 deletions tests/transfer_analysis_common.py
Original file line number Diff line number Diff line change
@@ -42,18 +42,17 @@ def _run_test(self, test: _Test, transfer_semantics: AbstractAccountingMethod) -
# Prepare the test input
universal_input_data = self._create_universal_input_data_from_transaction_descriptors(configuration, test.input)

# Create TransferAnalyzer.
transfer_analyzer = TransferAnalyzer(configuration, transfer_semantics, universal_input_data)

# If the test expects an error, run the test and check for error.
if test.want_error:
if test.want:
raise ValueError(f"Test data error: both want and want_error are set: {test}")
with self.assertRaisesRegex(RP2ValueError, test.want_error):
transfer_analyzer = TransferAnalyzer(configuration, transfer_semantics, universal_input_data)
transfer_analyzer.analyze()
return

# Call analyze() on universal InputData and receive per-wallet InputData.
# Create transfer analyzer, call analyze() on universal InputData and receive per-wallet InputData.
transfer_analyzer = TransferAnalyzer(configuration, transfer_semantics, universal_input_data)
wallet_2_per_wallet_input_data = transfer_analyzer.analyze()

# Create expected per-wallet InputData, based on the want field of the test.
Loading