Skip to content

Conversation

@boogiewookie
Copy link

Allow passing standalone_mode=True to Ingest.call() so it exits normally rather than calling sys.exit(0). That
allows further processing afterward. In my use case, after extracting the transactions from ofx/csv, I want to extract balances from pdfs for comparison, then split the output lines into multiple journal files.

I also tweaked the Makefile as it was complaining .../uv/builds-v0/.tmp88uxMu/bin/python: No module named pytest

Makefile Outdated
test:
(env -u PYTHONPATH uv run --isolated --python 3.13 python -m pytest)
(env -u PYTHONPATH uv run --isolated --python 3.13 \
sh -c "uv pip install petl pytest && python -m pytest")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do this; instead use uv run --with petl or somesuch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I wasn't previously aware of --with. That's so much cleaner.

@blais
Copy link
Member

blais commented Jun 26, 2025

LGTM. Please make the one change I'm requesting (in both places).

@dnicolodi
Copy link
Collaborator

Also please stick to the conventional format for commit messages.

By allowing kwargs, one can pass standalone_mode=False. That makes ingest()
return normally rather than calling sys.exit(0). That provides a chance for
further processing, for instance splitting the output into multiple files.
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.

3 participants