Giter VIP home page Giter VIP logo

monthly_budget's Introduction

MonthlyBudget

CSV ---serde---> BTreeMap ---serde---> CSV

data setup

  • data/
    • events => user-entered payment events
      • one_off.json
      • recurring.json
    • init/ => provide initial values
      • account_balances.csv
      • accounts.csv
      • amounts.csv
      • expenses.csv
      • incomes.csv
      • payments.csv
      • payments_received.csv
    • reports/ => output

to run

  • cargo run -- -s {"YYYY-MM"} -e {"YYYY-MM"} -p {"/path/to/directory/data"} -x {"t/f"}
    • -s, -start_yyyy_mm starting month
    • -e, -end_yyyy_mm ending month
    • -p, -path
      • path to data directory
      • Optional. Default: data/
    • -x, -x_test
      • run test from main()
      • name chosen to avoid collision
      • Optional. Default: f

file structure

  • data/ (see above)
  • src/
    • app/
      • cli.rs
    • calendar/
      • calendar_slice.rs
      • day.rs
      • month.rs
      • month_key.rs
      • year_month.rs
    • composite/
      • account_summary.rs
      • payment_composite.rs
      • payment_display.rs
      • payment_event.rs
      • payment_received_composite.rs
      • payment_summary.rs
      • recurring_payment_event.rs
    • error/
      • error_handler.rs
      • error_log
    • programs/
      • calendar_slice_model.rs
      • month_model.rs
    • schema/
      • account.rs
      • account_balance.rs
      • amount.rs
      • expense.rs
      • income.rs
      • payment.rs
      • payment_received.rs
    • storage/
      • store.rs
    • test/
      • data/
        • events
        • init
        • reports
      • end_to_end/
        • calendar_slice_model
          • data
            • events
            • init
            • reports
          • csm_test.rs
      • spec.rs
    • traits/
      • csv_record.rs
      • csv_store.rs
      • file_io.rs

================================

Nathan S

This code is available as open source under the terms of the MIT License.

monthly_budget's People

Contributors

nathanielbellamy avatar

Stargazers

Mike avatar Andrew Wray avatar

Watchers

 avatar

monthly_budget's Issues

Analyze RecurrenceState

#AC

  • determine if RecurrenceState is worth keeping around
  • if so, demonstrate use,
  • if not, get rid of it

##thoughts

  • may help save some .active switching

Add spec::factory

AC

  • all functions used to instantiate example structs in specs are moved to be functions implemented on a Factory struct in the /spec

Handle Account Transfers

Account transfers amount to one Payment record and one PaymentReceived record. Allow event_type to equal transfer.

  • Will need to parse additional information of to_account and from_account

Add Lib

PR
It would be nice to have both lib and main

Recurring Events

PR

Base Branch - #8

AC:

  • user builds "recurring_payment_events.csv/json"
  • CalendarSliceModel inits PaymentEventMonthBinsand saves recurring events to appropriate bucket
  • impliment Recurrence struct in /schema
    • RecurringPaymentEvent struct in /composite
    • allow user to differentiate recurring payment events frequency
pub enum Every {
    Week,
    TwoWeeks, // e.g. bi-monthly paycheck
    Month, // e.g. mortgage
    TwoMonths,
    ThreeMonths, // e.g. dog haircut
    FourMonths // e.g. water bill
}

// or

pub enum Every {
    Days(u8), // Every::Days(2) = every other day
    Weeks(u8), // Every::Weeks(2) = every other week
    Months(u8), // Every::Months(6) = twice a year
    Years(u8) // Every::Years(10) = once per decade
}

Impliment Cli

PR

AC

  • add cli functionality using clap
  • pass in required start:String and end:String args
    • MMMM-YY
  • pass in optional input and output path arguments
  • program is valid with any valid start and end passed in
    • validate start < end
    • does not rely on payment_events.json to match date range passed in through cli
  • update README with how to run
    • cargo run -- -s YYYY-MM -e YYYY-MM

One Off Events w/ Forecasting

AC

  • is blocked by: #5

    • refactoring done in and structs implemented by #5 will likely impact the implementation here
  • user prepares one_off_payment_events.csv/json

  • events that fall outside of passed in start and end are discarded

  • CalendarSliceModel bins events on init

  • cli options for forecasting

    • user can set probability of events
    • model adds events into the future according to probability
    • perhaps model learns probability per event from passed in data

Batch Large Inputs

#AC

  • For large date ranges, operations are batched in order to limit memory usage

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.