-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix for fava 1.2.5 #85
Conversation
Great - thanks a bunch for this PR! I'll take a look at it soon. |
I think this import should also be removed from
|
Okay, I looked into this. To upgrade to Fava 1.25 and beyond:
@tschicke, thanks again for this PR. It's been very helpful in kickstarting the changes needed. I'll get back on this soon. |
d40fd56
to
79a10f4
Compare
With the latest fixes, everything works except for asset allocation by class, with which the display formatting is incorrect, and is missing the graph. I've opened this issue for it. Help appreciated. @tschicke thanks again for helping jumpstart this. I would still like to take your changes around Also, with the 'dev' versions, can we simply strip out the |
Yeah I'll resolve the conflicts and remove the unneeded changes soon. I have to check the format for a dev version of fava. From what I remember it wasn't based on the non-dev version string, which is why I ended up just checking if it contains "dev" at all, but I'll confirm that. I'll also try to take a look at the asset allocation by class problem, but I'm not sure how much I'll be able to help with that. |
Ok, fava's version string comes from |
That's great, thank you for researching this! |
I opened a new PR for the currency changes since they have nothing to do with the original 'Fix for fava 1.2.5' purpose of this PR, so I'm closing this PR. |
This is initial work on #84
This probably shouldn't be merged as is, but this should be most of the changes required to get everything working with fava 1.2.5. The main changes are switching from convert.convert_position to fava's built-in convert_position, and some modifications to the charts api.
The one case I haven't fixed is in libassetalloc.py, under the
if amount.currency == pos.units.currency and amount.currency != base_currency
case. As far as I can tell, fava's convert_position doesn't supportvia
, so I wasn't sure what to do with that block.I also made it so that the generated currency regexes use ^ and $ so that substrings are not incorrectly matched.
Finally, I modified a few version checks to be able to detect development versions of fava. I have a situation where I am installing fava from a local repository, and the installed fava version ends up as 0.1.dev[commit hash], so the version checks are detecting an older version of fava. My thought was that if you are using a development version of fava, it's probably safe to assume that the fava version is up to date and the newest APIs should be used. Feel free to remove those sections of the change if you want, I can work around that on my end if you don't want to merge a sort of hacky check.
I also haven't used fava_investor before. I made these fixes as part of setting up fava_investor, so I don't have a reference for how everything looked/worked before fava 1.2.5 broke things, so apologies if some of the changes break some stuff that I didn't notice.