Giter VIP home page Giter VIP logo

Comments (5)

baartosz avatar baartosz commented on September 11, 2024 1

Ah okay, got your point now.

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

Yes, that's the idea: the fava_investor modules themselves should be agnostic to whether they are being called with beancount or fava underneath. The APIs abstract this out for them. This way, they can be called through a CLI without fava, or through fava, and they'll happily work with either. They'll never know if the API layer is using beancount or fava underneath. Does this explanation make sense?

(Note: beancountinvestorapi.root_tree() is the only hack I've temporarily put in that goes against this. I'll remove it once I figure out assetalloc_account which is a WIP.)

from fava_investor.

baartosz avatar baartosz commented on September 11, 2024

I don't understand what value it provides.
Our modules will depend of fava and/or beancount anyway as APIs' methods are returning data structures defined in beancount and fava. There is still coupling there. Logic in our modules (that is processing entries in journal for example) is still relying on beancount's Transaction, Posting, addition of Inventories, etc. That coupling will break them if beancount's code is changed in the future and API classes doesn't seem to help with that.

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

How would you rewrite libtlh.py to simultaneously work as a) a library without fava dependency (so you can call it from a CLI), and b) usable with a fava context?

BTW, insulation from fava/beancount code is not the goal. We will depend on them heavily and always. The goal is agnosticism to one vs. the other.

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

Cool. Also: I'm okay moving forward with code that is fava-specific, deferring the goal of making it work with beancount as well. As an example, your balance module uses a fava-specific tree structure which makes it a bit difficult to get it to work without fava. I'm okay with this for now. There is a reason this is called "fava_investor" - fava is primary compared to the library/CLI targets.

Bottomline: please don't worry about the library/CLI aspect of your module for now.

from fava_investor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.