Skip to content

Port to Python 3 and Django 3#9

Open
ysangkok wants to merge 2 commits into
tykling:masterfrom
ysangkok:django-3
Open

Port to Python 3 and Django 3#9
ysangkok wants to merge 2 commits into
tykling:masterfrom
ysangkok:django-3

Conversation

@ysangkok

Copy link
Copy Markdown
Collaborator

I did some casual testing and everything I tried works.

Things to watch out for:

  • on_delete is now mandatory, and I set CASCADE everywhere, because I assumed the app will check before trying to delete something that is depended on by a ForeignKey.

  • getcurrency was rewritten to use the European Central Bank, since the old URL at the Danish Central Bank (not the "national bank" in English :P) is not working.

With three people sharing an expense that costs 1,
person one paying 0.34, and the others paying 0.33,
this commit makes it such that the result matrix
is empty with the basic calc method.
@ysangkok

Copy link
Copy Markdown
Collaborator Author

@tykling seems like the rounding issue provoked by having three people share an expense that costs 1 is only appearing with the basic calc method. Is it important to fix it or can the basic calc just be removed? I think maybe you commented once that you thought it was optimizing too much, so that you wouldn't understand why you'd have to give money to somebody?

Anyway, I added a commit that fixes the issue for the situation previously described, I don't know if there are other test cases. The fix is kinda of a hack, simply modifying the algorithm so that it treats 0.01 as a zero.

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.

1 participant