Coder Social home page Coder Social logo

marstr / baronial Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 0.0 3.45 MB

git-inspired command line budgeting application

License: GNU General Public License v3.0

Makefile 8.80% Go 81.51% Shell 1.62% Perl 7.30% Batchfile 0.78%
accounting budgeting budgets finance money spending transaction-history

baronial's People

Contributors

dependabot[bot] avatar marstr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

baronial's Issues

Add `rebase` command

Creating the command rebase will allow users to replay transactions on top of another branch. In cases where two people have ingested two independent accounts, this should be a very useful command.

Add `merge` command

Adding a command baronial merge {RefSpec} should allow for users to reconcile differences between two transactions, and create a merge transaction.

Depends on marstr/envelopes#5

`checkout` doesn't recognized branches

System Information
Version:  v0.1.0-modified
System: linux/amd64
Go:  go1.12.5
Source Revision:  6b9ff93f8ffce67ea359beee4ab38ab36af3d96f

What did you do?

Create a branch using baronial branch myName, then execute baronial checkout myName.

What did you expect to happen?

The state of the index should be replaced with the state of the transaction pointed to by the branch specified.

What actually happened?

The branch myName isn't recognized, and tries to be interpreted directly as a commit ID.

Stack Trace
FATA[0000] encoding/hex: invalid byte: U+006D 'm'

panic when rev-parsing to a non-existent commit

When providing rev-parse a refspec that overshoots the end of transactions, there is an ugly panic that pops up. The cause of the panic should be fixed, and a formatted error should be printed instead.

System Information
Version:  v0.1.0-modified
System: linux/amd64
Go:  go1.12.5
Source Revision:  da783cf2009ac6f75a8cfa74529ca921ef70ec8e

Add command for listing existing branches

If one is just trying to figure out what options they have for checking out, and they'd like to know what branches are present, there should be a simple command for this. The syntax baronial branch seems sufficient.

`log` command should detect interactive sessionand use paged output

When running baronial log in a terminal, it is super annoying to have to remember to pipe the result into less or Out-Host yourself. This command should be able to detect that it is connected to an interactive session and do this for you.

When it is not connected to an interactive session, paging shouldn't be used.

`commit` doesn't respect branches

System Information
Version:  v0.1.0-modified
System: linux/amd64
Go:  go1.12.5
Source Revision:  05632a81f6a19a425a115968ece5c855434c5390

What did you do?

Stage transactions, then execute baronial commit.

What did you expect to happen?

Commit updates the branch currently checked-out.

What actually happened?

Commit updates current.txt directly, putting the user back in headless mode.

Running `baronial show` on the first transaction causes a fatal error

After committing a transaction, if you run baronial show <id> on that first transaction id, you get the following error message:

FATA[0000] open C:\Users\flub\finances/.baronial/objects/0000000000000000000000000000000000000000.json: The system cannot find the file specified.

Unhelpful error message when providing bad "amount" value

System Information
Version:  v0.2.0-modified
System: windows/amd64
Go:  go1.15.5
Source Revision:  26f4536fb5d055965e1f30acae1be8ad16438d25

What did you do?

I tried to commit a transaction - but I accidentally used the "-a" flag instead of the "-t" flag to indicate the "Actual Time" of the transaction.

What did you expect to happen?

An error message indicating which argument was invalid, what it got, what it expected, that kinda thing.

What actually happened?

Error text that looks like its straight from the Go libraries error value showed up. Super unhelpful to a user, caused the author of this tool some pause, imagine what it would be like for other people.

Stack Trace
FATA[0000] unable to find balance in text

Add command for creating a tag

Tags are like branches, but immutable. A command should be available for creating a new tag. The syntax baronial tag {name} [RefSpec] where HEAD is the implict RefSpec feels appropriate.

make.bat should offer docker build modes

At time of writing, make.bat only productes cross-compiled binaries. If you want to actually play around with something distro-specific (working with the packaging, for example.) You'd have to manually build the docker images.

Auto-completed account name format doesn't match transactions in log command

System Information
Version:  v0.1.1-modified
System: windows/amd64
Go:  go1.12.7
Source Revision:  af91355be2f7c0d8e5ec5ea2843d2964b7ab0ff9

What did you do?

baronial log .\accounts\my_bank\myaccount\

What did you expect to happen?

The transactions impacting my account should have been printed.

What actually happened?

No transactions were found.

When I rearranged the input to mimic a unix-based command, i.e.

baronial log accounts/my_bank/myaccounts

I got the expected results.

Index File Handles are not released

System Information
Version:  v0.1.0-modified
System: windows/amd64
Go:  go1.12.7
Source Revision:  05632a81f6a19a425a115968ece5c855434c5390

What did you do?

baronial checkout {a transactionid}

What did you expect to happen?

The index should have been updated to hold the values of the state after a particular transaction.

What actually happened?

The operation failed with some error text.

Stack Trace
WARN[0000] checking out a RefSpec that isn't a branch can cause data loss
FATA[0000] remove {cash.txt location}: The process cannot access the file because it is being used by another process.

diff fails on empty repository

System Information
Version:  v0.2.0-alpha-modified
System: linux/amd64
Go:  go1.14.2
Source Revision:  16abc7be5a5ad17a0aeb0f1a7815f5e13a67bd1b

What did you do?

baronial init
mkdir accounts/checking
mkdir -p budget/food/grocery
baronial credit 10.89 ./accounts/checking/ ./budget/food/grocery/
baronial diff

What did you expect to happen?

A summary of the 10.89 being added to the checking account and grocery budget should have been printed.

What actually happened?

An error message was spat out, complaining that 0000000000000000000000000000000000000000.json doesn't exist.

Stack Trace
ERRO[0000] open /home/marstr/.tmp/tmp.7w3FkcD1mq/.baronial/objects/0000000000000000000000000000000000000000.json: no such file or directory 
Error: exec: not started
Usage:
  baronial diff [refspec] [refspec] [flags]

Flags:
-h, --help help for diff

exec: not started

`diff` command can't handle arguments

Version Information:

Version: v0.1.2-modified
System: windows/amd64
Go: go1.13.3
Source Revision: c6011b0

When you provide any arguments to the diff command, the following stack trace pops up:

[signal 0xc0000005 code=0x0 addr=0x18 pc=0x82633c]

goroutine 1 [running]:
c000076010, 0xc00008c090, 0x28, ...)
        C:/Users/marstr/go/pkg/mod/github.com/marstr/[email protected]/persist/refspec.go:164 +0x18c
github.com/marstr/envelopes/persist.RefSpecResolver.Resolve(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9e8420, 0xc000076010, 0xc00008c090, 0x28, ...)
        C:/Users/marstr/go/pkg/mod/github.com/marstr/[email protected]/persist/refspec.go:59 +0xac
github.com/marstr/baronial/cmd.diffCmd.processArgs(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        C:/code/github.com/marstr/baronial/cmd/diff.go:73 +0x135
github.com/spf13/cobra.(*Command).ValidateArgs(...)
        C:/Users/marstr/go/pkg/mod/github.com/spf13/[email protected]/command.go:880
github.com/spf13/cobra.(*Command).execute(0xc0002a6000, 0xc000053a80, 0x1, 0x1, 0xc0002a6000, 0xc000053a80)
        C:/Users/marstr/go/pkg/mod/github.com/spf13/[email protected]/command.go:735 +0x5e0
github.com/spf13/cobra.(*Command).ExecuteC(0xcf22a0, 0x43e3a1, 0xcb45a0, 0xc00004ff50)
        C:/Users/marstr/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2f1
github.com/spf13/cobra.(*Command).Execute(...)
        C:/Users/marstr/go/pkg/mod/github.com/spf13/[email protected]/command.go:800
github.com/marstr/baronial/cmd.Execute()
        C:/code/github.com/marstr/baronial/cmd/root.go:47 +0x38
main.main()
        C:/code/github.com/marstr/baronial/main.go:21 +0x27

I still think that just baronial diff is the most important command, but this should get fixed up before v0.1.3

Support Fedora 31

Fedora 31 is slated to be released in late October, 2019. At time of writing, baronial is built for Fedora 29 and 30. Fedora 29 should be dropped, and Fedora 31 should be adopted.

`baronial show` doesn't accept `HEAD` as an argument

System Information
Version:  v0.1.1-modified
System: windows/amd64
Go:  go1.12.5
Source Revision:  64e63948e75a5205c535d2dd0a983e650acaed8a

What did you do?

Execute the following command:

baronial show HEAD

What did you expect to happen?

A summary of the most recent committed transaction on the currently checked out branch should have been printed.

What actually happened?

An error message is returned, because it can't recognize the letter 'H' as a hex digit.

Stack Trace
FATA[0000] encoding/hex: invalid byte: U+0048 'H'

Fix CI

Azure Pipelines can't seem to handle modules for some reason. I've got to figure something out.

`baronial init` creates repository in headless mode

System Information
Version:  v0.1.1-modified
System: windows/amd64
Go:  go1.12.7
Source Revision:  e36b2587bf45fd06a2863ec5eb5ad57c0f2cb51d

What did you do?

Run baronial init.

What did you expect to happen?

Baronial should create a repository using the default branch.

What actually happened?

The repository is created in headless mode.

Add `cherry-pick` command

This will be a simpler case of rebase, and is scoped to applying the impacts of a transaction onto a different branch.

Related to #36.

Amount is not correctly Hydrated in Windows

Run baronial commit -h or any other command that automatically determines a transaction's amount. The result will always be zero.

Environment information:

Version:  v0.1.0-modified
System: windows/amd64
Go:  go1.12.5
Source Revision:  18100832d695898189fb7b8d8d47371ed91ae6ed

Package for Debian

Similar to how an RPM spec exists in the packaging directory today, I'd like to have creating Debian packages be part of each master build. I really like the way I have it setup for Red Hat based distributions to also produce a couple of container images, and to use those to build the actual binary and source packages.

The hope is to make it super trivial for folks who don't have Go installed on their Debian/Ubuntu systems, or don't want to build this project from source to try the project.

To call this item complete, we should be able to build both source and binary packages as part of each Azure DevOps build.

Pulling files from OneDrive causes `baronial bal` to timeout

System Information
Version:  v0.1.1-modified
System: windows/amd64
Go:  go1.12.7
Source Revision:  e36b2587bf45fd06a2863ec5eb5ad57c0f2cb51d

What did you do?

On a computer that freshly has OneDrive installed, but without any of the files downloaded yet, I ran baronial bal.

What did you expect to happen?

While it might take a while, I expect baronial bal to behave as normal and start the requests for all of the files it needs to be pulled.

What actually happened?

The context passed to it expired after a few seconds, and it terminated. Note, I ran baronial log and it behaved as expected, it just took half an hour to pull down all of history.

`make.bat` should detect when Perl is not installed

System Information
Version:  v0.1.1-modified
System: windows/amd64
Go:  go1.12.7
Source Revision:  af91355be2f7c0d8e5ec5ea2843d2964b7ab0ff9

What did you do?

Clone this repository onto a Windows machine that does not have a perl install, and execute .\make.bat install

What did you expect to happen?

make.bat should fail and report that perl must be installed to continue.

What actually happened?

perl is invoked, but the installation continues anyway. This can lead to system information being reported that doesn't capture version/revision information, or even worse garbage being used for those values.

Stack Trace
[Copy&Paste the error message that you got here.]

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.