Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorak0 committed Jan 22, 2024
0 parents commit c142245
Show file tree
Hide file tree
Showing 11 changed files with 811 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python Package using Conda

on: [push]

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install
run: |
pip install .
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include monthly_expenses/templates/*.html
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# fava-monthly-expenses

## Screenshot
![screenshot](./showcase.jpg)
## Get Started
add this line to your main beancount file:

```
2000-01-01 custom "fava-extension" "monthly_expenses" "{'accounts':['Expenses','Expenses:Life','Expenses:Life:Transportation'],'account_used_to_get_valid_month':'Expenses:Life:General'}"
```

`accounts` is the list of the accounts you hope to check in a deeper level.

`account_used_to_get_valid_month` is the account used for calculate number of month should be averaged (for now, months with more than 10 transactions considered valid).

## Credits
Inspred by [beancount-mutiperiod-reports](https://github.com/isabekov/beancount-multiperiod-reports). Thanks.

## Envelope Budget

I like the idea of [Envelope Budgeting](https://www.ynab.com/what-is-a-cash-envelope-system/) a lot.
And I also found [fava-envelope](https://github.com/polarmutex/fava-envelope), which I tried but failed to get working.

I ended up realizing that having the averaged expenses is what I need. I use them to compare my spending with my implicit budget.

So I wrote this, as a simplifed way to implement envelope budget.

4 changes: 4 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: environment

dependencies:
- python=3.10
7 changes: 7 additions & 0 deletions example.beancount
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
2000-01-01 custom "fava-extension" "monthly_expenses" "{'accounts':['Expenses','Expenses:Life','Expenses:Life:Transportation'],'account_used_to_get_valid_month':'Expenses:Life:General'}"

option "operating_currency" "USD"
plugin "beancount.plugins.auto"

include "example_data.beancount"

Loading

0 comments on commit c142245

Please sign in to comment.