Skip to content

Commit 6224a35

Browse files
committed
data
1 parent d30934e commit 6224a35

7 files changed

Lines changed: 42 additions & 11 deletions

File tree

data/test.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
┌──────────┬────────────┬──────┬───────────┬────────────────────────────────────────────────────────────┐
2+
│ A-number │ Triangle │ Form │ Function │ Sequence │
3+
├──────────┼────────────┼──────┼───────────┼────────────────────────────────────────────────────────────┤
4+
│ A000302 │ Binomial │ Std │ PolyVal3 │ 1, 4, 16, 64, 256, 1024, 4096, 16384 │
5+
│ A001333 │ SchroederB │ Inv │ AltSum │ 1, -1, 3, -7, 17, -41, 99, -239 │
6+
│ A006012 │ SchroederL │ Inv │ AltSum │ 1, -2, 6, -20, 68, -232, 792, -2704 │
7+
│ A026302 │ Motzkin │ Rev │ Central │ 1, 2, 9, 44, 230, 1242, 6853, 38376 │
8+
│ A025167 │ Laguerre │ Std │ PosHalf │ 1, 3, 17, 139, 1473, 19091, 291793, 5129307 │
9+
│ A103194 │ Laguerre │ Std │ TransNat0 │ 0, 1, 6, 39, 292, 2505, 24306, 263431 │
10+
│ C000262 │ Laguerre │ Std │ TransNat1 │ 1, 3, 13, 73, 501, 4051, 37633, 394353 │
11+
│ A103194 │ Lah │ Std │ TransSqrs │ 0, 1, 6, 39, 292, 2505, 24306, 263431 │
12+
│ A111884 │ Lah │ Std │ TransAlts │ 1, -1, -1, -1, 1, 19, 151, 1091 │
13+
│ A111884 │ Lah │ Std │ TransAlts │ 1, -1, -1, -1, 1, 19, 151, 1091 │
14+
│ nothing │ Laguerre │ Rev │ TransNat1 │ 1, 3, 15, 97, 753, 6771, 68983, 783945, 9820737, 134352163 │
15+
└──────────┴────────────┴──────┴───────────┴────────────────────────────────────────────────────────────┘

docs/src/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ ZSeq
436436
ZTri
437437
```
438438
```@docs
439+
datapath
440+
```
441+
```@docs
439442
oeis_notinstalled
440443
```
441444
```@docs

src/IntegerTriangles.jl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# This file is part of IntegerTriangles.jl.
1+
# This file is part of IntegerTriangles.
22
# Copyright Peter Luschny. License is MIT.
33

4-
# Version of: UTC 2021-05-04 11:22:21
5-
# 3b094590-acba-11eb-377b-c520021abd64
4+
# Version of: UTC 2021-05-04 12:10:53
5+
# 02469da0-acc1-11eb-2334-878b440003ef
66

77
# Do not edit this file, it is generated from the modules and will be overwritten!
88
# Edit the modules in the src directory and build this file with BuildTriangles.jl!
@@ -160,6 +160,7 @@ ZPolyRing,
160160
ZPolySeq,
161161
ZSeq,
162162
ZTri,
163+
datapath,
163164
oeis_notinstalled,
164165
oeis_search,
165166
profilepath,
@@ -1772,7 +1773,6 @@ function AllPrettyTraits()
17721773
for T in Triangles
17731774
println("-- ", T[1])
17741775
PrettyTraits(Triangles[T[1]](32), T[1])
1775-
println(".")
17761776
end
17771777
end
17781778
# *** TrianglesTraitCard.jl ****************
@@ -2023,6 +2023,12 @@ const ROOTDIR = dirname(srcdir)
20232023
const datadir = joinpath(ROOTDIR, "data")
20242024
oeis_file() = joinpath(datadir, "stripped")
20252025
is_oeis_installed() = isfile(oeis_file())
2026+
function datapath(name)
2027+
srcdir = realpath(joinpath(dirname(@__FILE__)))
2028+
ROOTDIR = dirname(srcdir)
2029+
datadir = joinpath(ROOTDIR, "data")
2030+
datapath = joinpath(datadir, name)
2031+
end
20262032
function profilepath(name)
20272033
srcdir = realpath(joinpath(dirname(@__FILE__)))
20282034
ROOTDIR = dirname(srcdir)

src/TrianglesTables.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function test()
100100
# ... as Html:
101101
# pretty_table(data, header, backend = :html, alignment=[:l,:l,:l,:l,:l])
102102

103-
path = profilepath("test")
103+
path = datapath("test.md")
104104
rm(path; force=true)
105105
open(path, "w") do io
106106
pretty_table(io, mat, header, alignment=[:l,:l,:l,:l,:l])

src/TrianglesUtils.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module TrianglesUtils
77

88
using Nemo, TrianglesBase, HTTP
99
export Show, GetSeqnum, GetSeqnumUri, SeqToString
10-
export profilepath, oeis_search, oeis_notinstalled, search_failed
10+
export profilepath, datapath, oeis_search, oeis_notinstalled, search_failed
1111

1212
"""
1313
Search the OEIS for a sequence. Saved a file in the 'data' directory in json format. Ect.
@@ -21,6 +21,13 @@ const datadir = joinpath(ROOTDIR, "data")
2121
oeis_file() = joinpath(datadir, "stripped")
2222
is_oeis_installed() = isfile(oeis_file())
2323

24+
function datapath(name)
25+
srcdir = realpath(joinpath(dirname(@__FILE__)))
26+
ROOTDIR = dirname(srcdir)
27+
datadir = joinpath(ROOTDIR, "data")
28+
datapath = joinpath(datadir, name)
29+
end
30+
2431
function profilepath(name)
2532
srcdir = realpath(joinpath(dirname(@__FILE__)))
2633
ROOTDIR = dirname(srcdir)

test/perftests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file is part of IntegerTriangles.
22
# Copyright Peter Luschny. License is MIT.
33

4-
# Version of: UTC 2021-05-04 11:22:21
5-
# 3b0e2790-acba-11eb-0e89-8f0acabb7477
4+
# Version of: UTC 2021-05-04 12:10:53
5+
# 0249aae0-acc1-11eb-3161-ed72dbb321db
66

77
# Do not edit this file, it is generated from the modules and will be overwritten!
88
# Edit the modules in the src directory and build this file with BuildTriangles.jl!

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file is part of IntegerTriangles.
22
# Copyright Peter Luschny. License is MIT.
33

4-
# Version of: UTC 2021-05-04 11:22:21
5-
# 3b0e0080-acba-11eb-1750-93ac976570bf
4+
# Version of: UTC 2021-05-04 12:10:53
5+
# 0249aae0-acc1-11eb-0389-79ddecb45274
66

77
# Do not edit this file, it is generated from the modules and will be overwritten!
88
# Edit the modules in the src directory and build this file with BuildTriangles.jl!
@@ -54,7 +54,7 @@ mat = [mat; reshape(L, 1, 5)]
5454
L = Explore("Laguerre", "Rev", "TransNat1")
5555
mat = [mat; reshape(L, 1, 5)]
5656
pretty_table(mat, header, alignment=[:l,:l,:l,:l,:l])
57-
path = profilepath("test")
57+
path = datapath("test.md")
5858
rm(path; force=true)
5959
open(path, "w") do io
6060
pretty_table(io, mat, header, alignment=[:l,:l,:l,:l,:l])

0 commit comments

Comments
 (0)