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

Port to Python 3 and Django 3 #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ysangkok
Copy link
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
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