Skip to content

Commit abde87e

Browse files
committed
updated doc strings for config file usage
added test stub for smell
1 parent 344bbf1 commit abde87e

File tree

3 files changed

+90
-8
lines changed

3 files changed

+90
-8
lines changed

src/keri/app/configing.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,35 @@ class Configer(filing.Filer):
4040
4141
Attributes: (see Filer for inherited attributes)
4242
human (bool): True (default) means use human friendly HJSON when fext is JSON
43+
44+
45+
46+
config file json or hjon
47+
48+
{
49+
"dt": "2021-01-01T00:00:00.000000+00:00",
50+
"nel":
51+
{
52+
"dt": "2021-01-01T00:00:00.000000+00:00",
53+
"curls":
54+
[
55+
"tcp://localhost:5621/"
56+
]
57+
},
58+
"iurls":
59+
[
60+
"tcp://localhost:5620/?role=peer&name=tam"
61+
],
62+
"durls":
63+
[
64+
"http://127.0.0.1:7723/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy",
65+
"http://127.0.0.1:7723/oobi/EMhvwOlyEJ9kN4PrwCpr9Jsv7TxPhiYveZ0oP3lJzdEi",
66+
],
67+
"wurls":
68+
[
69+
"http://127.0.0.1:5644/.well-known/keri/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy?name=Root"
70+
]
71+
}
4372
"""
4473
TailDirPath = "keri/cf"
4574
CleanTailDirPath = "keri/clean/cf"

src/keri/app/habbing.py

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -804,13 +804,34 @@ def reconfigure(self):
804804
"""Apply configuration from config file managed by .cf. to this Habery
805805
Process any oobis or endpoints
806806
807-
conf
807+
config file json or hjon
808+
808809
{
809-
dt: "isodatetime",
810-
curls: ["tcp://localhost:5620/"],
811-
iurls: ["tcp://localhost:5621/?name=eve"],
810+
"dt": "2021-01-01T00:00:00.000000+00:00",
811+
"nel":
812+
{
813+
"dt": "2021-01-01T00:00:00.000000+00:00",
814+
"curls":
815+
[
816+
"tcp://localhost:5621/"
817+
]
818+
},
819+
"iurls":
820+
[
821+
"tcp://localhost:5620/?role=peer&name=tam"
822+
],
823+
"durls":
824+
[
825+
"http://127.0.0.1:7723/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy",
826+
"http://127.0.0.1:7723/oobi/EMhvwOlyEJ9kN4PrwCpr9Jsv7TxPhiYveZ0oP3lJzdEi",
827+
],
828+
"wurls":
829+
[
830+
"http://127.0.0.1:5644/.well-known/keri/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy?name=Root"
831+
]
812832
}
813833
834+
814835
Config file is meant to be read only at init not changed by app at
815836
run time. Any dynamic app changes must go in database not config file
816837
that way we don't have to worry about multiple writers of cf.
@@ -1122,13 +1143,35 @@ def reconfigure(self):
11221143
Assumes that .pre and signing keys have been setup in order to create
11231144
own endpoint auth when provided in .cf.
11241145
1125-
conf
1146+
config file json or hjon
1147+
11261148
{
1127-
dt: "isodatetime",
1128-
curls: ["tcp://localhost:5620/"],
1129-
iurls: ["tcp://localhost:5621/?name=eve"]
1149+
"dt": "2021-01-01T00:00:00.000000+00:00",
1150+
"nel":
1151+
{
1152+
"dt": "2021-01-01T00:00:00.000000+00:00",
1153+
"curls":
1154+
[
1155+
"tcp://localhost:5621/"
1156+
]
1157+
},
1158+
"iurls":
1159+
[
1160+
"tcp://localhost:5620/?role=peer&name=tam"
1161+
],
1162+
"durls":
1163+
[
1164+
"http://127.0.0.1:7723/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy",
1165+
"http://127.0.0.1:7723/oobi/EMhvwOlyEJ9kN4PrwCpr9Jsv7TxPhiYveZ0oP3lJzdEi",
1166+
],
1167+
"wurls":
1168+
[
1169+
"http://127.0.0.1:5644/.well-known/keri/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy?name=Root"
1170+
]
11301171
}
11311172
1173+
1174+
11321175
Config file is meant to be read only at init not changed by app at
11331176
run time. Any dynamic app changes must go in database not config file
11341177
that way we don't have to worry about multiple writers of cf.

tests/test_kering.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,20 @@ def test_ilks():
544544
"""End Test """
545545

546546

547+
def test_smell():
548+
"""
549+
Test smell function to parse into Serializations
550+
"""
551+
pass
552+
553+
"""End Test"""
554+
555+
547556
if __name__ == "__main__":
548557
test_protos()
549558
test_version_regex()
550559
test_serials()
551560
test_versify_v1()
552561
test_versify_v2()
553562
test_ilks()
563+
test_smell()

0 commit comments

Comments
 (0)