Skip to content

Commit

Permalink
updated doc strings for config file usage
Browse files Browse the repository at this point in the history
added test stub for smell
  • Loading branch information
SmithSamuelM committed Mar 6, 2024
1 parent 344bbf1 commit abde87e
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 8 deletions.
29 changes: 29 additions & 0 deletions src/keri/app/configing.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,35 @@ class Configer(filing.Filer):
Attributes: (see Filer for inherited attributes)
human (bool): True (default) means use human friendly HJSON when fext is JSON
config file json or hjon
{
"dt": "2021-01-01T00:00:00.000000+00:00",
"nel":
{
"dt": "2021-01-01T00:00:00.000000+00:00",
"curls":
[
"tcp://localhost:5621/"
]
},
"iurls":
[
"tcp://localhost:5620/?role=peer&name=tam"
],
"durls":
[
"http://127.0.0.1:7723/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy",
"http://127.0.0.1:7723/oobi/EMhvwOlyEJ9kN4PrwCpr9Jsv7TxPhiYveZ0oP3lJzdEi",
],
"wurls":
[
"http://127.0.0.1:5644/.well-known/keri/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy?name=Root"
]
}
"""
TailDirPath = "keri/cf"
CleanTailDirPath = "keri/clean/cf"
Expand Down
59 changes: 51 additions & 8 deletions src/keri/app/habbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,13 +804,34 @@ def reconfigure(self):
"""Apply configuration from config file managed by .cf. to this Habery
Process any oobis or endpoints
conf
config file json or hjon
{
dt: "isodatetime",
curls: ["tcp://localhost:5620/"],
iurls: ["tcp://localhost:5621/?name=eve"],
"dt": "2021-01-01T00:00:00.000000+00:00",
"nel":
{
"dt": "2021-01-01T00:00:00.000000+00:00",
"curls":
[
"tcp://localhost:5621/"
]
},
"iurls":
[
"tcp://localhost:5620/?role=peer&name=tam"
],
"durls":
[
"http://127.0.0.1:7723/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy",
"http://127.0.0.1:7723/oobi/EMhvwOlyEJ9kN4PrwCpr9Jsv7TxPhiYveZ0oP3lJzdEi",
],
"wurls":
[
"http://127.0.0.1:5644/.well-known/keri/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy?name=Root"
]
}
Config file is meant to be read only at init not changed by app at
run time. Any dynamic app changes must go in database not config file
that way we don't have to worry about multiple writers of cf.
Expand Down Expand Up @@ -1122,13 +1143,35 @@ def reconfigure(self):
Assumes that .pre and signing keys have been setup in order to create
own endpoint auth when provided in .cf.
conf
config file json or hjon
{
dt: "isodatetime",
curls: ["tcp://localhost:5620/"],
iurls: ["tcp://localhost:5621/?name=eve"]
"dt": "2021-01-01T00:00:00.000000+00:00",
"nel":
{
"dt": "2021-01-01T00:00:00.000000+00:00",
"curls":
[
"tcp://localhost:5621/"
]
},
"iurls":
[
"tcp://localhost:5620/?role=peer&name=tam"
],
"durls":
[
"http://127.0.0.1:7723/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy",
"http://127.0.0.1:7723/oobi/EMhvwOlyEJ9kN4PrwCpr9Jsv7TxPhiYveZ0oP3lJzdEi",
],
"wurls":
[
"http://127.0.0.1:5644/.well-known/keri/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy?name=Root"
]
}
Config file is meant to be read only at init not changed by app at
run time. Any dynamic app changes must go in database not config file
that way we don't have to worry about multiple writers of cf.
Expand Down
10 changes: 10 additions & 0 deletions tests/test_kering.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,20 @@ def test_ilks():
"""End Test """


def test_smell():
"""
Test smell function to parse into Serializations
"""
pass

"""End Test"""


if __name__ == "__main__":
test_protos()
test_version_regex()
test_serials()
test_versify_v1()
test_versify_v2()
test_ilks()
test_smell()

0 comments on commit abde87e

Please sign in to comment.