rename data/ to examples/

This commit is contained in:
Simon Michael 2017-01-08 05:20:04 -08:00
parent 20651ec426
commit 3ae8712bbc
31 changed files with 124 additions and 124 deletions

View File

@ -49,7 +49,7 @@ help2: \
export LANG?=en_US.UTF-8
# command to run during profiling (time and heap)
PROFCMD=stack exec -- hledgerprof balance -f data/10000x1000x10.journal >/dev/null
PROFCMD=stack exec -- hledgerprof balance -f examples/10000x1000x10.journal >/dev/null
#PROFRTSFLAGS=-p
PROFRTSFLAGS=-P
@ -722,7 +722,7 @@ quickbench: samplejournals bench.sh \
quickprof-%: hledgerprof samplejournals \
$(call def-help,quickprof-"CMD", run some command against a sample journal and display the execution profile )
$(STACK) exec -- hledgerprof +RTS $(PROFRTSFLAGS) -RTS $* -f data/10000x1000x10.journal >/dev/null
$(STACK) exec -- hledgerprof +RTS $(PROFRTSFLAGS) -RTS $* -f examples/10000x1000x10.journal >/dev/null
profiteur hledgerprof.prof
@echo
@head -20 hledgerprof.prof
@ -748,7 +748,7 @@ quickprof-%: hledgerprof samplejournals \
quickheap-%: hledgerprof samplejournals \
$(call def-help,quickheap-"CMD", run some command against a sample journal and display the heap profile )
$(STACK) exec -- hledgerprof +RTS -hc -RTS $* -f data/10000x1000x10.journal >/dev/null
$(STACK) exec -- hledgerprof +RTS -hc -RTS $* -f examples/10000x1000x10.journal >/dev/null
hp2ps hledgerprof.hp
@echo generated hledgerprof.ps
$(VIEWPS) hledgerprof.ps
@ -812,50 +812,50 @@ ghcid-lib-doctest:
ghcid --command 'cd hledger-lib; $(STACK) ghci hledger-lib:test:doctests' --test ':main' --reload hledger-lib
samplejournals: \
data/sample.journal \
data/100x100x10.journal \
data/1000x1000x10.journal \
data/1000x10000x10.journal \
data/10000x1000x10.journal \
data/10000x10000x10.journal \
data/100000x1000x10.journal \
data/1000000x1000x10.journal \
data/ascii.journal \
data/chinese.journal \
data/mixed.journal \
$(call def-help,samplejournals, regenerate standard sample journals in data/ )
examples/sample.journal \
examples/100x100x10.journal \
examples/1000x1000x10.journal \
examples/1000x10000x10.journal \
examples/10000x1000x10.journal \
examples/10000x10000x10.journal \
examples/100000x1000x10.journal \
examples/1000000x1000x10.journal \
examples/ascii.journal \
examples/chinese.journal \
examples/mixed.journal \
$(call def-help,samplejournals, regenerate standard sample journals in examples/ )
data/sample.journal:
examples/sample.journal:
true # XXX should probably regenerate this
data/100x100x10.journal: tools/generatejournal
examples/100x100x10.journal: tools/generatejournal
tools/generatejournal 100 100 10 >$@
data/1000x1000x10.journal: tools/generatejournal
examples/1000x1000x10.journal: tools/generatejournal
tools/generatejournal 1000 1000 10 >$@
data/1000x10000x10.journal: tools/generatejournal
examples/1000x10000x10.journal: tools/generatejournal
tools/generatejournal 1000 10000 10 >$@
data/10000x1000x10.journal: tools/generatejournal
examples/10000x1000x10.journal: tools/generatejournal
tools/generatejournal 10000 1000 10 >$@
data/10000x10000x10.journal: tools/generatejournal
examples/10000x10000x10.journal: tools/generatejournal
tools/generatejournal 10000 10000 10 >$@
data/100000x1000x10.journal: tools/generatejournal
examples/100000x1000x10.journal: tools/generatejournal
tools/generatejournal 100000 1000 10 >$@
data/1000000x1000x10.journal: tools/generatejournal
examples/1000000x1000x10.journal: tools/generatejournal
tools/generatejournal 1000000 1000 10 >$@
data/ascii.journal: tools/generatejournal
examples/ascii.journal: tools/generatejournal
tools/generatejournal 3 5 5 >$@
data/chinese.journal: tools/generatejournal
examples/chinese.journal: tools/generatejournal
tools/generatejournal 3 5 5 --chinese >$@
data/mixed.journal: tools/generatejournal
examples/mixed.journal: tools/generatejournal
tools/generatejournal 3 5 5 --mixed >$@
###############################################################################

6
dev.hs
View File

@ -33,10 +33,10 @@ import Hledger
-- instance NFData Regex
journal =
-- "data/10000x1000x10.journal"
"data/10000x1000x10.journal"
-- "examples/10000x1000x10.journal"
"examples/10000x1000x10.journal"
timeclock = "data/sample.timeclock"
timeclock = "examples/sample.timeclock"
timeit :: String -> IO a -> IO (Double, a)
timeit name action = do

View File

@ -889,7 +889,7 @@ abspat pat = if isnegativepat pat then drop (length negateprefix) pat else pat
-- tests
-- A sample journal for testing, similar to data/sample.journal:
-- A sample journal for testing, similar to examples/sample.journal:
--
-- 2008/01/01 income
-- assets:bank:checking $1

View File

@ -52,7 +52,7 @@ $ hledger -f t.timeclock print
```
Here is a
[sample.timeclock](https://raw.github.com/simonmichael/hledger/master/data/sample.timeclock) to
[sample.timeclock](https://raw.github.com/simonmichael/hledger/master/examples/sample.timeclock) to
download and some queries to try:
```shell

View File

@ -110,7 +110,7 @@ $ hledger -f t.timedot --alias /\\./=: bal date:2016/2/4
```
Here is a
[sample.timedot](https://raw.github.com/simonmichael/hledger/master/data/sample.timedot).
[sample.timedot](https://raw.github.com/simonmichael/hledger/master/examples/sample.timedot).
<!-- to download and some queries to try: -->
<!-- ```shell -->

View File

@ -13,7 +13,7 @@ With no report interval (@--monthly@ etc.), hledger's balance
command emulates ledger's, showing accounts indented according to
hierarchy, along with their total amount posted (including subaccounts).
Here's an example. With @data/sample.journal@, which defines the following account tree:
Here's an example. With @examples/sample.journal@, which defines the following account tree:
@
assets

View File

@ -19,7 +19,7 @@ You can use the command line:
or ghci:
> $ ghci hledger
> > j <- readJournalFile Nothing Nothing "data/sample.journal"
> > j <- readJournalFile Nothing Nothing "examples/sample.journal"
> > register [] ["income","expenses"] j
> 2008/01/01 income income:salary $-1 $-1
> 2008/06/01 gift income:gifts $-1 $-2

View File

@ -139,7 +139,7 @@ Example (see the [tutorial](step-by-step.html#record-a-transaction-with-hledger-
_shell_({{
$ hledger add
Adding transactions to journal file /src/hledger/data/sample.journal
Adding transactions to journal file /src/hledger/examples/sample.journal
Any command line arguments will be used as defaults.
Use tab key to complete, readline keys to edit, enter to accept defaults.
An optional (CODE) may follow transaction dates.
@ -511,7 +511,7 @@ Show some journal statistics.
```shell
$ hledger stats
Main journal file : /src/hledger/data/sample.journal
Main journal file : /src/hledger/examples/sample.journal
Included journal files :
Transactions span : 2008-01-01 to 2009-01-01 (366 days)
Last transaction : 2008-12-31 (2333 days ago)

View File

@ -1128,7 +1128,7 @@ Example (see the tutorial for a detailed explanation):
.nf
\f[C]
$\ hledger\ add
Adding\ transactions\ to\ journal\ file\ /src/hledger/data/sample.journal
Adding\ transactions\ to\ journal\ file\ /src/hledger/examples/sample.journal
Any\ command\ line\ arguments\ will\ be\ used\ as\ defaults.
Use\ tab\ key\ to\ complete,\ readline\ keys\ to\ edit,\ enter\ to\ accept\ defaults.
An\ optional\ (CODE)\ may\ follow\ transaction\ dates.
@ -2030,7 +2030,7 @@ A file extension matching one of the above formats selects that format.
.nf
\f[C]
$\ hledger\ stats
Main\ journal\ file\ \ \ \ \ \ \ \ :\ /src/hledger/data/sample.journal
Main\ journal\ file\ \ \ \ \ \ \ \ :\ /src/hledger/examples/sample.journal
Included\ journal\ files\ \ \ :\
Transactions\ span\ \ \ \ \ \ \ \ :\ 2008\-01\-01\ to\ 2009\-01\-01\ (366\ days)
Last\ transaction\ \ \ \ \ \ \ \ \ :\ 2008\-12\-31\ (2333\ days\ ago)

View File

@ -853,7 +853,7 @@ or press control-d or control-c to exit.
$ hledger add
Adding transactions to journal file /src/hledger/data/sample.journal
Adding transactions to journal file /src/hledger/examples/sample.journal
Any command line arguments will be used as defaults.
Use tab key to complete, readline keys to edit, enter to accept defaults.
An optional (CODE) may follow transaction dates.
@ -1672,7 +1672,7 @@ Show some journal statistics.
$ hledger stats
Main journal file : /src/hledger/data/sample.journal
Main journal file : /src/hledger/examples/sample.journal
Included journal files :
Transactions span : 2008-01-01 to 2009-01-01 (366 days)
Last transaction : 2008-12-31 (2333 days ago)
@ -2259,71 +2259,71 @@ Node: activity24597
Ref: #activity24709
Node: add25068
Ref: #add25169
Node: balance27828
Ref: #balance27941
Node: Flat mode30954
Ref: #flat-mode31081
Node: Depth limited balance reports31500
Ref: #depth-limited-balance-reports31703
Node: Multicolumn balance reports32124
Ref: #multicolumn-balance-reports32326
Node: Market value36975
Ref: #market-value37139
Node: Custom balance output38440
Ref: #custom-balance-output38613
Node: Output destination40717
Ref: #output-destination40882
Node: CSV output41152
Ref: #csv-output41271
Node: balancesheet41668
Ref: #balancesheet41796
Node: cashflow42448
Ref: #cashflow42565
Node: help43255
Ref: #help43367
Node: incomestatement44204
Ref: #incomestatement44334
Node: info45061
Ref: #info45168
Node: man45530
Ref: #man45627
Node: print46030
Ref: #print46135
Node: register47481
Ref: #register47594
Node: Custom register output52086
Ref: #custom-register-output52217
Node: stats53514
Ref: #stats53620
Node: test54496
Ref: #test54583
Node: ADD-ON COMMANDS54950
Ref: #add-on-commands55086
Node: api56374
Ref: #api56466
Node: autosync56500
Ref: #autosync56615
Node: diff58930
Ref: #diff59040
Node: equity59704
Ref: #equity59818
Node: interest61146
Ref: #interest61263
Node: irr64347
Ref: #irr64460
Node: print-unique66835
Ref: #print-unique66965
Node: rewrite67223
Ref: #rewrite67342
Node: ui67871
Ref: #ui67971
Node: web68012
Ref: #web68100
Node: TROUBLESHOOTING68133
Ref: #troubleshooting68252
Node: Run-time problems68306
Ref: #run-time-problems68449
Node: Known limitations70393
Ref: #known-limitations70536
Node: balance27832
Ref: #balance27945
Node: Flat mode30958
Ref: #flat-mode31085
Node: Depth limited balance reports31504
Ref: #depth-limited-balance-reports31707
Node: Multicolumn balance reports32128
Ref: #multicolumn-balance-reports32330
Node: Market value36979
Ref: #market-value37143
Node: Custom balance output38444
Ref: #custom-balance-output38617
Node: Output destination40721
Ref: #output-destination40886
Node: CSV output41156
Ref: #csv-output41275
Node: balancesheet41672
Ref: #balancesheet41800
Node: cashflow42452
Ref: #cashflow42569
Node: help43259
Ref: #help43371
Node: incomestatement44208
Ref: #incomestatement44338
Node: info45065
Ref: #info45172
Node: man45534
Ref: #man45631
Node: print46034
Ref: #print46139
Node: register47485
Ref: #register47598
Node: Custom register output52090
Ref: #custom-register-output52221
Node: stats53518
Ref: #stats53624
Node: test54504
Ref: #test54591
Node: ADD-ON COMMANDS54958
Ref: #add-on-commands55094
Node: api56382
Ref: #api56474
Node: autosync56508
Ref: #autosync56623
Node: diff58938
Ref: #diff59048
Node: equity59712
Ref: #equity59826
Node: interest61154
Ref: #interest61271
Node: irr64355
Ref: #irr64468
Node: print-unique66843
Ref: #print-unique66973
Node: rewrite67231
Ref: #rewrite67350
Node: ui67879
Ref: #ui67979
Node: web68020
Ref: #web68108
Node: TROUBLESHOOTING68141
Ref: #troubleshooting68260
Node: Run-time problems68314
Ref: #run-time-problems68457
Node: Known limitations70401
Ref: #known-limitations70544

End Tag Table

View File

@ -746,7 +746,7 @@ COMMANDS
Example (see the tutorial for a detailed explanation):
$ hledger add
Adding transactions to journal file /src/hledger/data/sample.journal
Adding transactions to journal file /src/hledger/examples/sample.journal
Any command line arguments will be used as defaults.
Use tab key to complete, readline keys to edit, enter to accept defaults.
An optional (CODE) may follow transaction dates.
@ -1419,7 +1419,7 @@ COMMANDS
above formats selects that format.
$ hledger stats
Main journal file : /src/hledger/data/sample.journal
Main journal file : /src/hledger/examples/sample.journal
Included journal files :
Transactions span : 2008-01-01 to 2009-01-01 (366 days)
Last transaction : 2008-12-31 (2333 days ago)

View File

@ -525,7 +525,7 @@ Finally, for quick, fine-grained performance measurements when troubleshooting o
### Generate sample journal files
Synthetic data files like `data/100x100x10.journal` are useful for benchmarks and testing.
Synthetic data files like `examples/100x100x10.journal` are useful for benchmarks and testing.
The numbers describe the number of transactions, number of accounts, and maximum account depth respectively.
They are generated by [`tools/generatejournal.hs`](https://github.com/simonmichael/hledger/blob/master/tools/generatejournal.hs).
They should be built as needed, if not you can use `make samplejournals` rule:
@ -535,15 +535,15 @@ $ make samplejournals
ghc tools/generatejournal.hs
[1 of 1] Compiling Main ( tools/generatejournal.hs, tools/generatejournal.o )
Linking tools/generatejournal ...
tools/generatejournal 100 100 10 >data/100x100x10.journal
tools/generatejournal 1000 1000 10 >data/1000x1000x10.journal
tools/generatejournal 1000 10000 10 >data/1000x10000x10.journal
tools/generatejournal 10000 1000 10 >data/10000x1000x10.journal
tools/generatejournal 10000 10000 10 >data/10000x10000x10.journal
tools/generatejournal 100000 1000 10 >data/100000x1000x10.journal
tools/generatejournal 3 5 5 >data/ascii.journal
tools/generatejournal 3 5 5 --chinese >data/chinese.journal
tools/generatejournal 3 5 5 --mixed >data/mixed.journal
tools/generatejournal 100 100 10 >examples/100x100x10.journal
tools/generatejournal 1000 1000 10 >examples/1000x1000x10.journal
tools/generatejournal 1000 10000 10 >examples/1000x10000x10.journal
tools/generatejournal 10000 1000 10 >examples/10000x1000x10.journal
tools/generatejournal 10000 10000 10 >examples/10000x10000x10.journal
tools/generatejournal 100000 1000 10 >examples/100000x1000x10.journal
tools/generatejournal 3 5 5 >examples/ascii.journal
tools/generatejournal 3 5 5 --chinese >examples/chinese.journal
tools/generatejournal 3 5 5 --mixed >examples/mixed.journal
```
### Run tests

View File

@ -1 +1 @@
../../data/balance-multicol.journal
../../examples/balance-multicol.journal

View File

@ -1 +1 @@
../../data/sample.journal
../../examples/sample.journal

View File

@ -1 +1 @@
../../data/alias.journal
../../examples/alias.journal

View File

@ -1 +1 @@
../../data/business.journal
../../examples/business.journal

View File

@ -1 +1 @@
../../data/personal.journal
../../examples/personal.journal

View File

@ -1 +1 @@
../../data/chinese.journal
../../examples/chinese.journal