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

How is beangulp compatible with beancount v2? #132

Open
ccdunder opened this issue Nov 8, 2024 · 3 comments
Open

How is beangulp compatible with beancount v2? #132

ccdunder opened this issue Nov 8, 2024 · 3 comments

Comments

@ccdunder
Copy link

ccdunder commented Nov 8, 2024

Hi, I feel like I'm taking crazy pills; perhaps I'm missing something.

The README states:

beangulp is compatible with both Beancount 2.3 and the Beancount 3.0. beangulp is the evolution of beancount.ingest in Beancount 2.3 and replaces it in the Beancount 3.0 release.

But beangulp.importer.Importer and beancount.ingest.importer.ImporterProtocol don't match. They're very close, but there are slight differences in most methods such that a wrapper is required. For now I'm wrapping this, but it seems like I shouldn't have to and makes me think I'm missing something.

What am I missing? In what sense is this compatible with Beancount 2.3? Is the API mismatch intentional?

Thanks in advance for your help.

@dnicolodi
Copy link
Collaborator

The statement refers to the fact that beangulp does not require Beancount 3.0. beangulp requires importers implementing either the beangulp.importer.Importer ABC or that are subclasses of beangulp.importer.ImporterProtocol. The latter is the same as beancount.ingest.ImporterProtocol just with a different import path. Supporting subclasses of beancount.ingest.ImporterProtocol when executed with Beancount 2.3 is possible, however no one contributed a patch to make this possible.

@ccdunder
Copy link
Author

Ah, that makes sense. Thank you!

So folks would be open to PRs to make beangulp importers work in beancount 2.3 vice versa?

I think this would be a very useful change. I see a lot of large beancount projects struggling to move to 3.0 because it's a breaking change. Making importers forward and backward compatible would make incremental upgrades possible (both within an individual codebase and across dependent codebases).

@dnicolodi
Copy link
Collaborator

So folks would be open to PRs to make beangulp importers work in beancount 2.3 vice versa?

Making importers using beangulp interfaces work in Beancount 2.3 yuo would need to patch Beancount. The Beancount 2.3 branch will receive only very important bugfixes: we do not have the resources to tend to it.

Patches to make importers using the beancount.ingest.ImporterProtocol interface work in beangulp are welcome.

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

No branches or pull requests

2 participants