diff --git a/README.md b/README.md index 3db50b7..5b7d3bb 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Note, though, that internationalisation files for languages other than British E The following severity levels are understood: - 0. `info` things which are not actuallys fault, but issues noted during + 0. `info` things which are not actually faults, but issues noted during validation; 1. `minor` things which I consider to be faults, but which don't actually breach the spec; diff --git a/docs/cloverage/codecov.json b/docs/cloverage/codecov.json index def2f8e..bb5d8b2 100644 --- a/docs/cloverage/codecov.json +++ b/docs/cloverage/codecov.json @@ -2,95 +2,90 @@ {"dog_and_duck/quack/picky/constants.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, null, null, null, - null, 1, null, null, null, null, 1, null, null, null, null, null, 1, - null, null, null, 1, null, 1, null, null, null, null, null, null, - null, null, null, null, null, 1, null, 1, null, 1, 1, 1, 1, 1, 1, - null, 1, null, null, null, null, 1, null, null, null, null, 1, null, - null, null, null], + null, null, null, null, null, 1, null, null, null, null, 1, null, + null, null, null, null, 1, null, null, null, 1, null, 1, null, null, + null, null, 1, null, null, null, null, null, null, null, null, null, + null, null, 1, null, 1, null, 1, 1, 1, 1, 1, 1, null, 1, null, null, + null, null, 1, null, null, null, null, 1, null, null, null, null, 1, + null, null, null, null, null, 1, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, 1, null, null, + null, 1, null], "dog_and_duck/quack/picky/utils.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, 1, - null, null, 7, null, 1, null, null, null, 0, null, 1, null, null, - null, null, null, 0, 0, 0, 0, 0, null, 1, null, null, 0, 0, 0, null, - null, null, null, true, null, null, 0, null, null, 1, null, null, - null, 4, null, 1, null, null, null, 0, 0, 0, 0, null, 1, null, null, - null, 3, 3, true, 3, null, 1, null, null, null, true, true, 45, 45, - 45, 70, 45, null, 0, 0, null, 0, 0, null, 1, null, null, null, null, - null, null, true, 162, 66, true, 6, null, null, null, 53, null, - null, 3, null, 1, null, null, null, null, null, null, null, null, - 220, 220, 220, 220, null, 220, null, 220, null, 220, 220, true, - null, 0, 0, null, 53, null, null, 2, 2, null, 1, null, null, null, - true, null, 1, null, null, null, null, null, null, 0, 0, 0, 0, 0, 0, - 0, 0, 0, null, 0, 0, 0, 0, 0, 0, null, 1, null, null, null, null, - null, null, null, null, null, 0, 0, null, 0, null, 3, null, null, - null, 3, null, 1, null, null, null, null, null, 0, null, 0, 0, null, - null, 1, null, null, null, null, null, null, true, 53, 53, 53, 3, - 53, 53, 41, 53, 9, 53, 16, null, 0, 0, 0, 0, 0, null, null, 1, null, + null, null, null, null, null, null, null, null, null, 1, null, null, + 7, null, 1, null, null, null, 1023, null, 1, null, null, null, true, + null, 1, null, null, null, null, null, null, null, null, null, true, + 1023, 1023, true, true, true, 1023, 140, null, 1, null, null, true, + 408, 352, null, null, null, null, 125, 122, 70, null, null, null, + true, null, null, 0, null, null, 1, null, null, null, 74, null, 1, + null, null, null, 70, 70, true, 70, null, 1, null, null, null, 3, 3, + true, 3, null, 1, null, null, null, true, 0, null, 0, 0, 16, true, + 11, 11, 11, true, 21, null, 11, null, 0, 0, null, 0, 0, null, 1, + null, null, null, null, null, null, true, 56, 47, true, 8, null, + null, null, 1, null, null, 1, null, 1, null, null, null, null, null, + null, null, null, 99, 99, 99, 99, null, 99, null, 99, null, 99, 99, + true, null, 0, 0, null, 115, null, null, 2, 2, null, 1, null, null, + null, true, null, 1, null, null, null, null, null, null, 12, 12, 12, + true, true, 0, 0, 0, 0, 0, 0, 0, 0, null, 0, 0, 0, 0, 1, null, 1, + null, null, null, null, null, null, null, null, null, 1, 1, null, 1, + null, 1, null, null, null, 298, null, 1, null, null, null, null, + null, 0, null, 0, 0], + "dog_and_duck/quack/picky/time.clj": + [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, 0, 0, 0, 0, 0, 0, null, 0, 0, 0, null, - null, 0, 0, 0, null, 0, 0, 0, 0, 0, null, 0, 0, 0, 0, 0, null, 1, - null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, 0, 0, 0, 0], + null, null, null, null, null, 1, null, null, null, true, true, null, + 0, null, null, 0, null, null, 1, null, null, null, 0, 0, 0, null, 0, + null, null, 0, null, null, 1, null, null, null, null, null, null, 0, + 0, 0, 0, 0], "dog_and_duck/quack/quack.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, 1, null, null, null, null, null, + null, null, null, null, null, null, null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, 34, null, 34, null, 1, null, null, null, null, - null, 4, null, 4, null, 1, null, 3, null, 3, null, 1, null, null, - null, null, null, null, null, 0, 0, 0, 0, null, null, null, null, 1, - null, 0, null, 0, null, 1, null, 0, null, 0, null, 1, null, null, - null, null, null, 0, 0, 0, null, null, 1, null, null, null, null, - null, true, true, true, true, 2, 1, null, 1, 1, true, true, 1, null, - null, null, null, null, null, null, null, 0, 0, 0, 0, null, null, 1, - null, null, 0, null, 1, null, null, 0, null, 1, null, null, 0, null, - 1, null, null, 2, null, null], - "dog_and_duck/quack/picky/fault_messages.clj": - [null, 1, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, 1, null, 1, - null, null, null, null, null, null, null, null, null, null, null, - null], + null, null, null, null, 14, null, 14, null, 1, null, null, null, + null, null, 1, null, true, null, 1, null, 3, null, 3, null, 1, null, + null, null, null, null, null, null, 0, 0, 0, 0, null, null, null, + null, 1, null, 0, null, 0, null, 1, null, 0, null, 0, null, 1, null, + null, null, null, null, 0, 0, 0, null, null, 1, null, null, null, + null, null, true, true, true, true, 2, 1, null, 1, 1, true, true, 1, + null, null, null, null, null, null, null, null, 0, 0, 0, 0, null, + null, 1, null, null, 0, null, 1, null, null, 0, null, 1, null, null, + 0, null, 1, null, null, 2, null, null], "dog_and_duck/utils/process.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, null, null, null, null, null, null, 1, 1, 1, 1, 1, null, true, null, null, null, null, null, null, null, null, null, 1, null, 1, null, null, null, null, 1], - "clj_activitypub/internal/http_util.clj": - [null, 1, null, null, null, null, null, null, null, null, 1, 1, 1, 1, - 2, 2, 1, 1, 1, null, 1, 0, 0, null, 1, null, null, null, 0], - "clj_activitypub/internal/thread_cache.clj": - [null, 1, null, null, null, null, 1, null, null, 8, null, 1, 4, 4, 4, - null, 1, null, 2, null, 2, 2, 2, 2, 2, 2, 2, 2, null, 4, 4, 4, null, - 4, 4, 2, 2, true, 2, 2, null, 0, 0, 0, 2, 2, 2, 2], "dog_and_duck/scratch/parser.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, 1, null, null, null, 9, 9, 9, 9, 9, true, 0, null, null, null, - null, null, null, null, null, null, null, null, null, null], - "dog_and_duck/quack/picky/required_properties.clj":[null, 1], + null, 1, null, null, null, 11, 11, 11, 11, 11, true, 0, null, null, + null, null, null, null, null, null, null, null, null, null, null], + "dog_and_duck/quack/picky/scratch.clj": + [null, 1, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null], "dog_and_duck/quack/picky/control_variables.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, null, null, null, null, null, null, null, null], - "clj_activitypub/core.clj": - [null, 1, null, null, null, null, null, null, null, null, null, 1, - null, null, null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, null, 1, null, - null, null, 6, 2, 2, null, 1, 1, null, null, null, 1, 1, 1, 1, null, - null, 1, null, 1, null, null, null, 0, null, 0, null, 0, 0, 0, 0, 0, - 0, null, 1, null, 1, 0, 0, 0, 0, 0, 0, 0, 0, null, 1, null, null, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, 1, null, null, null, 0, 0, 0, 0, - 0, 0, 0, null, 1, null, null, null, true, null, 1, null, null, null, - null, null, 0, null, 0, 0, 0, 0, 0, null, 1, null, null, null, true, - null, 1, 0, null, null, 0, 0, null, 1, 0, null, null, 0, 0, null, 1, - null, null, null, 0, 0, 0, 0, 0, 0], - "clj_activitypub/internal/crypto.clj": - [null, 1, null, null, null, null, null, null, null, 1, 1, null, 1, 0, - 0, null, null, 1, 0, 0, null, 1, 0, 0, null, null, 1, 0, null, 1, 0, - 0, null, 1, 0, 0, 0, 0, 0, null], + "dog_and_duck/quack/cli.clj": + [null, 1, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, 1, null, null, null, 1, null, 1, null, 1, + null, 1, null, 0, true, 1, 1, 1, null, 0, true, 1, null, 1, 1, null, + 1, null, 0, 0, 0, 0, 0, 0, 0, null, 1, null, 0, 0, 0, 0, 0, 0, null, + 1, null, 0, null, 1, null, 0, 0, null, 1, 0, null, 0, 0, 0, 0, 0, 0, + 0, null, null, 1, null, 0, 0, 0, 0, 0, null, 0, null, null, 0, 0, 0, + null, 0, 0, 0, 0, 0, null, 0, 0, 0, null, 0, 0, 0, 0, 0, null, 1, + null, 0, 0, 0, 0, 0, 0, null, 1, 0, 0, 0, 0, 0, 0, 0, 0, null, 0, 0, + 0, 0, 0, 0, 0, 0, 0], "dog_and_duck/quack/picky.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, @@ -98,34 +93,68 @@ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, null, null, null, null, 0, - null, 6, 6, null, 0, null, 0, null, 4, null, 1, null, null, 12, 12, - 12, 12, 9, 8, 4, null, 1, null, 0, 3, null, 0, 0, 0, 0, null, 1, - null, null, 3, 3, 3, 3, 1, 3, 3, 3, 3, null, 1, null, null, null, - null, 0, 0, 0, 0, 0, 0, null, null, null, 1, null, null, null, true, - 0, true, true, null, 1, null, null, null, 1, null, 1, null, null, 1, - null, 1, 0, null, null, null, 1, null, null, 1, 1, 1, 1, null, 1, 1, - 1, 1, 1, 1, null, 1, 1, 1, 0, null, null, null, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, null, 1, null, null, null, null, null, - null, null, 0, 0, 0, null, 0, 0, 0, 0, null, 1, null, 0, 0, 0, 0, 0, - 0, 0, null, 1, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, 0, 0, 0, 0, 0, 0, null, null, - null, null, null, 0, 0, 0, 0, null, null, 0, 0], - "dog_and_duck/scratch/core.clj": + null, 6, 6, null, 0, null, 0, null, 4, null, 1, null, null, 9, 9, 8, + 8, 7, 6, 3, null, 1, null, 0, 1, null, 0, 0, 0, 0, null, 1, null, + null, 3, 3, 3, 3, 1, 3, 3, 3, 3, null, 1, null, null, null, null, 0, + 0, 0, 0, 0, 0, null, null, null, 1, null, null, null, true, 0, true, + true, null, 1, null, null, null, 1, null, 1, null, null, 1, null, 1, + 0, null, null, null, 1, null, null, 1, 1, 1, 1, null, 1, 1, 1, 1, 1, + 1, null, 1, 1, 1, 0, null, null, null, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, null, 1, null, null, null, null, null, null, null, + 0, 0, 0, null, 0, 0, 0, 0, null, 1, null, 0, 0, 0, 0, 0, 0, 0, 0, + null, 1, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, 3, 3, 3, 3, 12, 3, null, null, null, + null, null, 3, true, 1, 1, null, null, true, 0], + "dog_and_duck/quack/picky/objects.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, 1, null, null, 0], - "clj_activitypub/webfinger.clj": - [null, 1, null, null, null, null, null, null, null, 1, null, 1, 1, - null, 1, null, null, 1, 1, 1, null, 1, 1, null, 1, null, null, null, - 3, 3, 3, true, 1, true, 2, null], + null, null, null, null, null, null, null, null, null, null, null, + null, null, null, 1, null, 0, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, 1, + null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, 1, 1, true, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, null, null, null, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, true, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, null, null, null, null, null, 85, 85, 73, 33, true, null, 1, 1, + 1, 78, 1, 1, 76, 1, null, null, null, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, null, null, null, null, null, 70, 70, 58, 20, 8, null, 1, 1, 1, + 70, null, null, 1, 1, 1, 1, 1, 1, 1, 1, 1, true, null, true, 1, 1, + null, null, true, 1, 1, 547, 51, null, 1, 1, true, 1, 1, true, 1, 1, + 1, 1, null, 1, 1, true, 70, null, null, 12, 12, 12, true, 1, 1, 1, + true, 70, 0, null, null, null, null, null, null, null, null, 70, 70, + null, 20, 8, null, 1, 1, null, null, null, 1, 1, 1, true, 1, 1, 1, + 1, 1, true, 1, 1, 1, 1, 1, 12, null, 1, 1, 1, 1, null, null, null, + 1, 1, null, 1, null, 1, 1, true, 66, null, null, 14, 14, 0, true, 1, + 1, 1, 1, 1, 1, 70, null, 12, null, 1, 1, 12, null, 1, 1, null, 1, 1, + 1, 1, 1, 1, true, null, 1, 1, true, 1, 1, null, true, 1, null, null, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 70, 1, 1, 1, null, null, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, null, 1, 1, 1, null, null, + true, 1, 1, 1, 1, 1, true, 1, 1, 1, null, 1, 1104, 1104, 1104, 807, + 807, 21, null, 1, null, null, 1104, 1104, 1104, 1104, 283, 283, 283, + null, 1, 549, true, 547, true, 547, 547, 547, 547, null, 1, null, + null, null, 42, 42, 42, 41, 41, 2542, 41, 41, 549, 41, null, 1, + null, null, null, null, null, null, null, null, null, null, null, + 42, 42, 42, 42, 3, 42, 42, 20, 42, 3, 42, 17, 42, null, 16, 16, 16, + 12, 12, null, 1, null, null, null, null, null, null, null, null, 1, + 1, true, true, 0, null, 0, null, null, 0, null, null, 1, null, null, + null, null, 10, 10, 0, true, null, 1, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, + null, 18, 18, 8, 0, null, null, 0, 0, 0, null, 0, 0, 7, 1, 1, null, + 1, 1, 1, 1, 17, null, 1, null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, + 0, null, 0, 0, 0, 0], "dog_and_duck/scratch/scratch.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, 1, null, 1, 1, 1, null, null, null, null, 1, null, 1, 1, - 1, 1, null, null, 1, null, null, null, null, null, null, null, 1, 1, - 1, 1, 1, 1, null, null], + null, null, null, null, null, 1, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null], "dog_and_duck/quack/picky/collections.clj": [null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, 1, null, null, null, 0, 0, 0, 0, 0, 0, null, 1, null, null, - null, 0, 0, 0, 0, 0, 0, 0, null, 1, null, 0, 0, 0, 0, 0, null, null, - 0, 0]}} + null, 1, null, null, null, 3, 3, 3, 3, 3, 2, null, 1, null, null, + null, 6, 6, 6, 6, 6, 6, 6, 6, null, 1, null, null, null, 2, 2, 2, 2, + 2, null, null, 2, 2], + "dog_and_duck/quack/picky/distribution.clj": + [null, 1, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, 1, null, null, null, null, + null, 0, 0, 0, 0, null, null]}} diff --git a/docs/cloverage/coverage.xml b/docs/cloverage/coverage.xml index a91e783..d2621c3 100644 --- a/docs/cloverage/coverage.xml +++ b/docs/cloverage/coverage.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="UTF-8"?><report><stats><packages value="17"/><methods value="2634"/><srcfiles value="17"/><srclines value="572"/></stats><data><all name="total"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="50% (1326/2634)"/><coverage type="line, %" value="53% (303/572)"/><package name="dog-and-duck.scratch.scratch"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (66/66)"/><coverage type="line, %" value="100% (17/17)"/></package><package name="clj-activitypub.internal.thread-cache"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="83% (105/126)"/><coverage type="line, %" value="88% (30/34)"/></package><package name="clj-activitypub.internal.crypto"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="19% (9/48)"/><coverage type="line, %" value="39% (9/23)"/></package><package name="dog-and-duck.quack.quack"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="47% (122/262)"/><coverage type="line, %" value="51% (25/49)"/></package><package name="clj-activitypub.webfinger"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="96% (107/112)"/><coverage type="line, %" value="89% (16/18)"/></package><package name="dog-and-duck.quack.picky"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="42% (169/406)"/><coverage type="line, %" value="59% (65/111)"/></package><package name="clj-activitypub.internal.http-util"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="74% (29/39)"/><coverage type="line, %" value="80% (12/15)"/></package><package name="dog-and-duck.quack.picky.collections"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="3% (4/133)"/><coverage type="line, %" value="17% (4/24)"/></package><package name="dog-and-duck.quack.picky.constants"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (73/73)"/><coverage type="line, %" value="100% (18/18)"/></package><package name="dog-and-duck.quack.picky.required-properties"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (1/1)"/><coverage type="line, %" value="100% (1/1)"/></package><package name="dog-and-duck.scratch.core"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="33% (2/6)"/><coverage type="line, %" value="67% (2/3)"/></package><package name="dog-and-duck.quack.picky.control-variables"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (5/5)"/><coverage type="line, %" value="100% (3/3)"/></package><package name="dog-and-duck.utils.process"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="89% (34/38)"/><coverage type="line, %" value="91% (10/11)"/></package><package name="dog-and-duck.quack.picky.utils"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="50% (479/959)"/><coverage type="line, %" value="39% (57/147)"/></package><package name="dog-and-duck.quack.picky.fault-messages"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (29/29)"/><coverage type="line, %" value="100% (3/3)"/></package><package name="dog-and-duck.scratch.parser"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="70% (21/30)"/><coverage type="line, %" value="78% (7/9)"/></package><package name="clj-activitypub.core"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="24% (71/301)"/><coverage type="line, %" value="28% (24/86)"/></package></all></data></report> \ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?><report><stats><packages value="14"/><methods value="3905"/><srcfiles value="14"/><srclines value="793"/></stats><data><all name="total"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="61% (2375/3905)"/><coverage type="line, %" value="68% (538/793)"/><package name="dog-and-duck.scratch.scratch"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (3/3)"/><coverage type="line, %" value="100% (2/2)"/></package><package name="dog-and-duck.quack.picky.time"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="7% (10/135)"/><coverage type="line, %" value="22% (4/18)"/></package><package name="dog-and-duck.quack.quack"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="46% (121/262)"/><coverage type="line, %" value="49% (24/49)"/></package><package name="dog-and-duck.quack.picky"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="55% (225/406)"/><coverage type="line, %" value="66% (74/112)"/></package><package name="dog-and-duck.quack.picky.distribution"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="10% (2/20)"/><coverage type="line, %" value="33% (2/6)"/></package><package name="dog-and-duck.quack.picky.objects"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="81% (1220/1499)"/><coverage type="line, %" value="83% (278/333)"/></package><package name="dog-and-duck.quack.picky.collections"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (130/130)"/><coverage type="line, %" value="100% (25/25)"/></package><package name="dog-and-duck.quack.picky.constants"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (99/99)"/><coverage type="line, %" value="100% (23/23)"/></package><package name="dog-and-duck.quack.cli"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="12% (70/584)"/><coverage type="line, %" value="22% (20/93)"/></package><package name="dog-and-duck.quack.picky.control-variables"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (5/5)"/><coverage type="line, %" value="100% (3/3)"/></package><package name="dog-and-duck.utils.process"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="89% (34/38)"/><coverage type="line, %" value="91% (10/11)"/></package><package name="dog-and-duck.quack.picky.utils"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="63% (434/693)"/><coverage type="line, %" value="60% (65/108)"/></package><package name="dog-and-duck.quack.picky.scratch"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (1/1)"/><coverage type="line, %" value="100% (1/1)"/></package><package name="dog-and-duck.scratch.parser"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="70% (21/30)"/><coverage type="line, %" value="78% (7/9)"/></package></all></data></report> \ No newline at end of file diff --git a/docs/cloverage/dog_and_duck/quack/cli.clj.html b/docs/cloverage/dog_and_duck/quack/cli.clj.html new file mode 100644 index 0000000..6611554 --- /dev/null +++ b/docs/cloverage/dog_and_duck/quack/cli.clj.html @@ -0,0 +1,425 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" href="../../coverage.css"/> <title> dog_and_duck/quack/cli.clj </title> + </head> + <body> +<span class="covered" title="1 out of 1 forms covered"> + 001 (ns dog-and-duck.quack.cli + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 002 (:require [clojure.data.json :refer [read-str]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 003 [clojure.java.io :refer [resource]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 004 [clojure.pprint :refer [pprint]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 005 [clojure.string :refer [join]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 006 [clojure.tools.cli :refer [parse-opts]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 007 [clojure.walk :refer [keywordize-keys]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 008 [dog-and-duck.quack.picky.constants :refer [severity]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 009 [dog-and-duck.quack.picky.objects :refer [object-faults]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 010 [dog-and-duck.quack.picky.utils :refer [filter-severity]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 011 [hiccup.core :refer [html]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 012 [scot.weft.i18n.core :refer [get-message *config*]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 013 [trptr.java-wrapper.locale :as locale]) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 014 (:gen-class)) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 015 + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 016 (def ^:const stylesheet-url + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 017 ;; TODO: fix this to github pages before go live + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 018 "https://simon-brooke.github.io/dog-and-duck/style.css") + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 019 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 020 (def cli-options + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 021 ;; An option with a required argument + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 022 [["-i" "--input SOURCE" "The file or URL to validate" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 023 :default "standard input"] + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 024 ["-o" "--output DEST" "The file to write to, defaults to standard out" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 025 :default "standard output"] + </span><br/> +<span class="covered" title="9 out of 9 forms covered"> + 026 ["-f" "--format FORMAT" "The format to output, one of `edn` `csv` `html`" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 027 :default :edn + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 028 :parse-fn #(keyword %) + </span><br/> +<span class="partial" title="3 out of 9 forms covered"> + 029 :validate [#(#{:csv :edn :html} %) "Expect one of `edn` `csv` `html`"]] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 030 ["-l" "--language LANG" "The ISO 639-1 code for the language to output" + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 031 :default (-> (locale/get-default) locale/to-language-tag)] + </span><br/> +<span class="covered" title="9 out of 9 forms covered"> + 032 ["-s" "--severity LEVEL" "The minimum severity of faults to report" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 033 :default :info + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 034 :parse-fn #(keyword %) + </span><br/> +<span class="partial" title="5 out of 8 forms covered"> + 035 :validate [#(severity %) (join " " + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 036 (cons + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 037 "Expected one of" + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 038 (map name severity)))]] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 039 ["-h" "--help"]]) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 040 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 041 (defn validate + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 042 [source] + </span><br/> +<span class="not-covered" title="0 out of 6 forms covered"> + 043 (println (str "Reading " source)) + </span><br/> +<span class="not-covered" title="0 out of 6 forms covered"> + 044 (let [input (read-str (slurp source))] + </span><br/> +<span class="not-covered" title="0 out of 11 forms covered"> + 045 (cond (map? input) (object-faults (keywordize-keys input)) + </span><br/> +<span class="not-covered" title="0 out of 8 forms covered"> + 046 (and (coll? input) + </span><br/> +<span class="not-covered" title="0 out of 8 forms covered"> + 047 (every? map? input)) (map #(object-faults + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 048 (keywordize-keys %) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 049 input))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 050 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 051 (defn output-csv + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 052 [faults] + </span><br/> +<span class="not-covered" title="0 out of 10 forms covered"> + 053 (let [cols (set (reduce concat (map keys faults)))] + </span><br/> +<span class="not-covered" title="0 out of 15 forms covered"> + 054 (with-out-str + </span><br/> +<span class="not-covered" title="0 out of 9 forms covered"> + 055 (println (join ", " (map name cols))) + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 056 (map + </span><br/> +<span class="not-covered" title="0 out of 12 forms covered"> + 057 #(println (join ", " (map (fn [p] (p %)) cols))) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 058 faults)))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 059 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 060 (defn html-header-row + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 061 [cols] + </span><br/> +<span class="not-covered" title="0 out of 16 forms covered"> + 062 (apply vector (cons :tr (map #(vector :th (name %)) cols)))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 063 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 064 (defn html-fault-row + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 065 [fault cols] + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 066 (apply + </span><br/> +<span class="not-covered" title="0 out of 14 forms covered"> + 067 vector (cons :tr (map (fn [col] (vector :td (col fault))) cols)))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 068 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 069 (defn- version-string [] + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 070 (join + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 071 " " + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 072 ["dog-and-duck/quack" + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 073 (try + </span><br/> +<span class="not-covered" title="0 out of 21 forms covered"> + 074 (some->> + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 075 (resource "META-INF/maven/dog-and-duck/dog-and-duck/pom.properties") + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 076 slurp + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 077 (re-find #"version=(.*)") + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 078 second) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 079 (catch Exception _ nil))])) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 080 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 081 (defn output-html + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 082 [faults opts] + </span><br/> +<span class="not-covered" title="0 out of 13 forms covered"> + 083 (let [source-name (if (= (:input opts) *in*) "Standard input" (str (:input opts))) + </span><br/> +<span class="not-covered" title="0 out of 8 forms covered"> + 084 title (join " " [(get-message :validation-report-for) source-name]) + </span><br/> +<span class="not-covered" title="0 out of 9 forms covered"> + 085 cols (set (reduce concat (map keys faults))) + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 086 version (version-string)] + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 087 (str + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 088 "<!DOCTYPE html>" + </span><br/> +<span class="not-covered" title="0 out of 130 forms covered"> + 089 (html + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 090 [:html + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 091 [:head + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 092 [:title title] + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 093 [:meta {:name "generator" :content version}] + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 094 [:link {:rel "stylesheet" :media "screen" :href stylesheet-url :type "text/css"}]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 095 [:body + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 096 [:h1 title] + </span><br/> +<span class="not-covered" title="0 out of 10 forms covered"> + 097 [:p (join " " (remove nil? [(get-message :generated-on) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 098 (java.time.LocalDateTime/now) + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 099 (get-message :by) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 100 version]))] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 101 (if-not + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 102 (empty? faults) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 103 (apply + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 104 vector + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 105 :table + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 106 (html-header-row cols) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 107 (map + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 108 #(html-fault-row % cols) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 109 faults)) + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 110 [:p (get-message :no-faults-found)])]])))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 111 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 112 (defn output + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 113 [content options] + </span><br/> +<span class="not-covered" title="0 out of 7 forms covered"> + 114 (let [faults (filter-severity content (:severity options))] + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 115 (spit (:output options) + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 116 (case (:format options) + </span><br/> +<span class="not-covered" title="0 out of 4 forms covered"> + 117 :html (output-html faults options) + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 118 :csv (output-csv faults) + </span><br/> +<span class="not-covered" title="0 out of 18 forms covered"> + 119 (with-out-str (pprint faults)))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 120 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 121 (defn -main [& args] + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 122 (let [opts (parse-opts args cli-options) + </span><br/> +<span class="not-covered" title="0 out of 7 forms covered"> + 123 options (assoc (:options opts) + </span><br/> +<span class="not-covered" title="0 out of 8 forms covered"> + 124 :input (if (= (:input (:options opts)) "standard input") + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 125 *in* + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 126 (:input (:options opts))) + </span><br/> +<span class="not-covered" title="0 out of 8 forms covered"> + 127 :output (if (= (:output (:options opts)) "standard output") + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 128 *out* + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 129 (:output (:options opts))))] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 130 ;;(println options) + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 131 (when (:help options) + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 132 (println (:summary opts))) + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 133 (when (:errors opts) + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 134 (println (:errors opts))) + </span><br/> +<span class="not-covered" title="0 out of 13 forms covered"> + 135 (when-not (or (:help options) (:errors options)) + </span><br/> +<span class="not-covered" title="0 out of 16 forms covered"> + 136 (binding [*config* (assoc *config* :default-language (:language options))] + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 137 (output + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 138 (validate (:input options)) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 139 options))))) + </span><br/> + </body> +</html> diff --git a/docs/cloverage/dog_and_duck/quack/picky.clj.html b/docs/cloverage/dog_and_duck/quack/picky.clj.html index 9364e58..201ba62 100644 --- a/docs/cloverage/dog_and_duck/quack/picky.clj.html +++ b/docs/cloverage/dog_and_duck/quack/picky.clj.html @@ -104,31 +104,31 @@ 033 [dog-and-duck.quack.picky.constants :refer [actor-types]] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 034 [dog-and-duck.quack.picky.utils :refer [any-or-faults + 034 [dog-and-duck.quack.picky.objects :refer [coll-object-reference-or-fault </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 035 coll-object-reference-or-fault + 035 object-faults </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 036 concat-non-empty + 036 object-reference-or-faults]] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 037 has-activity-type? + 037 [dog-and-duck.quack.picky.utils :refer [any-or-faults </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 038 has-actor-type? has-type? + 038 concat-non-empty </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 039 has-type-or-fault + 039 has-activity-type? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 040 make-fault-object + 040 has-actor-type? has-type? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 041 object-faults + 041 has-type-or-fault </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 042 object-reference-or-faults + 042 make-fault-object </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 043 string-or-fault]]) @@ -628,134 +628,137 @@ <span class="not-tracked" title="0 out of 0 forms covered"> 208 [x] </span><br/> -<span class="not-covered" title="0 out of 5 forms covered"> - 209 (concat-non-empty (persistent-object-faults x) +<span class="not-covered" title="0 out of 2 forms covered"> + 209 (concat-non-empty </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> - 210 (activity-type-faults x) + 210 (persistent-object-faults x) + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 211 (activity-type-faults x) </span><br/> <span class="not-covered" title="0 out of 2 forms covered"> - 211 (list + 212 (list </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> - 212 (when-not + 213 (when-not </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> - 213 (has-activity-type? x) + 214 (has-activity-type? x) </span><br/> <span class="not-covered" title="0 out of 4 forms covered"> - 214 (make-fault-object :must :not-activity-type)) + 215 (make-fault-object :must :not-activity-type)) </span><br/> <span class="not-covered" title="0 out of 12 forms covered"> - 215 (when-not (string? (:summary x)) (make-fault-object :should :no-summary))))) + 216 (when-not (string? (:summary x)) (make-fault-object :should :no-summary))))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 216 + 217 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 217 (defn collection-faults + 218 (defn collection-faults </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 218 "Return a list of faults found in the collection `x`; if `type` is also + 219 "Return a list of faults found in the collection `x`; if `type` is also </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 219 specified, it should be a string naming a specific collection type for + 220 specified, it should be a string naming a specific collection type for </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 220 which checks should be performed. + 221 which checks should be performed. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 221 + 222 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 222 Every collection *should*(?) have a `totalItems` field (an integer). + 223 Every collection *should*(?) have a `totalItems` field (an integer). </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 223 + 224 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 224 Beyond that, collections are either 'just collections' (in which case + 225 Beyond that, collections are either 'just collections' (in which case </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 225 they *should* have an `items` field (a sequence)), or else they're paged + 226 they *should* have an `items` field (a sequence)), or else they're paged </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 226 collections, in which case they *must*(?) have a `first` field which is + 227 collections, in which case they *must*(?) have a `first` field which is </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 227 a collection page or a URI pointing to a collection page, and *should* + 228 a collection page or a URI pointing to a collection page, and *should* </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 228 have a `last` field which is similar. + 229 have a `last` field which is similar. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 229 + 230 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 230 The pages of collections *should* be collection pages; the pages of + 231 The pages of collections *should* be collection pages; the pages of </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 231 ordered collections *should* be ordered collection pages." + 232 ordered collections *should* be ordered collection pages." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 232 ([x] + 233 ([x] </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 233 (collection-faults +<span class="covered" title="2 out of 2 forms covered"> + 234 (collection-faults </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 234 x +<span class="covered" title="1 out of 1 forms covered"> + 235 x </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 235 (first +<span class="covered" title="2 out of 2 forms covered"> + 236 (first </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 236 (remove nil? +<span class="covered" title="3 out of 3 forms covered"> + 237 (remove nil? </span><br/> -<span class="not-covered" title="0 out of 10 forms covered"> - 237 (map #(when (has-type? x %) %) +<span class="covered" title="10 out of 10 forms covered"> + 238 (map #(when (has-type? x %) %) </span><br/> -<span class="not-covered" title="0 out of 5 forms covered"> - 238 ["Collection" +<span class="covered" title="5 out of 5 forms covered"> + 239 ["Collection" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 239 "OrderedCollection" + 240 "OrderedCollection" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 240 "CollectionPage" + 241 "CollectionPage" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 241 "OrderedCollectionPage"]))))) + 242 "OrderedCollectionPage"]))))) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 242 ([x type] + 243 ([x type] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 243 ;; (log/info "collection-faults called with argumens " x ", " type) + 244 ;; (log/info "collection-faults called with argumens " x ", " type) </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 244 (case type +<span class="covered" title="3 out of 3 forms covered"> + 245 (case type </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 245 ("Collection" "OrderedCollection") (any-or-faults +<span class="partial" title="6 out of 8 forms covered"> + 246 ("Collection" "OrderedCollection") (any-or-faults </span><br/> -<span class="not-covered" title="0 out of 12 forms covered"> - 246 (list (simple-collection-faults x type) +<span class="covered" title="12 out of 12 forms covered"> + 247 (list (simple-collection-faults x type) </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 247 (paged-collection-faults x type)) +<span class="covered" title="8 out of 8 forms covered"> + 248 (paged-collection-faults x type)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 248 :must + 249 :must </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 249 :no-items) + 250 :no-items) </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 250 ("CollectionPage" "OrderedCollectionPage") (collection-page-faults x type) +<span class="partial" title="4 out of 8 forms covered"> + 251 ("CollectionPage" "OrderedCollectionPage") (collection-page-faults x type) </span><br/> <span class="not-covered" title="0 out of 6 forms covered"> - 251 (list (make-fault-object :critical :expected-collection))))) + 252 (list (make-fault-object :critical :expected-collection))))) </span><br/> </body> </html> diff --git a/docs/cloverage/dog_and_duck/quack/picky/collections.clj.html b/docs/cloverage/dog_and_duck/quack/picky/collections.clj.html index f6149ce..7c3b846 100644 --- a/docs/cloverage/dog_and_duck/quack/picky/collections.clj.html +++ b/docs/cloverage/dog_and_duck/quack/picky/collections.clj.html @@ -8,16 +8,16 @@ 001 (ns dog-and-duck.quack.picky.collections </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 002 (:require [dog-and-duck.quack.picky.utils :refer [concat-non-empty + 002 (:require [dog-and-duck.quack.picky.objects :refer [object-faults </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 003 cond-make-fault-object + 003 object-reference-or-faults]] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 004 object-faults + 004 [dog-and-duck.quack.picky.utils :refer [concat-non-empty </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 005 object-reference-or-faults]])) + 005 cond-make-fault-object]])) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 006 @@ -85,23 +85,23 @@ <span class="not-tracked" title="0 out of 0 forms covered"> 027 [x type] </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> +<span class="covered" title="2 out of 2 forms covered"> 028 (concat-non-empty </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> +<span class="covered" title="4 out of 4 forms covered"> 029 (object-faults x type) </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> +<span class="covered" title="8 out of 8 forms covered"> 030 (list (object-reference-or-faults x type :critical :expected-collection) </span><br/> -<span class="not-covered" title="0 out of 11 forms covered"> +<span class="covered" title="9 out of 9 forms covered"> 031 (cond-make-fault-object (integer? (:totalItems x)) :should :no-total-items) </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 032 (object-reference-or-faults (:first x) nil :must :no-first-page) +<span class="covered" title="11 out of 11 forms covered"> + 032 (object-reference-or-faults (:first x) (str type "Page") :must :no-first-page) </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 033 (object-reference-or-faults (:last x) nil :should :no-last-page)))) +<span class="covered" title="11 out of 11 forms covered"> + 033 (object-reference-or-faults (:last x) (str type "Page") :should :no-last-page)))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 034 @@ -118,62 +118,71 @@ <span class="not-tracked" title="0 out of 0 forms covered"> 038 [x type] </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> +<span class="covered" title="2 out of 2 forms covered"> 039 (concat-non-empty </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> +<span class="covered" title="4 out of 4 forms covered"> 040 (object-faults x type) </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 041 (cons +<span class="covered" title="2 out of 2 forms covered"> + 041 (concat </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 042 (list (object-reference-or-faults x type :critical :expected-collection) +<span class="covered" title="11 out of 11 forms covered"> + 042 (list (cond-make-fault-object (integer? (:totalItems x)) :should :no-total-items) </span><br/> -<span class="not-covered" title="0 out of 11 forms covered"> - 043 (cond-make-fault-object (integer? (:totalItems x)) :should :no-total-items) +<span class="covered" title="9 out of 9 forms covered"> + 043 (cond-make-fault-object (coll? (:items x)) :must :no-items-collection)) </span><br/> -<span class="not-covered" title="0 out of 11 forms covered"> - 044 (cond-make-fault-object (coll? (:items x)) :must :no-items-collection)) - </span><br/> -<span class="not-covered" title="0 out of 12 forms covered"> - 045 (map #(object-reference-or-faults % nil :must :not-object-reference) (:items x))))) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 046 +<span class="covered" title="2 out of 2 forms covered"> + 044 (reduce </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 047 (defn collection-page-faults + 045 concat + </span><br/> +<span class="covered" title="12 out of 12 forms covered"> + 046 (map #(object-reference-or-faults % nil :must :not-object-reference) (:items x)))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 047 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 048 (defn collection-page-faults </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 048 [x type] - </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 049 (concat-non-empty - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 050 (simple-collection-faults x type) - </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 051 (list - </span><br/> -<span class="not-covered" title="0 out of 7 forms covered"> - 052 (object-reference-or-faults (:partOf x) - </span><br/> -<span class="not-covered" title="0 out of 7 forms covered"> - 053 (apply str (drop-last 4 type)) + 049 "Return a list of faults found in `x` considered as a collection page </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 054 :should + 050 object of this sub-`type`, or `nil` if none are found." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 055 :n-part-of) + 051 [x type] </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 056 (object-reference-or-faults (:next x) type :minor :no-next-page) +<span class="covered" title="2 out of 2 forms covered"> + 052 (concat-non-empty </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 057 (object-reference-or-faults (:prev x) type :minor :no-prev-page)))) +<span class="covered" title="4 out of 4 forms covered"> + 053 (simple-collection-faults x type) + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 054 (list + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 055 (object-reference-or-faults (:partOf x) + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 056 (apply str (drop-last 4 type)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 057 :should + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 058 :n-part-of) + </span><br/> +<span class="covered" title="8 out of 8 forms covered"> + 059 (object-reference-or-faults (:next x) type :minor :no-next-page) + </span><br/> +<span class="covered" title="8 out of 8 forms covered"> + 060 (object-reference-or-faults (:prev x) type :minor :no-prev-page)))) </span><br/> </body> </html> diff --git a/docs/cloverage/dog_and_duck/quack/picky/constants.clj.html b/docs/cloverage/dog_and_duck/quack/picky/constants.clj.html index e174b06..86f1761 100644 --- a/docs/cloverage/dog_and_duck/quack/picky/constants.clj.html +++ b/docs/cloverage/dog_and_duck/quack/picky/constants.clj.html @@ -68,178 +68,289 @@ 021 "The URI of the context of an ActivityStreams object is expected to be this </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 022 literal string." + 022 literal string. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 023 "https://www.w3.org/ns/activitystreams") + 023 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 024 **NOTE THAT** the URI actually used in the published suite of + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 025 activitystreams-test-documents use this URI with 'http' rather than + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 026 'https' as the property part, but the spec itself specifies 'https'." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 027 "https://www.w3.org/ns/activitystreams") </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 024 + 028 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 025 (def ^:const actor-types + 029 (def ^:const actor-types </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 026 "The set of types we will accept as actors. + 030 "The set of types we will accept as actors. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 027 + 031 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 028 There's an [explicit set of allowed actor types] + 032 There's an [explicit set of allowed actor types] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 029 (https://www.w3.org/TR/activitystreams-vocabulary/#actor-types)." + 033 (https://www.w3.org/TR/activitystreams-vocabulary/#actor-types)." </span><br/> <span class="covered" title="6 out of 6 forms covered"> - 030 #{"Application" + 034 #{"Application" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 031 "Group" + 035 "Group" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 032 "Organization" + 036 "Organization" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 033 "Person" + 037 "Person" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 034 "Service"}) + 038 "Service"}) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 035 + 039 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 036 (def ^:const context-key + 040 (def ^:const context-key </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 037 "The Clojure reader barfs on `:@context`, although it is in principle a valid + 041 "The Clojure reader barfs on `:@context`, although it is in principle a valid </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 038 keyword. So we'll make it once, here, to make the code more performant and + 042 keyword. So we'll make it once, here, to make the code more performant and </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 039 easier to read." + 043 easier to read." </span><br/> <span class="covered" title="3 out of 3 forms covered"> - 040 (keyword "@context")) + 044 (keyword "@context")) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 041 - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 042 (def ^:const severity - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 043 "Severity of faults found, as follows: - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 044 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 045 0. `:info` not actually a fault, but an issue noted during validation; - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 046 1. `:minor` things which I consider to be faults, but which - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 047 don't actually breach the spec; - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 048 2. `:should` instances where the spec says something SHOULD - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 049 be done, which isn't; - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 050 3. `:must` instances where the spec says something MUST - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 051 be done, which isn't; - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 052 4. `:critical` instances where I believe the fault means that - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 053 the object cannot be meaningfully processed." - </span><br/> -<span class="covered" title="6 out of 6 forms covered"> - 054 #{:info :minor :should :must :critical}) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 055 - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 056 (def ^:const severity-filters - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 057 "Hack for implementing a severity hierarchy" - </span><br/> -<span class="covered" title="8 out of 8 forms covered"> - 058 {:all #{} - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 059 :info #{} + 045 </span><br/> <span class="covered" title="2 out of 2 forms covered"> - 060 :minor #{:info} + 046 (def ^:const re-rfc5646 </span><br/> -<span class="covered" title="3 out of 3 forms covered"> - 061 :should #{:info :minor} +<span class="not-tracked" title="0 out of 0 forms covered"> + 047 "A regex which tests conformity to RFC 5646. Cribbed from </span><br/> -<span class="covered" title="4 out of 4 forms covered"> - 062 :must #{:info :minor :should} +<span class="not-tracked" title="0 out of 0 forms covered"> + 048 https://newbedev.com/regex-to-detect-locales" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 049 #"^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$") + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 050 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 063 :critical severity}) + 051 (def ^:const severity + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 052 "Severity of faults found, as follows: + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 053 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 054 0. `:info` not actually a fault, but an issue noted during validation; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 055 1. `:minor` things which I consider to be faults, but which + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 056 don't actually breach the spec; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 057 2. `:should` instances where the spec says something SHOULD + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 058 be done, which isn't; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 059 3. `:must` instances where the spec says something MUST + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 060 be done, which isn't; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 061 4. `:critical` instances where I believe the fault means that + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 062 the object cannot be meaningfully processed." + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 063 #{:info :minor :should :must :critical}) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 064 </span><br/> -<span class="covered" title="2 out of 2 forms covered"> - 065 (def ^:const validation-fault-context-uri +<span class="covered" title="1 out of 1 forms covered"> + 065 (def ^:const severity-filters </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 066 "The URI of the context of a validation fault report object shall be this + 066 "Hack for implementing a severity hierarchy" </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 067 literal string." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 068 "https://simon-brooke.github.io/dog-and-duck/codox/Validation_Faults.html") - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 069 +<span class="covered" title="8 out of 8 forms covered"> + 067 {:all #{} </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 070 (def ^:const verb-types + 068 :info #{} </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 071 "The set of types we will accept as verbs. +<span class="covered" title="2 out of 2 forms covered"> + 069 :minor #{:info} </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 072 +<span class="covered" title="3 out of 3 forms covered"> + 070 :should #{:info :minor} </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 073 There's an [explicit set of allowed verb types] +<span class="covered" title="4 out of 4 forms covered"> + 071 :must #{:info :minor :should} </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 074 (https://www.w3.org/TR/activitystreams-vocabulary/#activity-types)." - </span><br/> -<span class="covered" title="29 out of 29 forms covered"> - 075 #{"Accept" "Add" "Announce" "Arrive" "Block" "Create" "Delete" "Dislike" - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 076 "Flag" "Follow" "Ignore" "Invite" "Join" "Leave" "Like" "Listen" "Move" - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 077 "Offer" "Question" "Reject" "Read" "Remove" "TentativeAccept" - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 078 "TentativeReject" "Travel" "Undo" "Update" "View"}) +<span class="covered" title="5 out of 5 forms covered"> + 072 :critical #{:info :minor :should :must}}) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 079 + 073 + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 074 (def ^:const validation-fault-context-uri + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 075 "The URI of the context of a validation fault report object shall be this + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 076 literal string." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 077 "https://simon-brooke.github.io/dog-and-duck/codox/Validation_Faults.html") + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 078 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 079 (def ^:const activity-types + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 080 "The set of types we will accept as activities. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 081 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 082 There's an [explicit set of allowed activity types] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 083 (https://www.w3.org/TR/activitystreams-vocabulary/#activity-types)." + </span><br/> +<span class="covered" title="29 out of 29 forms covered"> + 084 #{"Accept" "Add" "Announce" "Arrive" "Block" "Create" "Delete" "Dislike" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 085 "Flag" "Follow" "Ignore" "Invite" "Join" "Leave" "Like" "Listen" "Move" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 086 "Offer" "Question" "Reject" "Read" "Remove" "TentativeAccept" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 087 "TentativeReject" "Travel" "Undo" "Update" "View"}) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 088 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 089 (def ^:const noun-types + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 090 "The set of object types we will accept as nouns. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 091 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 092 There's an [explicit set of allowed 'object types'] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 093 (https://www.w3.org/TR/activitystreams-vocabulary/#object-types), but by + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 094 implication it is not exhaustive." + </span><br/> +<span class="covered" title="16 out of 16 forms covered"> + 095 #{"Article" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 096 "Audio" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 097 "Document" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 098 "Event" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 099 "Image" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 100 "Link" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 101 "Mention" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 102 "Note" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 103 "Object" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 104 "Page" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 105 "Place" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 106 "Profile" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 107 "Relationsip" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 108 "Tombstone" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 109 "Video"}) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 110 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 111 (def ^:const implicit-noun-types + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 112 "These types are not explicitly listed in [Section 3.3 of the spec] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 113 (https://www.w3.org/TR/activitystreams-vocabulary/#object-types), but are + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 114 mentioned in narrative" + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 115 #{"Link"}) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 116 </span><br/> </body> </html> diff --git a/docs/cloverage/dog_and_duck/quack/picky/distribution.clj.html b/docs/cloverage/dog_and_duck/quack/picky/distribution.clj.html new file mode 100644 index 0000000..31f4f81 --- /dev/null +++ b/docs/cloverage/dog_and_duck/quack/picky/distribution.clj.html @@ -0,0 +1,98 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" href="../../../coverage.css"/> <title> dog_and_duck/quack/picky/distribution.clj </title> + </head> + <body> +<span class="covered" title="1 out of 1 forms covered"> + 001 (ns dog-and-duck.quack.picky.distribution) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 002 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 003 ;;; Copyright (C) Simon Brooke, 2022 + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 004 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 005 ;;; This program is free software; you can redistribute it and/or + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 006 ;;; modify it under the terms of the GNU General Public License + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 007 ;;; as published by the Free Software Foundation; either version 2 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 008 ;;; of the License, or (at your option) any later version. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 009 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 010 ;;; This program is distributed in the hope that it will be useful, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 011 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 012 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 013 ;;; GNU General Public License for more details. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 014 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 015 ;;; You should have received a copy of the GNU General Public License + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 016 ;;; along with this program; if not, write to the Free Software + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 017 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 018 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 019 (defn distribution + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 020 "Distribution of values of function `f` when applied to `vals`. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 021 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 022 I *know* there's a library function that does this, probably better, but I + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 023 don't remember what it's called!" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 024 [f vals] + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 025 (loop [result {} values vals] + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 026 (if (empty? values) result + </span><br/> +<span class="not-covered" title="0 out of 9 forms covered"> + 027 (let [r (apply f (list (first values)))] + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 028 (recur + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 029 (assoc result r (if (result r) (inc (result r)) 1)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 030 (rest values)))))) + </span><br/> + </body> +</html> diff --git a/docs/cloverage/dog_and_duck/quack/picky/objects.clj.html b/docs/cloverage/dog_and_duck/quack/picky/objects.clj.html new file mode 100644 index 0000000..952a4a3 --- /dev/null +++ b/docs/cloverage/dog_and_duck/quack/picky/objects.clj.html @@ -0,0 +1,1574 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" href="../../../coverage.css"/> <title> dog_and_duck/quack/picky/objects.clj </title> + </head> + <body> +<span class="covered" title="1 out of 1 forms covered"> + 001 (ns dog-and-duck.quack.picky.objects + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 002 (:require [clojure.data.json :as json] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 003 [clojure.set :refer [union]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 004 [dog-and-duck.quack.picky.constants :refer [actor-types + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 005 noun-types + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 006 re-rfc5646]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 007 [dog-and-duck.quack.picky.control-variables :refer [*reify-refs*]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 008 [dog-and-duck.quack.picky.time :refer [date-time-property-or-fault + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 009 xsd-date-time? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 010 xsd-duration?]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 011 [dog-and-duck.quack.picky.utils :refer [concat-non-empty + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 012 cond-make-fault-object + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 013 has-activity-type? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 014 has-context? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 015 has-type? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 016 has-type-or-fault + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 017 make-fault-object + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 018 nil-if-empty + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 019 object-or-uri? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 020 truthy? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 021 xsd-non-negative-integer?]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 022 [taoensso.timbre :refer [info warn]]) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 023 (:import [java.io FileNotFoundException] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 024 [java.net URI URISyntaxException])) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 025 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 026 (defn- xsd-float? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 027 [pv] + </span><br/> +<span class="not-covered" title="0 out of 10 forms covered"> + 028 (or (integer? pv) (float? pv))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 029 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 030 ;;; Copyright (C) Simon Brooke, 2022 + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 031 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 032 ;;; This program is free software; you can redistribute it and/or + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 033 ;;; modify it under the terms of the GNU General Public License + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 034 ;;; as published by the Free Software Foundation; either version 2 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 035 ;;; of the License, or (at your option) any later version. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 036 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 037 ;;; This program is distributed in the hope that it will be useful, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 038 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 039 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 040 ;;; GNU General Public License for more details. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 041 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 042 ;;; You should have received a copy of the GNU General Public License + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 043 ;;; along with this program; if not, write to the Free Software + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 044 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 045 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 046 (def object-expected-properties + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 047 "Requirements of properties of object, cribbed from + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 048 https://www.w3.org/TR/activitystreams-vocabulary/#properties + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 049 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 050 Note the following sub-key value types: + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 051 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 052 * `:collection` opposite of `:functional`: if true, value should be a + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 053 collection (in the Clojure sense), not a single object; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 054 * `:functional` if true, value should be a single object; if false, may + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 055 be a single object or a sequence of objects, but each must pass + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 056 validation checks; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 057 * `:if-invalid` a sequence of two keywords, first indicating severity, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 058 second being a message key; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 059 * `:if-missing` a sequence of two keywords, first indicating severity, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 060 second being a message key; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 061 * `:required` a boolean, or a function of one argument returning a + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 062 boolean, in which case the function will be applied to the object + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 063 having the property; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 064 * `:validator` a function of one argument returning a boolean, which will + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 065 be applied to the value or values of the identified property." + </span><br/> +<span class="covered" title="68 out of 68 forms covered"> + 066 {:accuracy {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 067 :if-invalid [:must :invalid-number] + </span><br/> +<span class="partial" title="1 out of 14 forms covered"> + 068 :validator (fn [pv] (and (xsd-float? pv) + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 069 (>= pv 0) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 070 (<= pv 100)))} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 071 :actor {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 072 :if-invalid [:must :invalid-actor] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 073 :if-missing [:must :no-actor] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 074 :required has-activity-type? + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 075 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 076 :altitude {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 077 :if-invalid [:must :invalid-number] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 078 :validator xsd-float?} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 079 :anyOf {:collection true + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 080 :functional false + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 081 ;; a Question should have a `:oneOf` or `:anyOf`, but at this layer + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 082 ;; that's hard to check. + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 083 :if-invalid [:must :invalid-option] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 084 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 085 :attachment {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 086 :if-invalid [:must :invalid-attachment] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 087 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 088 :attributedTo {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 089 :if-invalid [:must :invalid-attribution] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 090 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 091 :audience {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 092 :if-invalid [:must :invalid-audience] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 093 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 094 :bcc {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 095 :if-invalid [:must :invalid-audience] ;; do we need a separate message for bcc, cc, etc? + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 096 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 097 :cc {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 098 :if-invalid [:must :invalid-audience] ;; do we need a separate message for bcc, cc, etc? + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 099 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 100 :closed {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 101 :if-invalid [:must :invalid-closed] + </span><br/> +<span class="partial" title="1 out of 15 forms covered"> + 102 :validator (fn [pv] (truthy? (or (object-or-uri? pv) + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 103 (xsd-date-time? pv) + </span><br/> +<span class="not-covered" title="0 out of 4 forms covered"> + 104 (#{"true" "false"} pv))))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 105 :content {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 106 :if-invalid [:must :invalid-content] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 107 :validator string?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 108 :context {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 109 :if-invalid [:must :invalid-context] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 110 :validator object-or-uri?} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 111 :current {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 112 :if-missing [:minor :paged-collection-no-current] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 113 :if-invalid [:must :paged-collection-invalid-current] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 114 :required (fn [x] ;; if an object is a collection which has pages, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 115 ;; it ought to have a `:current` page. But + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 116 ;; 1. it isn't required to, and + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 117 ;; 2. there's no certain way of telling that it + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 118 ;; does have pages - although if it has a + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 119 ;; `:first`, then it is. + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 120 (and + </span><br/> +<span class="covered" title="10 out of 10 forms covered"> + 121 (or (has-type? x "Collection") + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 122 (has-type? x "OrderedCollection")) + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 123 (:first x))) + </span><br/> +<span class="partial" title="1 out of 7 forms covered"> + 124 :validator (fn [pv] (object-or-uri? pv #{"CollectionPage" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 125 "OrderedCollectionPage"}))} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 126 :deleted {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 127 :if-missing [:minor :tombstone-missing-deleted] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 128 :if-invalid [:must :invalid-deleted] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 129 :required (fn [x] (has-type? x "Tombstone")) + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 130 :validator xsd-date-time?} + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 131 :describes {:functional true + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 132 :required (fn [x] (has-type? x "Profile")) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 133 :if-invalid [:must :invalid-describes] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 134 ;; TODO: actually the spec says this MUST be an object and + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 135 ;; not a URI, which it doesn't say anywhere else, but this seems + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 136 ;; to make no sense? + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 137 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 138 :duration {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 139 :if-invalid [:must :invalid-duration] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 140 :validator xsd-duration?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 141 :endTime {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 142 :if-invalid [:must :invalid-date-time] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 143 :validator xsd-date-time?} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 144 :first {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 145 :if-missing [:minor :paged-collection-no-first] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 146 :if-invalid [:must :paged-collection-invalid-first] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 147 :required (fn [x] ;; if an object is a collection which has pages, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 148 ;; it ought to have a `:first` page. But + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 149 ;; 1. it isn't required to, and + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 150 ;; 2. there's no certain way of telling that it + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 151 ;; does have pages - although if it has a + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 152 ;; `:last`, then it is. + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 153 (and + </span><br/> +<span class="covered" title="12 out of 12 forms covered"> + 154 (or (has-type? x "Collection") + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 155 (has-type? x "OrderedCollection")) + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 156 (:last x))) + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 157 :validator (fn [pv] (object-or-uri? pv #{"CollectionPage" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 158 "OrderedCollectionPage"}))} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 159 :formerType {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 160 :if-missing [:minor :tombstone-missing-former-type] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 161 :if-invalid [:must :invalid-former-type] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 162 :required (fn [x] (has-type? x "Tombstone")) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 163 ;; The narrative of the spec says this should be an `Object`, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 164 ;; but in all the provided examples it's a string. + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 165 :validator string?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 166 :generator {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 167 :if-invalid [:must :invalid-generator] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 168 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 169 :height {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 170 :if-invalid [:must :invalid-non-negative] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 171 :validator xsd-non-negative-integer?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 172 :href {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 173 :if-invalid [:must :invalid-href] + </span><br/> +<span class="partial" title="1 out of 7 forms covered"> + 174 :validator (fn [pv] (try (uri? (URI. pv)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 175 (catch URISyntaxException _ false)))} + </span><br/> +<span class="partial" title="3 out of 9 forms covered"> + 176 :hreflang {:validator (fn [pv] (truthy? (re-matches re-rfc5646 pv)))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 177 :icon {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 178 :if-invalid [:must :invalid-icon] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 179 ;; an icon is also expected to have a 1:1 aspect ratio, but that's + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 180 ;; too much detail at this level of verification + </span><br/> +<span class="partial" title="1 out of 5 forms covered"> + 181 :validator (fn [pv] (object-or-uri? pv "Image"))} + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 182 :id {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 183 :if-missing [:minor :no-id-transient] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 184 :if-invalid [:must :invalid-id] + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 185 :validator (fn [pv] (try (uri? (URI. pv)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 186 (catch URISyntaxException _ false)))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 187 :image {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 188 :if-invalid [:must :invalid-image] + </span><br/> +<span class="partial" title="1 out of 5 forms covered"> + 189 :validator (fn [pv] (object-or-uri? pv "Image"))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 190 :inReplyTo {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 191 :if-invalid [:must :invalid-in-reply-to] + </span><br/> +<span class="partial" title="1 out of 5 forms covered"> + 192 :validator (fn [pv] (object-or-uri? pv noun-types))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 193 :instrument {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 194 :if-invalid [:must :invalid-instrument] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 195 :validator object-or-uri?} + </span><br/> +<span class="covered" title="9 out of 9 forms covered"> + 196 :items {:collection true + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 197 :functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 198 :if-invalid [:must :invalid-items] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 199 :if-missing [:must :no-items-or-pages] + </span><br/> +<span class="partial" title="19 out of 22 forms covered"> + 200 :required (fn [x] (or (has-type? x "CollectionPage") + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 201 (and (has-type? x "Collection") + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 202 ;; if it's a collection and has pages, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 203 ;; it doesn't need items. + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 204 (not (:current x)) + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 205 (not (:first x)) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 206 (not (:last x))))) + </span><br/> +<span class="partial" title="11 out of 12 forms covered"> + 207 :validator (fn [pv] (and (coll? pv) (every? object-or-uri? pv)))} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 208 :last {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 209 :if-missing [:minor :paged-collection-no-last] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 210 :if-invalid [:must :paged-collection-invalid-last] + </span><br/> +<span class="partial" title="6 out of 9 forms covered"> + 211 :required (fn [x] (if (and + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 212 (string? x) + </span><br/> +<span class="not-covered" title="0 out of 4 forms covered"> + 213 (try (uri? (URI. x)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 214 (catch URISyntaxException _ false))) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 215 true + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 216 ;; if an object is a collection which has pages, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 217 ;; it ought to have a `:last` page. But + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 218 ;; 1. it isn't required to, and + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 219 ;; 2. there's no certain way of telling that it + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 220 ;; does have pages - although if it has a + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 221 ;; `:first`, then it is. + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 222 (and + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 223 (has-type? x #{"Collection" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 224 "OrderedCollection"}) + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 225 (:first x)))) + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 226 :validator (fn [pv] (object-or-uri? pv #{"CollectionPage" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 227 "OrderedCollectionPage"}))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 228 :latitude {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 229 :if-invalid [:must :invalid-latitude] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 230 ;; The XSD spec says this is an IEEE 754-2008, and the IEEE + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 231 ;; wants US$104 for me to find out what that is. So I don't + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 232 ;; strictly know that an integer is valid here. + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 233 :validator xsd-float?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 234 :location {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 235 :if-invalid [:must :invalid-location] + </span><br/> +<span class="partial" title="1 out of 6 forms covered"> + 236 :validator (fn [pv] (object-or-uri? pv #{"Place"}))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 237 :longitude {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 238 :if-invalid [:must :invalid-longitude] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 239 :validator xsd-float?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 240 :mediaType {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 241 :if-invalid [:must :invalid-mime-type] + </span><br/> +<span class="partial" title="1 out of 7 forms covered"> + 242 :validator (fn [pv] (truthy? (re-matches #"\w+/[-.\w]+(?:\+[-.\w]+)?" pv)))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 243 :name {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 244 :if-invalid [:must :invalid-name] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 245 :validator string?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 246 :next {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 247 :if-invalid [:must :invalid-next-page] + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 248 :validator (fn [pv] (object-or-uri? pv #{"CollectionPage" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 249 "OrderedCollectionPage"}))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 250 :object {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 251 :if-invalid [:must :invalid-direct-object] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 252 :validator object-or-uri?} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 253 :oneOf {:collection true + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 254 :functional false + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 255 ;; a Question should have a `:oneOf` ot `:anyOf`, but at this layer + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 256 ;; that's hard to check. + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 257 :if-invalid [:must :invalid-option] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 258 :validator object-or-uri?} + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 259 + </span><br/> +<span class="covered" title="9 out of 9 forms covered"> + 260 :orderedItems {:collection true + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 261 :functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 262 :if-invalid [:must :invalid-items] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 263 :if-missing [:must :no-items-or-pages] + </span><br/> +<span class="partial" title="20 out of 22 forms covered"> + 264 :required (fn [x] (or (has-type? x "OrderedCollectionPage") + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 265 (and (has-type? x "OrderedCollection") + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 266 ;; if it's a collection and has pages, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 267 ;; it doesn't need items. + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 268 (not (:current x)) + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 269 (not (:first x)) + </span><br/> +<span class="not-covered" title="0 out of 4 forms covered"> + 270 (not (:last x))))) + </span><br/> +<span class="partial" title="11 out of 12 forms covered"> + 271 :validator (fn [pv] (and (coll? pv) (every? object-or-uri? pv)))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 272 :origin {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 273 :if-invalid [:must :invalid-origin] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 274 :validator object-or-uri?} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 275 :partOf {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 276 :if-missing [:must :missing-part-of] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 277 :if-invalid [:must :invalid-part-of] + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 278 :required (fn [x] (object-or-uri? x #{"CollectionPage" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 279 "OrderedCollectionPage"})) + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 280 :validator (fn [pv] (object-or-uri? pv #{"Collection" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 281 "OrderedCollection"}))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 282 :prev {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 283 :if-invalid [:must :invalid-prior-page] + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 284 :validator (fn [pv] (object-or-uri? pv #{"CollectionPage" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 285 "OrderedCollectionPage"}))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 286 :preview {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 287 :if-invalid [:must :invalid-preview] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 288 ;; probably likely to be an Image or Video, but that isn't stated. + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 289 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 290 :published {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 291 :if-invalid [:must :invalid-date-time] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 292 :validator xsd-date-time?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 293 :replies {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 294 :if-invalid [:must :invalid-replies] + </span><br/> +<span class="partial" title="1 out of 7 forms covered"> + 295 :validator (fn [pv] (object-or-uri? pv #{"Collection" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 296 "OrderedCollection"}))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 297 :radius {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 298 :if-invalid [:must :invalid-positive-number] + </span><br/> +<span class="partial" title="1 out of 11 forms covered"> + 299 :validator (fn [pv] (and (xsd-float? pv) (> pv 0)))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 300 :rel {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 301 :if-invalid [:must :invalid-link-relation] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 302 ;; TODO: this is not really good enough. + </span><br/> +<span class="partial" title="1 out of 7 forms covered"> + 303 :validator (fn [pv] (truthy? (re-matches #"[a-zA-A0-9_\-\.\:\?/\\]*" pv)))} + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 304 :relationship {;; this exists in the spec, but it doesn't seem to be required and it's + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 305 ;; extremely hazily specified. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 306 } + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 307 :result {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 308 :if-invalid [:must :invalid-result] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 309 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 310 :startIndex {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 311 :if-invalid [:must :invalid-start-index] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 312 :validator xsd-non-negative-integer?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 313 :start-time {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 314 :if-invalid [:must :invalid-date-time] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 315 :validator xsd-date-time?} + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 316 :subject {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 317 :if-invalid [:must :invalid-subject] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 318 :if-missing [:minor :no-relationship-subject] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 319 :required (fn [x] (has-type? x "Relationship")) + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 320 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 321 :summary {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 322 :if-invalid [:must :invalid-summary] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 323 ;; TODO: HTML formatting is allowed, but other forms of formatting + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 324 ;; are not. Can this be validated? + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 325 :validator string?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 326 :tag {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 327 :if-invalid [:must :invalid-tag] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 328 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 329 :target {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 330 :if-invalid [:must :invalid-target] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 331 :validator object-or-uri?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 332 :to {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 333 :if-invalid [:must :invalid-to] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 334 :validator (fn [pv] (object-or-uri? pv actor-types))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 335 :totalItems {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 336 :if-invalid [:must :invalid-total-items] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 337 :validator xsd-non-negative-integer?} + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 338 :type {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 339 :if-missing [:minor :no-type] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 340 :if-invalid [:must :invalid-type] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 341 ;; strictly, it's an `anyURI`, but realistically these are not checkable. + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 342 :validator string?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 343 :units {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 344 :if-invalid [:must :invalid-units] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 345 ;; the narrative says that `anyURI`, but actually unless it's a recognised + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 346 ;; unit the property is useless. These are the units explicitly specified. + </span><br/> +<span class="partial" title="1 out of 10 forms covered"> + 347 :validator (fn [pv] (#{"cm" "feet" "inches" "km" "m" "miles"} pv))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 348 :updated {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 349 :if-invalid [:must :invalid-updated] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 350 :validator xsd-date-time?} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 351 :url {:functional false + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 352 :if-invalid [:must :invalid-url-property] + </span><br/> +<span class="partial" title="1 out of 5 forms covered"> + 353 :validator (fn [pv] (object-or-uri? pv "Link"))} + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 354 :width {:functional true + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 355 :if-invalid [:must :invalid-width] + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 356 :validator xsd-non-negative-integer?}}) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 357 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 358 (defn check-property-required [obj prop clause] + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 359 (let [required (:required clause) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 360 [severity token] (:if-missing clause)] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 361 (when required + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 362 (when + </span><br/> +<span class="covered" title="15 out of 15 forms covered"> + 363 (and (apply required (list obj)) (not (obj prop))) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 364 (make-fault-object severity token))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 365 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 366 (defn check-property-valid + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 367 [obj prop clause] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 368 ;; (info "obj" obj "prop" prop "clause" clause) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 369 (let [val (obj prop) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 370 validator (:validator clause) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 371 [severity token] (:if-invalid clause)] + </span><br/> +<span class="covered" title="8 out of 8 forms covered"> + 372 (when (and val validator) + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 373 (cond-make-fault-object + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 374 (apply validator (list val)) + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 375 severity token)))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 376 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 377 (defn check-property [obj prop] + </span><br/> +<span class="covered" title="14 out of 14 forms covered"> + 378 (assert (map? obj)) + </span><br/> +<span class="partial" title="5 out of 14 forms covered"> + 379 (assert (keyword? prop)) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 380 (let [clause (object-expected-properties prop)] + </span><br/> +<span class="partial" title="7 out of 8 forms covered"> + 381 (nil-if-empty + </span><br/> +<span class="covered" title="9 out of 9 forms covered"> + 382 (remove nil? + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 383 (list + </span><br/> +<span class="covered" title="15 out of 15 forms covered"> + 384 (check-property-required obj prop clause) + </span><br/> +<span class="covered" title="15 out of 15 forms covered"> + 385 (check-property-valid obj prop clause)))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 386 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 387 (defn properties-faults + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 388 "Return a lost of faults found on properties of the object `x`, or + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 389 `nil` if none are." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 390 [x] + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 391 (apply + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 392 concat-non-empty + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 393 (let [props (set (keys x)) + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 394 required (set + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 395 (filter + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 396 #((object-expected-properties %) :required) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 397 (keys object-expected-properties)))] + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 398 (map + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 399 (fn [p] (check-property x p)) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 400 (union props required))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 401 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 402 (defn object-faults + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 403 "Return a list of faults found in object `x`, or `nil` if none are. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 404 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 405 If `expected-type` is also passed, verify that `x` has `expected-type`. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 406 `expected-type` may be passed as a string or as a set of strings. Detailed + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 407 verification of the particular features of types is not done here." + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 408 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 409 ;; TODO: many more properties which are nor required, nevertheless have required + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 410 ;; property TYPES as detailed in + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 411 ;; https://www.w3.org/TR/activitystreams-vocabulary/#properties + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 412 ;; if these properties are present, these types should be checked. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 413 ([x] + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 414 (concat-non-empty + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 415 (remove empty? + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 416 (list + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 417 (when-not (map? x) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 418 (make-fault-object :critical :not-an-object)) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 419 (when-not + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 420 (has-context? x) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 421 (make-fault-object :should :no-context)) + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 422 (when-not (:type x) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 423 (make-fault-object :minor :no-type)) + </span><br/> +<span class="covered" title="14 out of 14 forms covered"> + 424 (when-not (and (map? x) (contains? x :id)) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 425 (make-fault-object :minor :no-id-transient)))) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 426 (properties-faults x))) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 427 ([x expected-type] + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 428 (concat-non-empty + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 429 (object-faults x) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 430 (when expected-type + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 431 (list + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 432 (has-type-or-fault x expected-type :critical :unexpected-type)))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 433 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 434 (def maybe-reify + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 435 "If `*reify-refs*` is `true`, return the object at this `target` URI. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 436 Returns `nil` if + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 437 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 438 1. `*reify-refs*` is false; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 439 2. the object was not found; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 440 3. access to the object was not permitted. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 441 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 442 Consequently, use with care." + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 443 (memoize + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 444 (fn [target] + </span><br/> +<span class="partial" title="4 out of 6 forms covered"> + 445 (try (let [uri (URI. target)] + </span><br/> +<span class="partial" title="2 out of 3 forms covered"> + 446 (when *reify-refs* + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 447 (json/read-str (slurp uri)))) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 448 (catch URISyntaxException _ + </span><br/> +<span class="not-covered" title="0 out of 18 forms covered"> + 449 (warn "Reification target" target "was not a valid URI.") + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 450 nil) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 451 (catch FileNotFoundException _ + </span><br/> +<span class="not-covered" title="0 out of 18 forms covered"> + 452 (warn "Reification target" target "was not found.") + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 453 nil))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 454 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 455 (defn maybe-reify-or-faults + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 456 "If `*reify-refs*` is `true`, runs basic checks on the object at this + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 457 `target` URI, if it is found, or a list containing a fault object with + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 458 this `severity` and `token` if it is not." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 459 [value expected-type severity token] + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 460 (let [object (maybe-reify value)] + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 461 (cond object + </span><br/> +<span class="not-covered" title="0 out of 4 forms covered"> + 462 (object-faults object expected-type) + </span><br/> +<span class="partial" title="1 out of 7 forms covered"> + 463 *reify-refs* (list (make-fault-object severity token))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 464 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 465 (defn object-reference-or-faults + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 466 "If this `value` is either + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 467 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 468 1. an object of `expected-type`; + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 469 2. a URI referencing an object of `expected-type`; or + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 470 3. a link object referencing an object of `expected-type` + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 471 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 472 and no faults are returned from validating the linked object, then return + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 473 `nil`; else return a sequence comprising a fault object with this `severity` + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 474 and `token`, prepended to the faults returned. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 475 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 476 As with `has-type-or-fault` (q.v.), `expected-type` may be passed as a + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 477 string, as a set of strings, or `nil` (indicating the type of the + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 478 referenced object should not be checked). + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 479 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 480 **NOTE THAT** if `*reify-refs*` is `false`, referenced objects will not + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 481 actually be checked." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 482 [value expected-type severity token] + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 483 (let [faults (cond + </span><br/> +<span class="covered" title="9 out of 9 forms covered"> + 484 (string? value) (maybe-reify-or-faults value severity token expected-type) + </span><br/> +<span class="covered" title="8 out of 8 forms covered"> + 485 (map? value) (if (has-type? value "Link") + </span><br/> +<span class="not-covered" title="0 out of 7 forms covered"> + 486 (cond + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 487 ;; if we were looking for a link and we've + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 488 ;; found a link, that's OK. + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 489 (= expected-type "Link") nil + </span><br/> +<span class="not-covered" title="0 out of 10 forms covered"> + 490 (and (set? expected-type) (expected-type "Link")) nil + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 491 (nil? expected-type) nil + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 492 :else + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 493 (object-reference-or-faults + </span><br/> +<span class="not-covered" title="0 out of 6 forms covered"> + 494 (:href value) expected-type severity token)) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 495 (object-faults value expected-type)) + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 496 :else (throw + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 497 (ex-info + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 498 "Argument `value` was not an object or a link to an object" + </span><br/> +<span class="covered" title="8 out of 8 forms covered"> + 499 {:arguments {:value value} + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 500 :expected-type expected-type + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 501 :severity severity + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 502 :token token})))] + </span><br/> +<span class="covered" title="10 out of 10 forms covered"> + 503 (when faults (cons (make-fault-object severity token) faults)))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 504 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 505 (defn coll-object-reference-or-fault + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 506 "As object-reference-or-fault, except `value` argument may also be a list of + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 507 objects and/or object references." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 508 [value expected-type severity token] + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 509 (cond + </span><br/> +<span class="not-covered" title="0 out of 9 forms covered"> + 510 (map? value) (object-reference-or-faults value expected-type severity token) + </span><br/> +<span class="not-covered" title="0 out of 5 forms covered"> + 511 (coll? value) (concat-non-empty + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 512 (map + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 513 #(object-reference-or-faults + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 514 % expected-type severity token) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 515 value)) + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 516 :else (throw + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 517 (ex-info + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 518 "Argument `value` was not an object, a link to an object, nor a list of these." + </span><br/> +<span class="not-covered" title="0 out of 8 forms covered"> + 519 {:arguments {:value value} + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 520 :expected-type expected-type + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 521 :severity severity + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 522 :token token})))) + </span><br/> + </body> +</html> diff --git a/docs/cloverage/dog_and_duck/quack/picky/scratch.clj.html b/docs/cloverage/dog_and_duck/quack/picky/scratch.clj.html new file mode 100644 index 0000000..3a5ad6b --- /dev/null +++ b/docs/cloverage/dog_and_duck/quack/picky/scratch.clj.html @@ -0,0 +1,167 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" href="../../../coverage.css"/> <title> dog_and_duck/quack/picky/scratch.clj </title> + </head> + <body> +<span class="covered" title="1 out of 1 forms covered"> + 001 (ns dog-and-duck.quack.picky.scratch + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 002 "Development scratchpad" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 003 (:require [clojure.data.json :refer [read-str]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 004 [clojure.java.io :refer [file]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 005 [clojure.walk :refer [keywordize-keys]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 006 [dog-and-duck.quack.picky.distribution :refer [distribution]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 007 [dog-and-duck.quack.picky.objects :refer + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 008 [object-faults properties-faults]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 009 [dog-and-duck.quack.picky.utils :refer [concat-non-empty + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 010 filter-severity]])) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 011 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 012 ;; (def files (filter + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 013 ;; #(and (.isFile %) (.endsWith (.getName %) ".json")) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 014 ;; (file-seq (file "resources/activitystreams-test-documents")))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 015 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 016 ;; (def r + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 017 ;; (reduce + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 018 ;; concat-non-empty + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 019 ;; (map + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 020 ;; #(try + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 021 ;; (let [contents (read-str (slurp %)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 022 ;; faults (cond (map? contents) (filter-severity + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 023 ;; (object-faults + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 024 ;; (keywordize-keys contents)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 025 ;; :should) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 026 ;; ;; (coll? contents) (apply + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 027 ;; ;; concat-non-empty + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 028 ;; ;; (map (fn [obj] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 029 ;; ;; (object-faults + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 030 ;; ;; (keywordize-keys obj))) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 031 ;; ;; contents)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 032 ;; )] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 033 ;; (map (fn [f] (assoc f :document (.getName %))) faults)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 034 ;; (catch Exception any + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 035 ;; [(.getName %) (str "Exception " + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 036 ;; (.getName (.getClass any)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 037 ;; ": " + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 038 ;; (.getMessage any))])) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 039 ;; (filter + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 040 ;; #(and (.isFile %) (.endsWith (.getName %) ".json")) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 041 ;; (file-seq (file "resources/activitystreams-test-documents")))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 042 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 043 ;; (count (filter-severity (object-faults (keywordize-keys (read-str (slurp "resources/activitystreams-test-documents/vocabulary-ex189-jsonld.json")))) :critical)) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 044 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 045 ;; (count (filter + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 046 ;; #(and (.isFile %) (.endsWith (.getName %) ".json")) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 047 ;; (file-seq (file "resources/activitystreams-test-documents")))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 048 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 049 ;; (count r) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 050 ;; (last r) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 051 ;; (clojure.pprint/pprint (last r)) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 052 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 053 ;; (distribution :fault r) + </span><br/> + </body> +</html> diff --git a/docs/cloverage/dog_and_duck/quack/picky/time.clj.html b/docs/cloverage/dog_and_duck/quack/picky/time.clj.html new file mode 100644 index 0000000..914070a --- /dev/null +++ b/docs/cloverage/dog_and_duck/quack/picky/time.clj.html @@ -0,0 +1,206 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" href="../../../coverage.css"/> <title> dog_and_duck/quack/picky/time.clj </title> + </head> + <body> +<span class="covered" title="1 out of 1 forms covered"> + 001 (ns dog-and-duck.quack.picky.time + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 002 "Time, gentleman, please! Recognising and validating date time values." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 003 (:require [dog-and-duck.quack.picky.utils :refer [cond-make-fault-object + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 004 make-fault-object + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 005 truthy?]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 006 [scot.weft.i18n.core :refer [get-message]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 007 [taoensso.timbre :refer [warn error]]) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 008 (:import [java.time LocalDateTime] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 009 [java.time.format DateTimeFormatter DateTimeParseException] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 010 [javax.xml.datatype DatatypeFactory])) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 011 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 012 ;;; Copyright (C) Simon Brooke, 2023 + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 013 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 014 ;;; This program is free software; you can redistribute it and/or + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 015 ;;; modify it under the terms of the GNU General Public License + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 016 ;;; as published by the Free Software Foundation; either version 2 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 017 ;;; of the License, or (at your option) any later version. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 018 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 019 ;;; This program is distributed in the hope that it will be useful, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 020 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 021 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 022 ;;; GNU General Public License for more details. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 023 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 024 ;;; You should have received a copy of the GNU General Public License + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 025 ;;; along with this program; if not, write to the Free Software + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 026 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 027 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 028 (defn xsd-date-time? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 029 "Return `true` if `value` matches the pattern for an + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 030 [xsd:dateTime](https://www.w3.org/TR/xmlschema11-2/#dateTime), else `false`" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 031 [^String value] + </span><br/> +<span class="partial" title="1 out of 3 forms covered"> + 032 (try + </span><br/> +<span class="partial" title="5 out of 6 forms covered"> + 033 (if (LocalDateTime/from (.parse DateTimeFormatter/ISO_DATE_TIME value)) true false) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 034 (catch DateTimeParseException _ + </span><br/> +<span class="not-covered" title="0 out of 20 forms covered"> + 035 (warn (get-message :bad-date-time) ":" value) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 036 false) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 037 (catch Exception e + </span><br/> +<span class="not-covered" title="0 out of 18 forms covered"> + 038 (error "Exception thrown while parsing date" value e) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 039 false))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 040 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 041 (defn xsd-duration? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 042 "Return `true` if `value` matches the pattern for an + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 043 [xsd:duration](https://www.w3.org/TR/xmlschema11-2/#duration), else `false`" + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 044 [value] + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 045 (truthy? + </span><br/> +<span class="not-covered" title="0 out of 10 forms covered"> + 046 (and (string? value) + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 047 (try (.newDuration (DatatypeFactory/newInstance) value) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 048 (catch IllegalArgumentException _ + </span><br/> +<span class="not-covered" title="0 out of 20 forms covered"> + 049 (warn (get-message :bad-duration) ":" value) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 050 false) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 051 (catch Exception e + </span><br/> +<span class="not-covered" title="0 out of 18 forms covered"> + 052 (error "Exception thrown while parsing duration" value e) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 053 false))))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 054 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 055 (defn date-time-property-or-fault + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 056 "If the value of this `property` of object `x` is a valid xsd:dateTime + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 057 value, return a fault object with this `token` and `severity`. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 058 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 059 If `required?` is false and there is no such property, no fault will be + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 060 returned." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 061 [x property severity token required?] + </span><br/> +<span class="not-covered" title="0 out of 4 forms covered"> + 062 (let [value (property x)] + </span><br/> +<span class="not-covered" title="0 out of 11 forms covered"> + 063 (if (and required? (not (x property))) + </span><br/> +<span class="not-covered" title="0 out of 4 forms covered"> + 064 (make-fault-object severity token) + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 065 (cond-make-fault-object + </span><br/> +<span class="not-covered" title="0 out of 10 forms covered"> + 066 (and value (xsd-date-time? value)) severity token)))) + </span><br/> + </body> +</html> diff --git a/docs/cloverage/dog_and_duck/quack/picky/utils.clj.html b/docs/cloverage/dog_and_duck/quack/picky/utils.clj.html index 51c6d14..2180db1 100644 --- a/docs/cloverage/dog_and_duck/quack/picky/utils.clj.html +++ b/docs/cloverage/dog_and_duck/quack/picky/utils.clj.html @@ -11,955 +11,757 @@ 002 "Utility functions supporting the picky validator" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 003 (:require [clojure.data.json :as json] + 003 (:require [clojure.set :refer [intersection]] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 004 [clojure.set :refer [intersection]] + 004 [dog-and-duck.quack.picky.constants :refer [activitystreams-context-uri </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 005 [dog-and-duck.quack.picky.constants :refer [activitystreams-context-uri + 005 actor-types </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 006 actor-types + 006 context-key severity-filters </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 007 context-key severity-filters + 007 validation-fault-context-uri </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 008 validation-fault-context-uri + 008 activity-types]] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 009 verb-types]] + 009 [dog-and-duck.utils.process :refer [get-hostname get-pid]] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 010 [dog-and-duck.quack.picky.control-variables :refer [*reify-refs*]] + 010 [scot.weft.i18n.core :refer [get-message]] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 011 [dog-and-duck.quack.picky.fault-messages :refer [messages]] + 011 [taoensso.timbre :as log :refer [warn]]) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 012 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 012 [dog-and-duck.utils.process :refer [get-hostname get-pid]] - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 013 [taoensso.timbre :as log :refer [warn]]) + 013 (:import [java.net URI URISyntaxException])) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 014 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 015 (:import [java.net URI URISyntaxException])) + 015 ;;; Copyright (C) Simon Brooke, 2022 </span><br/> <span class="blank" title="0 out of 0 forms covered"> 016 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 017 ;;; Copyright (C) Simon Brooke, 2022 + 017 ;;; This program is free software; you can redistribute it and/or + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 018 ;;; modify it under the terms of the GNU General Public License + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 019 ;;; as published by the Free Software Foundation; either version 2 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 020 ;;; of the License, or (at your option) any later version. </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 018 + 021 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 019 ;;; This program is free software; you can redistribute it and/or + 022 ;;; This program is distributed in the hope that it will be useful, </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 020 ;;; modify it under the terms of the GNU General Public License + 023 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 021 ;;; as published by the Free Software Foundation; either version 2 + 024 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 022 ;;; of the License, or (at your option) any later version. + 025 ;;; GNU General Public License for more details. </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 023 + 026 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 024 ;;; This program is distributed in the hope that it will be useful, + 027 ;;; You should have received a copy of the GNU General Public License </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 025 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of + 028 ;;; along with this program; if not, write to the Free Software </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 026 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 027 ;;; GNU General Public License for more details. + 029 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 028 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 029 ;;; You should have received a copy of the GNU General Public License - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 030 ;;; along with this program; if not, write to the Free Software - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 031 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + 030 </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 032 - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 033 + 031 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 034 (defn actor-type? + 032 (defn actor-type? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 035 "Return `true` if the `x` is a recognised actor type, else `false`." + 033 "Return `true` if the `x` is a recognised actor type, else `false`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 036 [^String x] + 034 [^String x] </span><br/> <span class="covered" title="6 out of 6 forms covered"> - 037 (if (actor-types x) true false)) + 035 (if (actor-types x) true false)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 038 + 036 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 039 (defn truthy? + 037 (defn truthy? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 040 "Return `true` if `x` is truthy, else `false`. There must be some more + 038 "Return `true` if `x` is truthy, else `false`. There must be some more </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 041 idiomatic way to do this?" + 039 idiomatic way to do this?" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 042 [x] + 040 [x] </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 043 (if x true false)) +<span class="covered" title="4 out of 4 forms covered"> + 041 (if x true false)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 044 + 042 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 045 (defn has-type? + 043 (defn xsd-non-negative-integer? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 046 "Return `true` if object `x` has type `type`, else `false`. + 044 "Return `true` if `value` matches the pattern for an </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 047 + 045 [xsd:nonNegativeInteger](https://www.w3.org/TR/xmlschema11-2/#nonNegativeInteger), else `false`" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 048 The values of `type` fields of ActivityStreams objects may be lists; they + 046 [x] </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 049 are considered to have a type if the type token is a member of the list." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 050 [x type] - </span><br/> -<span class="not-covered" title="0 out of 18 forms covered"> - 051 (assert (map? x) (string? type)) - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 052 (let [tv (:type x)] - </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 053 (cond - </span><br/> -<span class="not-covered" title="0 out of 14 forms covered"> - 054 (coll? tv) (truthy? (not-empty (filter #(= % type) tv))) - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 055 :else (= tv type)))) +<span class="partial" title="9 out of 10 forms covered"> + 047 (and (integer? x)(>= x 0))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 056 + 048 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 057 (defn object-or-uri? + 049 (defn has-type? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 058 "Very basic check that `x` is either an object or a URI." + 050 "Return `true` if object `x` has a type in `acceptable`, else `false`. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 059 [x] - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 060 (try - </span><br/> -<span class="not-covered" title="0 out of 11 forms covered"> - 061 (cond (string? x) (uri? (URI. x)) - </span><br/> -<span class="not-covered" title="0 out of 16 forms covered"> - 062 (map? x) (if (and (:type x) (:id x)) true false) + 051 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 063 :else false) + 052 The values of `:type` fields of ActivityStreams objects may be lists; they </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 064 (catch URISyntaxException _ false) + 053 are considered to have a type if a member of the list is in `acceptable`. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 065 (catch NullPointerException _ false))) + 054 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 055 `acceptable` may be passed as a string, in which case there is only one + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 056 acceptable value, or as a set of strings, in which case any member of the + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 057 set is acceptable." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 058 [x acceptable] + </span><br/> +<span class="partial" title="5 out of 25 forms covered"> + 059 (assert (map? x) (or (string? acceptable) (set? acceptable))) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 060 (let [tv (:type x)] + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 061 (truthy? + </span><br/> +<span class="partial" title="4 out of 5 forms covered"> + 062 (cond + </span><br/> +<span class="partial" title="10 out of 19 forms covered"> + 063 (and (string? acceptable) (coll? tv)) (not-empty (filter #(= % acceptable) tv)) + </span><br/> +<span class="partial" title="10 out of 19 forms covered"> + 064 (and (set? acceptable) (coll? tv)) (not-empty (filter #(acceptable %) tv)) + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 065 (string? acceptable) (= tv acceptable) + </span><br/> +<span class="covered" title="6 out of 6 forms covered"> + 066 (set? acceptable) (acceptable tv))))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 066 + 067 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 068 (defn object-or-uri? + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 069 "Very basic check that `x` is either an object or a URI." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 070 ([x] + </span><br/> +<span class="partial" title="1 out of 3 forms covered"> + 071 (try + </span><br/> +<span class="covered" title="12 out of 12 forms covered"> + 072 (cond (string? x) (uri? (URI. x)) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 073 (map? x) true + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 074 :else false) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 075 (catch URISyntaxException _ false) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 076 (catch NullPointerException _ false))) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 077 ([x type] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 078 (if (object-or-uri? x) + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 079 (if (map? x) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 080 (has-type? x type) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 081 true) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 082 false))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 083 </span><br/> <span class="partial" title="5 out of 46 forms covered"> - 067 (defmacro link-or-uri? + 084 (defmacro link-or-uri? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 068 "Very basic check that `x` is either a link object or a URI." + 085 "Very basic check that `x` is either a link object or a URI." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 069 [x] + 086 [x] </span><br/> <span class="not-covered" title="0 out of 2 forms covered"> - 070 `(if (object-or-uri? ~x) (has-type? ~x "Link") false)) + 087 `(if (object-or-uri? ~x) (has-type? ~x "Link") false)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 071 + 088 </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 072 + 089 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 073 (defn verb-type? + 090 (defn activity-type? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 074 "`true` if `x`, a string, represents a recognised ActivityStreams activity + 091 "`true` if `x`, a string, represents a recognised ActivityStreams activity </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 075 type." + 092 type." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 076 [^String x] + 093 [^String x] </span><br/> <span class="covered" title="6 out of 6 forms covered"> - 077 (if (verb-types x) true false)) + 094 (if (activity-types x) true false)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 078 + 095 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 079 (defn has-activity-type? + 096 (defn has-activity-type? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 080 "Return `true` if the object `x` has a type which is an activity type, else + 097 "Return `true` if the object `x` has a type which is an activity type, else </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 081 `false`." + 098 `false`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 082 [x] - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 083 (let [tv (:type x)] - </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 084 (cond - </span><br/> -<span class="not-covered" title="0 out of 11 forms covered"> - 085 (coll? tv) (truthy? (not-empty (filter verb-type? tv))) - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 086 :else (verb-type? tv)))) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 087 - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 088 (defn has-actor-type? - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 089 "Return `true` if the object `x` has a type which is an actor type, else - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 090 `false`." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 091 [x] + 099 [x] </span><br/> <span class="covered" title="4 out of 4 forms covered"> - 092 (let [tv (:type x)] + 100 (let [tv (:type x)] </span><br/> <span class="covered" title="2 out of 2 forms covered"> - 093 (cond + 101 (cond </span><br/> <span class="partial" title="3 out of 11 forms covered"> - 094 (coll? tv) (truthy? (not-empty (filter actor-type? tv))) + 102 (coll? tv) (truthy? (not-empty (filter activity-type? tv))) </span><br/> <span class="covered" title="3 out of 3 forms covered"> - 095 :else (actor-type? tv)))) + 103 :else (activity-type? tv)))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 096 + 104 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 097 (defn filter-severity + 105 (defn has-actor-type? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 098 "Return a list of reports taken from these `reports` where the severity + 106 "Return `true` if the object `x` has a type which is an actor type, else </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 099 of the report is greater than this or equal to this `severity`." + 107 `false`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 100 [reports severity] + 108 [x] </span><br/> -<span class="partial" title="6 out of 7 forms covered"> - 101 (cond (nil? reports) nil +<span class="covered" title="4 out of 4 forms covered"> + 109 (let [tv (:type x)] + </span><br/> +<span class="covered" title="2 out of 2 forms covered"> + 110 (cond + </span><br/> +<span class="partial" title="3 out of 11 forms covered"> + 111 (coll? tv) (truthy? (not-empty (filter actor-type? tv))) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 112 :else (actor-type? tv)))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 113 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 114 (defn filter-severity + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 115 "Return a list of reports taken from these `reports` where the severity + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 116 of the report is greater than this or equal to this `severity`." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 117 [reports severity] + </span><br/> +<span class="partial" title="9 out of 11 forms covered"> + 118 (cond (nil? (severity-filters severity)) (throw + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 119 (ex-info + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 120 "Argument `severity` was not a valid severity key" + </span><br/> +<span class="not-covered" title="0 out of 6 forms covered"> + 121 {:arguments {:reports reports + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 122 :severity severity}})) + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 123 (empty? reports) nil </span><br/> <span class="partial" title="8 out of 10 forms covered"> - 102 (and + 124 (and </span><br/> <span class="covered" title="3 out of 3 forms covered"> - 103 (coll? reports) + 125 (coll? reports) </span><br/> <span class="covered" title="4 out of 4 forms covered"> - 104 (every? map? reports) + 126 (every? map? reports) </span><br/> <span class="covered" title="5 out of 5 forms covered"> - 105 (every? :severity reports)) (remove + 127 (every? :severity reports))(remove + </span><br/> +<span class="partial" title="4 out of 5 forms covered"> + 128 #(if (:severity %) </span><br/> <span class="covered" title="7 out of 7 forms covered"> - 106 #((severity-filters severity) (:severity %)) - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 107 reports) + 129 ((severity-filters severity) (:severity %)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 108 :else + 130 false) + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 131 reports) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 132 :else </span><br/> <span class="not-covered" title="0 out of 1 forms covered"> - 109 (throw + 133 (throw </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> - 110 (ex-info + 134 (ex-info </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 111 "Argument `reports` was not a collection of fault reports" + 135 "Argument `reports` was not a collection of fault reports" </span><br/> <span class="not-covered" title="0 out of 6 forms covered"> - 112 {:arguments {:reports reports + 136 {:arguments {:reports reports </span><br/> <span class="not-covered" title="0 out of 1 forms covered"> - 113 :severity severity}})))) + 137 :severity severity}})))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 114 + 138 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 115 (defn context? + 139 (defn context? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 116 "Returns `true` iff `x` quacks like an ActivityStreams context, else false. + 140 "Returns `true` iff `x` quacks like an ActivityStreams context, else false. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 117 + 141 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 118 A context is either + 142 A context is either </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 119 1. the URI (actually an IRI) `activitystreams-context-uri`, or + 143 1. the URI (actually an IRI) `activitystreams-context-uri`, or </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 120 2. a collection comprising that URI and a map." + 144 2. a collection comprising that URI and a map." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 121 [x] + 145 [x] </span><br/> <span class="partial" title="4 out of 6 forms covered"> - 122 (cond + 146 (cond </span><br/> <span class="covered" title="3 out of 3 forms covered"> - 123 (nil? x) false + 147 (nil? x) false </span><br/> <span class="covered" title="11 out of 11 forms covered"> - 124 (string? x) (and (= x activitystreams-context-uri) true) + 148 (string? x) (and (= x activitystreams-context-uri) true) </span><br/> <span class="partial" title="19 out of 20 forms covered"> - 125 (coll? x) (and (context? (first (remove map? x))) + 149 (coll? x) (and (context? (first (remove map? x))) </span><br/> <span class="covered" title="4 out of 4 forms covered"> - 126 (= (count x) 2) + 150 (= (count x) 2) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 127 true) + 151 true) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 128 :else false)) + 152 :else false)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 129 + 153 </span><br/> -<span class="covered" title="33 out of 33 forms covered"> - 130 (defmacro has-context? +<span class="covered" title="27 out of 27 forms covered"> + 154 (defmacro has-context? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 131 "True if `x` is an ActivityStreams object with a valid context, else `false`." + 155 "True if `x` is an ActivityStreams object with a valid context, else `false`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 132 [x] + 156 [x] </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 133 `(context? (context-key ~x))) + 157 `(context? (context-key ~x))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 134 + 158 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 135 (defn make-fault-object + 159 (defn make-fault-object </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 136 "Return a fault object with these `severity`, `fault` and `narrative` values. + 160 "Return a fault object with these `severity`, `fault` and `narrative` values. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 137 + 161 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 138 An ActivityPub object MUST have a globally unique ID. Whether this is + 162 An ActivityPub object MUST have a globally unique ID. Whether this is </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 139 meaningful depends on whether we persist fault report objects and serve + 163 meaningful depends on whether we persist fault report objects and serve </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 140 them, which at present I have no plans to do." + 164 them, which at present I have no plans to do." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 141 ;; TODO: should not pass in the narrative; instead should use the :fault value + 165 ;; TODO: should not pass in the narrative; instead should use the :fault value </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 142 ;; to look up the narrative in a resource file. + 166 ;; to look up the narrative in a resource file. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 143 [severity fault] + 167 [severity fault] </span><br/> <span class="covered" title="9 out of 9 forms covered"> - 144 (assoc {} + 168 (assoc {} </span><br/> <span class="covered" title="2 out of 2 forms covered"> - 145 context-key validation-fault-context-uri + 169 context-key validation-fault-context-uri </span><br/> <span class="covered" title="5 out of 5 forms covered"> - 146 :id (str "https://" + 170 :id (str "https://" </span><br/> <span class="covered" title="2 out of 2 forms covered"> - 147 (get-hostname) + 171 (get-hostname) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 148 "/fault/" + 172 "/fault/" </span><br/> <span class="covered" title="2 out of 2 forms covered"> - 149 (get-pid) + 173 (get-pid) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 150 ":" + 174 ":" </span><br/> <span class="covered" title="3 out of 3 forms covered"> - 151 (inst-ms (java.util.Date.))) + 175 (inst-ms (java.util.Date.))) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 152 :type "Fault" + 176 :type "Fault" </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 153 :severity severity + 177 :severity severity </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 154 :fault fault + 178 :fault fault </span><br/> <span class="partial" title="7 out of 8 forms covered"> - 155 :narrative (or (messages fault) + 179 :narrative (or (get-message fault) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 156 (do + 180 (do </span><br/> <span class="not-covered" title="0 out of 17 forms covered"> - 157 (warn "No narrative provided for fault token " fault) + 181 (warn "No narrative provided for fault token " fault) </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> - 158 (str fault))))) + 182 (str fault))))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 159 + 183 </span><br/> -<span class="covered" title="60 out of 60 forms covered"> - 160 (defmacro nil-if-empty +<span class="covered" title="58 out of 58 forms covered"> + 184 (defmacro nil-if-empty </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 161 "if `x` is an empty collection, return `nil`; else return `x`." + 185 "if `x` is an empty collection, return `nil`; else return `x`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 162 [x] + 186 [x] </span><br/> <span class="covered" title="2 out of 2 forms covered"> - 163 `(if (and (coll? ~x) (empty? ~x)) nil + 187 `(if (and (coll? ~x) (empty? ~x)) nil </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 164 ~x)) + 188 ~x)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 165 + 189 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 166 (defn concat-non-empty + 190 (defn concat-non-empty </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 167 "Quick function to replace the pattern (nil-if-empty (remove nil? (concat ...))) + 191 "Quick function to replace the pattern (nil-if-empty (remove nil? (concat ...))) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 168 which I'm using a lot!" + 192 which I'm using a lot!" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 169 [& lists] + 193 [& lists] </span><br/> <span class="partial" title="28 out of 29 forms covered"> - 170 (nil-if-empty (remove nil? (apply concat lists)))) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 171 - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 172 (defn has-type-or-fault - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 173 "If object `x` has a `:type` value which is `acceptable`, return `nil`; - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 174 else return a fault object with this `severity` and `token`. - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 175 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 176 `acceptable` may be passed as either nil, a string, or a set of strings. - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 177 If `acceptable` is `nil`, no type specific tests will be performed." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 178 [x acceptable severity token] - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 179 (when acceptable - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 180 (let [tv (:type x)] - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 181 (when-not - </span><br/> -<span class="not-covered" title="0 out of 5 forms covered"> - 182 (cond - </span><br/> -<span class="not-covered" title="0 out of 13 forms covered"> - 183 (and (string? tv) (string? acceptable)) (= tv acceptable) - </span><br/> -<span class="not-covered" title="0 out of 13 forms covered"> - 184 (and (string? tv) (set? acceptable)) (acceptable tv) - </span><br/> -<span class="not-covered" title="0 out of 15 forms covered"> - 185 (and (coll? tv) (string? acceptable)) ((set tv) acceptable) - </span><br/> -<span class="not-covered" title="0 out of 12 forms covered"> - 186 (and (coll? tv) (set? acceptable)) (not-empty - </span><br/> -<span class="not-covered" title="0 out of 6 forms covered"> - 187 (intersection (set tv) acceptable)) - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 188 :else - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 189 (throw (ex-info "Type value or `acceptable` argument not as expected." - </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 190 {:arguments {:x x - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 191 :acceptable acceptable - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 192 :severity severity - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 193 :token token}}))) - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 194 (make-fault-object severity token))))) + 194 (nil-if-empty (remove nil? (apply concat lists)))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 195 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 196 (defn any-or-faults + 196 (defn has-type-or-fault </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 197 "Return `nil` if validating one of these options returns `nil`; otherwise + 197 "If object `x` has a `:type` value which is `acceptable`, return `nil`; </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 198 return a list comprising a fault report object with this `severity-if-none` + 198 else return a fault object with this `severity` and `token`. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 199 and this token followed by all the fault reports from validating each + 199 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 200 option. + 200 `acceptable` may be passed as either nil, a string, or a set of strings. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 201 + 201 If `acceptable` is `nil`, no type specific tests will be performed." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 202 There are several places - but especially in validating collections - where - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 203 there are several different valid configurations, but few or no properties - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 204 are always required." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 205 [options severity-if-none token] - </span><br/> -<span class="not-covered" title="0 out of 5 forms covered"> - 206 (let [faults (filter empty? options)] - </span><br/> -<span class="not-covered" title="0 out of 5 forms covered"> - 207 (when (empty? faults) - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 208 ;; i.e. there was at least one option that returned no faults... - </span><br/> -<span class="not-covered" title="0 out of 7 forms covered"> - 209 (cons (make-fault-object severity-if-none token) faults)))) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 210 - </span><br/> -<span class="covered" title="31 out of 31 forms covered"> - 211 (defmacro cond-make-fault-object - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 212 "If `v` is `false` or `nil`, return a fault object with this `severity` and `token`, - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 213 else return nil." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 214 [v severity token] + 202 [x acceptable severity token] </span><br/> <span class="covered" title="3 out of 3 forms covered"> - 215 `(when-not ~v (make-fault-object ~severity ~token))) + 203 (when acceptable + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 204 (let [tv (:type x)] + </span><br/> +<span class="covered" title="3 out of 3 forms covered"> + 205 (when-not + </span><br/> +<span class="partial" title="1 out of 6 forms covered"> + 206 (cond + </span><br/> +<span class="partial" title="12 out of 13 forms covered"> + 207 (and (string? tv) (string? acceptable)) (= tv acceptable) + </span><br/> +<span class="not-covered" title="0 out of 13 forms covered"> + 208 (and (string? tv) (set? acceptable)) (acceptable tv) + </span><br/> +<span class="not-covered" title="0 out of 15 forms covered"> + 209 (and (coll? tv) (string? acceptable)) ((set tv) acceptable) + </span><br/> +<span class="not-covered" title="0 out of 12 forms covered"> + 210 (and (coll? tv) (set? acceptable)) (not-empty + </span><br/> +<span class="not-covered" title="0 out of 6 forms covered"> + 211 (intersection (set tv) acceptable)) + </span><br/> +<span class="not-covered" title="0 out of 2 forms covered"> + 212 (not + </span><br/> +<span class="not-covered" title="0 out of 8 forms covered"> + 213 (or (string? acceptable) + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 214 (set? acceptable))) (throw + </span><br/> +<span class="not-covered" title="0 out of 3 forms covered"> + 215 (ex-info + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 216 "`acceptable` argument not as expected." + </span><br/> +<span class="not-covered" title="0 out of 8 forms covered"> + 217 {:arguments {:x x + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 218 :acceptable acceptable + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 219 :severity severity + </span><br/> +<span class="not-covered" title="0 out of 1 forms covered"> + 220 :token token}}))) + </span><br/> +<span class="covered" title="4 out of 4 forms covered"> + 221 (make-fault-object severity token))))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 216 + 222 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 217 (defn string-or-fault + 223 (defn any-or-faults </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 218 "If this `value` is not a string, return a fault object with this `severity` + 224 "Return `nil` if validating one of these options returns `nil`; otherwise </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 219 and `token`, else `nil`. If `pattern` is also passed, it is expected to be + 225 return a list comprising a fault report object with this `severity-if-none` </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 220 a Regex, and the fault object will be returned unless `value` matches the + 226 and this token followed by all the fault reports from validating each </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 221 `pattern`." + 227 option. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 222 ([value severity token] + 228 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 229 There are several places - but especially in validating collections - where + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 230 there are several different valid configurations, but few or no properties + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 231 are always required." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 232 [options severity-if-none token] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 233 (let [faults (filter empty? options)] + </span><br/> +<span class="covered" title="5 out of 5 forms covered"> + 234 (when (empty? faults) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 235 ;; i.e. there was at least one option that returned no faults... + </span><br/> +<span class="covered" title="7 out of 7 forms covered"> + 236 (cons (make-fault-object severity-if-none token) faults)))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 237 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 238 (defn cond-make-fault-object + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 239 "If `v` is `false` or `nil`, return a fault object with this `severity` and `token`, + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 240 else return nil." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 241 [v severity token] + </span><br/> +<span class="covered" title="8 out of 8 forms covered"> + 242 (when-not v (make-fault-object severity token))) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 243 + </span><br/> +<span class="covered" title="1 out of 1 forms covered"> + 244 (defn string-or-fault + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 245 "If this `value` is not a string, return a fault object with this `severity` + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 246 and `token`, else `nil`. If `pattern` is also passed, it is expected to be + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 247 a Regex, and the fault object will be returned unless `value` matches the + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 248 `pattern`." + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 249 ([value severity token] </span><br/> <span class="not-covered" title="0 out of 10 forms covered"> - 223 (when-not (string? value) (make-fault-object severity token))) + 250 (when-not (string? value) (make-fault-object severity token))) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 224 ([value severity token pattern] + 251 ([value severity token pattern] </span><br/> <span class="not-covered" title="0 out of 14 forms covered"> - 225 (when not (and (string? value) (re-matches pattern value)) + 252 (when not (and (string? value) (re-matches pattern value)) </span><br/> <span class="not-covered" title="0 out of 4 forms covered"> - 226 (make-fault-object severity token)))) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 227 - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 228 - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 229 (defn object-faults - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 230 "Return a list of faults found in object `x`, or `nil` if none are. - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 231 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 232 If `expected-type` is also passed, verify that `x` has `expected-type`. - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 233 `expected-type` may be passed as a string or as a set of strings. Detailed - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 234 verification of the particular features of types is not done here." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 235 ([x] - </span><br/> -<span class="partial" title="7 out of 8 forms covered"> - 236 (nil-if-empty - </span><br/> -<span class="covered" title="9 out of 9 forms covered"> - 237 (remove empty? - </span><br/> -<span class="covered" title="6 out of 6 forms covered"> - 238 (list - </span><br/> -<span class="covered" title="18 out of 18 forms covered"> - 239 (when-not (map? x) - </span><br/> -<span class="covered" title="12 out of 12 forms covered"> - 240 (make-fault-object :critical :not-an-object)) - </span><br/> -<span class="covered" title="9 out of 9 forms covered"> - 241 (when-not - </span><br/> -<span class="covered" title="9 out of 9 forms covered"> - 242 (has-context? x) - </span><br/> -<span class="covered" title="12 out of 12 forms covered"> - 243 (make-fault-object :should :no-context)) - </span><br/> -<span class="covered" title="18 out of 18 forms covered"> - 244 (when-not (:type x) - </span><br/> -<span class="covered" title="12 out of 12 forms covered"> - 245 (make-fault-object :minor :no-type)) - </span><br/> -<span class="covered" title="42 out of 42 forms covered"> - 246 (when-not (and (map? x) (contains? x :id)) - </span><br/> -<span class="covered" title="12 out of 12 forms covered"> - 247 (make-fault-object :minor :no-id-transient)))))) - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 248 ([x expected-type] - </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 249 (concat-non-empty - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 250 (object-faults x) - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 251 (when expected-type - </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 252 (list - </span><br/> -<span class="not-covered" title="0 out of 6 forms covered"> - 253 (has-type-or-fault x expected-type :critical :unexpected-type)))))) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 254 - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 255 - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 256 (defn object-reference-or-faults - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 257 "If this `value` is either - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 258 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 259 1. an object of `expected-type`; - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 260 2. a URI referencing an object of `expected-type`; or - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 261 3. a link object referencing an object of `expected-type` - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 262 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 263 and no faults are returned from validating the linked object, then return - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 264 `nil`; else return a sequence comprising a fault object with this `severity` - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 265 and `token`, prepended to the faults returned. - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 266 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 267 As with `has-type-or-fault` (q.v.), `expected-type` may be passed as a - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 268 string, as a set of strings, or `nil` (indicating the type of the - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 269 referenced object should not be checked). - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 270 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 271 **NOTE THAT** if `*reify-refs*` is `false`, referenced objects will not - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 272 actually be checked." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 273 [value expected-type severity token] - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 274 (let [faults (cond - </span><br/> -<span class="not-covered" title="0 out of 7 forms covered"> - 275 (string? value) (try (let [uri (URI. value) - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 276 object (when *reify-refs* - </span><br/> -<span class="not-covered" title="0 out of 5 forms covered"> - 277 (json/read-str (slurp uri)))] - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 278 (when object - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 279 (object-faults object expected-type))) - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 280 (catch URISyntaxException _ - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 281 (make-fault-object severity token))) - </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 282 (map? value) (if (has-type? value "Link") - </span><br/> -<span class="not-covered" title="0 out of 7 forms covered"> - 283 (cond - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 284 ;; if we were looking for a link and we've - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 285 ;; found a link, that's OK. - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 286 (= expected-type "Link") nil - </span><br/> -<span class="not-covered" title="0 out of 10 forms covered"> - 287 (and (set? expected-type) (expected-type "Link")) nil - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 288 (nil? expected-type) nil - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 289 :else - </span><br/> -<span class="not-covered" title="0 out of 2 forms covered"> - 290 (object-reference-or-faults - </span><br/> -<span class="not-covered" title="0 out of 6 forms covered"> - 291 (:href value) expected-type severity token)) - </span><br/> -<span class="not-covered" title="0 out of 4 forms covered"> - 292 (object-faults value expected-type)) - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 293 :else (throw - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 294 (ex-info - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 295 "Argument `value` was not an object or a link to an object" - </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 296 {:arguments {:value value} - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 297 :expected-type expected-type - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 298 :severity severity - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 299 :token token})))] - </span><br/> -<span class="not-covered" title="0 out of 10 forms covered"> - 300 (when faults (cons (make-fault-object severity token) faults)))) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 301 - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 302 (defn coll-object-reference-or-fault - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 303 "As object-reference-or-fault, except `value` argument may also be a list of - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 304 objects and/or object references." - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 305 [value expected-type severity token] - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 306 (cond - </span><br/> -<span class="not-covered" title="0 out of 9 forms covered"> - 307 (map? value) (object-reference-or-faults value expected-type severity token) - </span><br/> -<span class="not-covered" title="0 out of 5 forms covered"> - 308 (coll? value) (concat-non-empty - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 309 (map - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 310 #(object-reference-or-faults - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 311 % expected-type severity token) - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 312 value)) - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 313 :else (throw - </span><br/> -<span class="not-covered" title="0 out of 3 forms covered"> - 314 (ex-info - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 315 "Argument `value` was not an object, a link to an object, nor a list of these." - </span><br/> -<span class="not-covered" title="0 out of 8 forms covered"> - 316 {:arguments {:value value} - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 317 :expected-type expected-type - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 318 :severity severity - </span><br/> -<span class="not-covered" title="0 out of 1 forms covered"> - 319 :token token})))) + 253 (make-fault-object severity token)))) </span><br/> </body> </html> diff --git a/docs/cloverage/dog_and_duck/quack/quack.clj.html b/docs/cloverage/dog_and_duck/quack/quack.clj.html index 00d1cff..ebd588c 100644 --- a/docs/cloverage/dog_and_duck/quack/quack.clj.html +++ b/docs/cloverage/dog_and_duck/quack/quack.clj.html @@ -62,460 +62,463 @@ 019 [dog-and-duck.quack.picky.control-variables :refer [*reject-severity*]] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 020 [dog-and-duck.quack.picky.utils :refer [filter-severity object-faults]]) + 020 [dog-and-duck.quack.picky.objects :refer [object-faults]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 021 [dog-and-duck.quack.picky.utils :refer [filter-severity]]) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 021 + 022 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 022 (:import [java.net URI URISyntaxException])) + 023 (:import [java.net URI URISyntaxException])) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 023 + 024 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 024 ;;; Copyright (C) Simon Brooke, 2022 + 025 ;;; Copyright (C) Simon Brooke, 2022 </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 025 + 026 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 026 ;;; This program is free software; you can redistribute it and/or + 027 ;;; This program is free software; you can redistribute it and/or </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 027 ;;; modify it under the terms of the GNU General Public License + 028 ;;; modify it under the terms of the GNU General Public License </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 028 ;;; as published by the Free Software Foundation; either version 2 + 029 ;;; as published by the Free Software Foundation; either version 2 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 029 ;;; of the License, or (at your option) any later version. + 030 ;;; of the License, or (at your option) any later version. </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 030 + 031 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 031 ;;; This program is distributed in the hope that it will be useful, + 032 ;;; This program is distributed in the hope that it will be useful, </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 032 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of + 033 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 033 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + 034 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 034 ;;; GNU General Public License for more details. + 035 ;;; GNU General Public License for more details. </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 035 + 036 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 036 ;;; You should have received a copy of the GNU General Public License + 037 ;;; You should have received a copy of the GNU General Public License </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 037 ;;; along with this program; if not, write to the Free Software + 038 ;;; along with this program; if not, write to the Free Software </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 038 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + 039 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 039 + 040 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 040 (defn object? + 041 (defn object? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 041 "Returns `true` iff `x` is recognisably an ActivityStreams object. + 042 "Returns `true` iff `x` is recognisably an ActivityStreams object. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 042 + 043 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 043 **NOTE THAT** The ActivityStreams spec + 044 **NOTE THAT** The ActivityStreams spec </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 044 [says](https://www.w3.org/TR/activitystreams-core/#object): + 045 [says](https://www.w3.org/TR/activitystreams-core/#object): </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 045 + 046 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 046 > All properties are optional (including the id and type) + 047 > All properties are optional (including the id and type) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 047 + 048 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 048 But we are *just not having that*, because otherwise we're flying blind. + 049 But we are *just not having that*, because otherwise we're flying blind. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 049 We *shall* reject objects lacking at least `:type`. Missing `:id` keys are + 050 We *shall* reject objects lacking at least `:type`. Missing `:id` keys are </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 050 tolerable because they represent transient objects, which we expect to + 051 tolerable because they represent transient objects, which we expect to </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 051 handle. + 052 handle. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 052 + 053 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 053 **NOTE THAT** The ActivityPub spec [says](https://www.w3.org/TR/activitypub/#obj) + 054 **NOTE THAT** The ActivityPub spec [says](https://www.w3.org/TR/activitypub/#obj) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 054 + 055 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 055 > Implementers SHOULD include the ActivityPub context in their object + 056 > Implementers SHOULD include the ActivityPub context in their object </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 056 > definitions + 057 > definitions </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 057 + 058 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 058 but in samples found in the wild they typically don't." + 059 but in samples found in the wild they typically don't." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 059 ([x] + 060 ([x] </span><br/> <span class="covered" title="4 out of 4 forms covered"> - 060 (object? x *reject-severity*)) + 061 (object? x *reject-severity*)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 061 ([x severity] + 062 ([x severity] </span><br/> <span class="covered" title="8 out of 8 forms covered"> - 062 (empty? (filter-severity (object-faults x) severity)))) + 063 (empty? (filter-severity (object-faults x) severity)))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 063 + 064 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 064 (defn persistent-object? + 065 (defn persistent-object? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 065 "`true` iff `x` is a persistent object. + 066 "`true` iff `x` is a persistent object. </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 066 + 067 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 067 Transient objects in ActivityPub are not required to have an `id` key, but persistent + 068 Transient objects in ActivityPub are not required to have an `id` key, but persistent </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 068 ones must have a key, and it must be an IRI (but normally a URI)." + 069 ones must have a key, and it must be an IRI (but normally a URI)." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 069 ([x] + 070 ([x] </span><br/> <span class="covered" title="4 out of 4 forms covered"> - 070 (persistent-object? x *reject-severity*)) + 071 (persistent-object? x *reject-severity*)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 071 ([x severity] + 072 ([x severity] </span><br/> -<span class="covered" title="8 out of 8 forms covered"> - 072 (empty? (filter-severity (persistent-object-faults x) severity)))) +<span class="partial" title="7 out of 8 forms covered"> + 073 (empty? (filter-severity (persistent-object-faults x) severity)))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 073 + 074 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 074 (defn actor? + 075 (defn actor? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 075 "Returns `true` if `x` quacks like an actor, else false." + 076 "Returns `true` if `x` quacks like an actor, else false." </span><br/> <span class="covered" title="4 out of 4 forms covered"> - 076 ([x] (actor? x *reject-severity*)) + 077 ([x] (actor? x *reject-severity*)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 077 ([x severity] + 078 ([x severity] </span><br/> <span class="covered" title="8 out of 8 forms covered"> - 078 (empty? (filter-severity (actor-faults x) severity)))) + 079 (empty? (filter-severity (actor-faults x) severity)))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 079 + 080 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 080 (defn actor-or-uri? + 081 (defn actor-or-uri? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 081 "`true` if `x` is either a URI or an actor. + 082 "`true` if `x` is either a URI or an actor. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 082 + 083 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 083 **TODO**: I need to decide about whether to reify referenced objects + 084 **TODO**: I need to decide about whether to reify referenced objects </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 084 before validation or after. After reification, every reference to an actor + 085 before validation or after. After reification, every reference to an actor </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 085 *must be* to an actor object, but before, may only be to a URI pointing to + 086 *must be* to an actor object, but before, may only be to a URI pointing to </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 086 one." + 087 one." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 087 [x] + 088 [x] </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> - 088 (try + 089 (try </span><br/> <span class="not-covered" title="0 out of 5 forms covered"> - 089 (and + 090 (and </span><br/> <span class="not-covered" title="0 out of 9 forms covered"> - 090 (cond (string? x) (uri? (URI. x)) + 091 (cond (string? x) (uri? (URI. x)) </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> - 091 :else (actor? x)) + 092 :else (actor? x)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 092 true) + 093 true) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 093 (catch URISyntaxException _ false) + 094 (catch URISyntaxException _ false) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 094 (catch NullPointerException _ false))) + 095 (catch NullPointerException _ false))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 095 + 096 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 096 (defn activity? + 097 (defn activity? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 097 "`true` iff `x` quacks like an activity, else false." + 098 "`true` iff `x` quacks like an activity, else false." </span><br/> <span class="not-covered" title="0 out of 4 forms covered"> - 098 ([x] (activity? x *reject-severity*)) + 099 ([x] (activity? x *reject-severity*)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 099 ([x severity] + 100 ([x severity] </span><br/> <span class="not-covered" title="0 out of 8 forms covered"> - 100 (empty? (filter-severity (activity-faults x) severity)))) + 101 (empty? (filter-severity (activity-faults x) severity)))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 101 + 102 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 102 (defn link? + 103 (defn link? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 103 "`true` iff `x` quacks like a link, else false." + 104 "`true` iff `x` quacks like a link, else false." </span><br/> <span class="not-covered" title="0 out of 4 forms covered"> - 104 ([x] (link? x *reject-severity*)) + 105 ([x] (link? x *reject-severity*)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 105 ([x severity] + 106 ([x severity] </span><br/> <span class="not-covered" title="0 out of 8 forms covered"> - 106 (empty? (filter-severity (link-faults x) severity)))) + 107 (empty? (filter-severity (link-faults x) severity)))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 107 + 108 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 108 (defn link-or-uri? + 109 (defn link-or-uri? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 109 "`true` iff `x` is either a URI or a link, else false. + 110 "`true` iff `x` is either a URI or a link, else false. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 110 + 111 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 111 There are several points in the specification where e.g. the `:image` + 112 There are several points in the specification where e.g. the `:image` </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 112 property (if present) may be either a link or a URI." + 113 property (if present) may be either a link or a URI." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 113 [x] + 114 [x] </span><br/> <span class="not-covered" title="0 out of 5 forms covered"> - 114 (and + 115 (and </span><br/> <span class="not-covered" title="0 out of 9 forms covered"> - 115 (cond (string? x) (uri? (URI. x)) + 116 (cond (string? x) (uri? (URI. x)) </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> - 116 :else (link? x)) + 117 :else (link? x)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 117 true)) + 118 true)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 118 + 119 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 119 (defn collection? + 120 (defn collection? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 120 "`true` iff `x` quacks like a collection of type `object-type`, else `false`. + 121 "`true` iff `x` quacks like a collection of type `object-type`, else `false`. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 121 + 122 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 122 With one argument, will recognise plain collections and ordered collections, + 123 With one argument, will recognise plain collections and ordered collections, </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 123 but (currently) not collection pages." + 124 but (currently) not collection pages." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 124 ([x ^String object-type] + 125 ([x ^String object-type] </span><br/> <span class="partial" title="10 out of 11 forms covered"> - 125 (let [items (or (:items x) (:orderedItems x))] + 126 (let [items (or (:items x) (:orderedItems x))] </span><br/> <span class="partial" title="14 out of 17 forms covered"> - 126 (and + 127 (and </span><br/> <span class="partial" title="5 out of 6 forms covered"> - 127 (cond + 128 (cond </span><br/> <span class="partial" title="3 out of 8 forms covered"> - 128 (:items x) (nil? (:orderedItems x)) + 129 (:items x) (nil? (:orderedItems x)) </span><br/> <span class="covered" title="8 out of 8 forms covered"> - 129 (:orderedItems x) (nil? (:items x)) ;; can't have both properties + 130 (:orderedItems x) (nil? (:items x)) ;; can't have both properties </span><br/> <span class="covered" title="5 out of 5 forms covered"> - 130 (integer? (:totalItems x)) true ;; can have neither, provided it has totalItems. + 131 (integer? (:totalItems x)) true ;; can have neither, provided it has totalItems. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 131 :else false) + 132 :else false) </span><br/> <span class="covered" title="3 out of 3 forms covered"> - 132 (object? x) + 133 (object? x) </span><br/> <span class="covered" title="5 out of 5 forms covered"> - 133 (= (:type x) object-type) + 134 (= (:type x) object-type) </span><br/> <span class="partial" title="2 out of 3 forms covered"> - 134 (if items + 135 (if items </span><br/> <span class="partial" title="10 out of 12 forms covered"> - 135 (and (coll? items) + 136 (and (coll? items) </span><br/> <span class="covered" title="4 out of 4 forms covered"> - 136 (every? object? items) ;; if there are items, they must form a + 137 (every? object? items) ;; if there are items, they must form a </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 137 ;; collection of objects. + 138 ;; collection of objects. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 138 true) + 139 true) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 139 true) ;; but it's OK if there aren't. + 140 true) ;; but it's OK if there aren't. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 140 true) + 141 true) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 141 ;; test for totalItems not done here, because collection pages don't + 142 ;; test for totalItems not done here, because collection pages don't </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 142 ;; have it. + 143 ;; have it. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 143 )) + 144 )) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 144 ([x] + 145 ([x] </span><br/> <span class="not-covered" title="0 out of 9 forms covered"> - 145 (and + 146 (and </span><br/> <span class="not-covered" title="0 out of 10 forms covered"> - 146 (or (collection? x "Collection") + 147 (or (collection? x "Collection") </span><br/> <span class="not-covered" title="0 out of 2 forms covered"> - 147 (collection? x "OrderedCollection")) + 148 (collection? x "OrderedCollection")) </span><br/> <span class="not-covered" title="0 out of 5 forms covered"> - 148 (integer? (:totalItems x)) + 149 (integer? (:totalItems x)) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 149 true))) + 150 true))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 150 + 151 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 151 (defn unordered-collection? + 152 (defn unordered-collection? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 152 "`true` iff `x` quacks like an unordered collection, else `false`." + 153 "`true` iff `x` quacks like an unordered collection, else `false`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 153 [x] + 154 [x] </span><br/> <span class="not-covered" title="0 out of 18 forms covered"> - 154 (and (collection? x "Collection") (integer? (:totalItems x)) true)) + 155 (and (collection? x "Collection") (integer? (:totalItems x)) true)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 155 + 156 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 156 (defn ordered-collection? + 157 (defn ordered-collection? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 157 "`true` iff `x` quacks like an ordered collection, else `false`." + 158 "`true` iff `x` quacks like an ordered collection, else `false`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 158 [x] + 159 [x] </span><br/> <span class="not-covered" title="0 out of 18 forms covered"> - 159 (and (collection? x "OrderedCollection") (integer? (:totalItems x)) true)) + 160 (and (collection? x "OrderedCollection") (integer? (:totalItems x)) true)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 160 + 161 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 161 (defn collection-page? + 162 (defn collection-page? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 162 "`true` iff `x` quacks like a page in a paged collection, else `false`." + 163 "`true` iff `x` quacks like a page in a paged collection, else `false`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 163 [x] + 164 [x] </span><br/> <span class="not-covered" title="0 out of 4 forms covered"> - 164 (collection? x "CollectionPage")) + 165 (collection? x "CollectionPage")) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 165 + 166 </span><br/> <span class="covered" title="1 out of 1 forms covered"> - 166 (defn ordered-collection-page? + 167 (defn ordered-collection-page? </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 167 "`true` iff `x` quacks like a page in an ordered paged collection, else `false`." + 168 "`true` iff `x` quacks like a page in an ordered paged collection, else `false`." </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 168 [x] + 169 [x] </span><br/> <span class="covered" title="4 out of 4 forms covered"> - 169 (collection? x "OrderedCollectionPage")) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 170 + 170 (collection? x "OrderedCollectionPage")) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 171 </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 172 + </span><br/> </body> </html> diff --git a/docs/cloverage/dog_and_duck/scratch/scratch.clj.html b/docs/cloverage/dog_and_duck/scratch/scratch.clj.html index 4452f7b..56f94ec 100644 --- a/docs/cloverage/dog_and_duck/scratch/scratch.clj.html +++ b/docs/cloverage/dog_and_duck/scratch/scratch.clj.html @@ -17,163 +17,190 @@ 004 [clj-activitypub.webfinger :as webfinger] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 005 [clj-pgp.generate :as pgp-gen] + 005 [clj-activitypub.net :as activitypub-net] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 006 [clojure.walk :refer [keywordize-keys]])) + 006 [clj-pgp.generate :as pgp-gen] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 007 [clojure.walk :refer [keywordize-keys]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 008 [clojure.pprint :refer [pprint]] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 009 [clojure.data.json :as json])) </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 007 + 010 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 008 ;;; Copyright (C) Simon Brooke, 2022 + 011 ;;; Copyright (C) Simon Brooke, 2022 </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 009 + 012 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 010 ;;; This program is free software; you can redistribute it and/or + 013 ;;; This program is free software; you can redistribute it and/or </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 011 ;;; modify it under the terms of the GNU General Public License + 014 ;;; modify it under the terms of the GNU General Public License </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 012 ;;; as published by the Free Software Foundation; either version 2 + 015 ;;; as published by the Free Software Foundation; either version 2 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 013 ;;; of the License, or (at your option) any later version. + 016 ;;; of the License, or (at your option) any later version. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 014 + 017 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 015 ;;; This program is distributed in the hope that it will be useful, + 018 ;;; This program is distributed in the hope that it will be useful, </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 016 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of + 019 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 017 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + 020 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 018 ;;; GNU General Public License for more details. + 021 ;;; GNU General Public License for more details. </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 019 + 022 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 020 ;;; You should have received a copy of the GNU General Public License + 023 ;;; You should have received a copy of the GNU General Public License </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 021 ;;; along with this program; if not, write to the Free Software + 024 ;;; along with this program; if not, write to the Free Software </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 022 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 023 - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 024 ;;; Use any ActivityPub account handle you like - for example, your own - </span><br/> -<span class="covered" title="2 out of 2 forms covered"> - 025 (def account-handle "@simon_brooke@mastodon.scot") + 025 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. </span><br/> <span class="blank" title="0 out of 0 forms covered"> 026 </span><br/> -<span class="covered" title="4 out of 4 forms covered"> - 027 (def handle (activitypub/parse-account account-handle)) - </span><br/> -<span class="covered" title="4 out of 4 forms covered"> - 028 (webfinger/fetch-user-id "mastodon.scot" "simon_brooke") - </span><br/> -<span class="covered" title="9 out of 9 forms covered"> - 029 (apply webfinger/fetch-user-id (map handle [:domain :username])) - </span><br/> -<span class="blank" title="0 out of 0 forms covered"> - 030 - </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 031 ;;; Retrieve the account details from its home server - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 032 ;;; (`keywordize-keys` is not necessary here but produces a more idiomatic clojure - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 033 ;;; data structure) - </span><br/> -<span class="covered" title="1 out of 1 forms covered"> - 034 (def account - </span><br/> -<span class="not-tracked" title="0 out of 0 forms covered"> - 035 "Fetch my account to mess with" - </span><br/> -<span class="covered" title="4 out of 4 forms covered"> - 036 (let [handle (activitypub/parse-account account-handle)] + 027 ;;; Use any ActivityPub account handle you like - for example, your own </span><br/> <span class="covered" title="2 out of 2 forms covered"> - 037 (keywordize-keys - </span><br/> -<span class="covered" title="2 out of 2 forms covered"> - 038 (activitypub/fetch-user - </span><br/> -<span class="covered" title="9 out of 9 forms covered"> - 039 (apply webfinger/fetch-user-id (map handle [:domain :username])))))) + 028 (def account-handle "@simon_brooke@mastodon.scot") </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 040 + 029 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 041 ;;; examine what you got back! + 030 ;;(def handle (activitypub/parse-account account-handle)) </span><br/> -<span class="covered" title="3 out of 3 forms covered"> - 042 (:inbox account) +<span class="not-tracked" title="0 out of 0 forms covered"> + 031 ;;(webfinger/fetch-user-id "mastodon.scot" "simon_brooke") + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 032 ;;(apply webfinger/fetch-user-id (map handle [:domain :username])) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 033 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 034 ;;; Retrieve the account details from its home server + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 035 ;;; (`keywordize-keys` is not necessary here but produces a more idiomatic clojure + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 036 ;;; data structure) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 037 ;; (def account + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 038 ;; (-> account-handle + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 039 ;; (webfinger/parse-handle) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 040 ;; (webfinger/fetch-user-id!) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 041 ;; (activitypub-net/fetch-user!) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 042 ;; (select-keys [:name :preferredUsername :inbox :summary]))) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 043 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 044 ;; (def rsa (pgp-gen/rsa-keypair-generator 2048)) + 044 ;; ;;; examine what you got back! </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 045 ;; (def kp (pgp-gen/generate-keypair rsa :rsa-general)) + 045 ;; (:inbox account) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 046 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 047 ;; how we make a public/private key pair. But this key pair is not the one + 047 ;; (-> account </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 048 ;; known to mastodon.scot as my key pair, so that doesn't get us very far... + 048 ;; :inbox </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 049 ;; I think. - </span><br/> -<span class="covered" title="4 out of 4 forms covered"> - 050 (let [rsa (pgp-gen/rsa-keypair-generator 2048) - </span><br/> -<span class="covered" title="4 out of 4 forms covered"> - 051 kp (pgp-gen/generate-keypair rsa :rsa-general) - </span><br/> -<span class="covered" title="2 out of 2 forms covered"> - 052 public (-> kp .getPublicKey .getEncoded) - </span><br/> -<span class="covered" title="3 out of 3 forms covered"> - 053 private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)] - </span><br/> -<span class="covered" title="6 out of 6 forms covered"> - 054 (println (str "Public key: " public)) - </span><br/> -<span class="covered" title="6 out of 6 forms covered"> - 055 (println (str "Private key: " private)) + 049 ;; slurp </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> - 056 ) + 050 ;; json/read-str + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 051 ;; pprint) ;; => 80 </span><br/> <span class="blank" title="0 out of 0 forms covered"> - 057 + 052 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 053 ;; (def rsa (pgp-gen/rsa-keypair-generator 2048)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 054 ;; (def kp (pgp-gen/generate-keypair rsa :rsa-general)) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 055 + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 056 ;; how we make a public/private key pair. But this key pair is not the one + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 057 ;; known to mastodon.scot as my key pair, so that doesn't get us very far... + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 058 ;; I think. + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 059 ;; (let [rsa (pgp-gen/rsa-keypair-generator 2048) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 060 ;; kp (pgp-gen/generate-keypair rsa :rsa-general) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 061 ;; public (-> kp .getPublicKey .getEncoded) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 062 ;; private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)] + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 063 ;; (println (str "Public key: " public)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 064 ;; (println (str "Private key: " private)) + </span><br/> +<span class="not-tracked" title="0 out of 0 forms covered"> + 065 ;; ) + </span><br/> +<span class="blank" title="0 out of 0 forms covered"> + 066 </span><br/> </body> </html> diff --git a/docs/cloverage/index.html b/docs/cloverage/index.html index b0c5087..0b55056 100644 --- a/docs/cloverage/index.html +++ b/docs/cloverage/index.html @@ -15,126 +15,60 @@ <td class="with-number">Total</td><td class="with-number">Blank</td><td class="with-number">Instrumented</td> </tr></thead> <tr> - <td><a href="clj_activitypub/core.clj.html">clj-activitypub.core</a></td><td class="with-bar"><div class="covered" - style="width:23.588039867109636%; - float:left;"> 71 </div><div class="not-covered" - style="width:76.41196013289037%; - float:left;"> 230 </div></td> -<td class="with-number">23.59 %</td> + <td><a href="dog_and_duck/quack/cli.clj.html">dog-and-duck.quack.cli</a></td><td class="with-bar"><div class="covered" + style="width:11.986301369863014%; + float:left;"> 70 </div><div class="not-covered" + style="width:88.01369863013699%; + float:left;"> 514 </div></td> +<td class="with-number">11.99 %</td> <td class="with-bar"><div class="covered" - style="width:27.906976744186046%; - float:left;"> 24 </div><div class="partial" - style="width:2.3255813953488373%; + style="width:21.50537634408602%; + float:left;"> 20 </div><div class="partial" + style="width:2.150537634408602%; float:left;"> 2 </div><div class="not-covered" - style="width:69.76744186046511%; - float:left;"> 60 </div></td> -<td class="with-number">30.23 %</td> -<td class="with-number">150</td><td class="with-number">14</td><td class="with-number">86</td> -</tr> -<tr> - <td><a href="clj_activitypub/internal/crypto.clj.html">clj-activitypub.internal.crypto</a></td><td class="with-bar"><div class="covered" - style="width:18.75%; - float:left;"> 9 </div><div class="not-covered" - style="width:81.25%; - float:left;"> 39 </div></td> -<td class="with-number">18.75 %</td> -<td class="with-bar"><div class="covered" - style="width:39.130434782608695%; - float:left;"> 9 </div><div class="not-covered" - style="width:60.869565217391305%; - float:left;"> 14 </div></td> -<td class="with-number">39.13 %</td> -<td class="with-number">39</td><td class="with-number">8</td><td class="with-number">23</td> -</tr> -<tr> - <td><a href="clj_activitypub/internal/http_util.clj.html">clj-activitypub.internal.http-util</a></td><td class="with-bar"><div class="covered" - style="width:74.35897435897436%; - float:left;"> 29 </div><div class="not-covered" - style="width:25.641025641025642%; - float:left;"> 10 </div></td> -<td class="with-number">74.36 %</td> -<td class="with-bar"><div class="covered" - style="width:80.0%; - float:left;"> 12 </div><div class="not-covered" - style="width:20.0%; - float:left;"> 3 </div></td> -<td class="with-number">80.00 %</td> -<td class="with-number">28</td><td class="with-number">3</td><td class="with-number">15</td> -</tr> -<tr> - <td><a href="clj_activitypub/internal/thread_cache.clj.html">clj-activitypub.internal.thread-cache</a></td><td class="with-bar"><div class="covered" - style="width:83.33333333333333%; - float:left;"> 105 </div><div class="not-covered" - style="width:16.666666666666668%; - float:left;"> 21 </div></td> -<td class="with-number">83.33 %</td> -<td class="with-bar"><div class="covered" - style="width:88.23529411764706%; - float:left;"> 30 </div><div class="partial" - style="width:2.9411764705882355%; - float:left;"> 1 </div><div class="not-covered" - style="width:8.823529411764707%; - float:left;"> 3 </div></td> -<td class="with-number">91.18 %</td> -<td class="with-number">47</td><td class="with-number">3</td><td class="with-number">34</td> -</tr> -<tr> - <td><a href="clj_activitypub/webfinger.clj.html">clj-activitypub.webfinger</a></td><td class="with-bar"><div class="covered" - style="width:95.53571428571429%; - float:left;"> 107 </div><div class="not-covered" - style="width:4.464285714285714%; - float:left;"> 5 </div></td> -<td class="with-number">95.54 %</td> -<td class="with-bar"><div class="covered" - style="width:88.88888888888889%; - float:left;"> 16 </div><div class="partial" - style="width:11.11111111111111%; - float:left;"> 2 </div></td> -<td class="with-number">100.00 %</td> -<td class="with-number">35</td><td class="with-number">5</td><td class="with-number">18</td> + style="width:76.34408602150538%; + float:left;"> 71 </div></td> +<td class="with-number">23.66 %</td> +<td class="with-number">139</td><td class="with-number">10</td><td class="with-number">93</td> </tr> <tr> <td><a href="dog_and_duck/quack/picky.clj.html">dog-and-duck.quack.picky</a></td><td class="with-bar"><div class="covered" - style="width:41.6256157635468%; - float:left;"> 169 </div><div class="not-covered" - style="width:58.3743842364532%; - float:left;"> 237 </div></td> -<td class="with-number">41.63 %</td> + style="width:55.41871921182266%; + float:left;"> 225 </div><div class="not-covered" + style="width:44.58128078817734%; + float:left;"> 181 </div></td> +<td class="with-number">55.42 %</td> <td class="with-bar"><div class="covered" - style="width:58.55855855855856%; - float:left;"> 65 </div><div class="partial" - style="width:2.7027027027027026%; - float:left;"> 3 </div><div class="not-covered" - style="width:38.73873873873874%; - float:left;"> 43 </div></td> -<td class="with-number">61.26 %</td> -<td class="with-number">251</td><td class="with-number">15</td><td class="with-number">111</td> + style="width:66.07142857142857%; + float:left;"> 74 </div><div class="partial" + style="width:4.464285714285714%; + float:left;"> 5 </div><div class="not-covered" + style="width:29.464285714285715%; + float:left;"> 33 </div></td> +<td class="with-number">70.54 %</td> +<td class="with-number">252</td><td class="with-number">15</td><td class="with-number">112</td> </tr> <tr> <td><a href="dog_and_duck/quack/picky/collections.clj.html">dog-and-duck.quack.picky.collections</a></td><td class="with-bar"><div class="covered" - style="width:3.007518796992481%; - float:left;"> 4 </div><div class="not-covered" - style="width:96.99248120300751%; - float:left;"> 129 </div></td> -<td class="with-number">3.01 %</td> + style="width:100.0%; + float:left;"> 130 </div></td> +<td class="with-number">100.00 %</td> <td class="with-bar"><div class="covered" - style="width:16.666666666666668%; - float:left;"> 4 </div><div class="not-covered" - style="width:83.33333333333333%; - float:left;"> 20 </div></td> -<td class="with-number">16.67 %</td> -<td class="with-number">57</td><td class="with-number">8</td><td class="with-number">24</td> + style="width:100.0%; + float:left;"> 25 </div></td> +<td class="with-number">100.00 %</td> +<td class="with-number">60</td><td class="with-number">8</td><td class="with-number">25</td> </tr> <tr> <td><a href="dog_and_duck/quack/picky/constants.clj.html">dog-and-duck.quack.picky.constants</a></td><td class="with-bar"><div class="covered" style="width:100.0%; - float:left;"> 73 </div></td> + float:left;"> 99 </div></td> <td class="with-number">100.00 %</td> <td class="with-bar"><div class="covered" style="width:100.0%; - float:left;"> 18 </div></td> + float:left;"> 23 </div></td> <td class="with-number">100.00 %</td> -<td class="with-number">79</td><td class="with-number">12</td><td class="with-number">18</td> +<td class="with-number">116</td><td class="with-number">15</td><td class="with-number">23</td> </tr> <tr> <td><a href="dog_and_duck/quack/picky/control_variables.clj.html">dog-and-duck.quack.picky.control-variables</a></td><td class="with-bar"><div class="covered" @@ -148,75 +82,98 @@ <td class="with-number">49</td><td class="with-number">6</td><td class="with-number">3</td> </tr> <tr> - <td><a href="dog_and_duck/quack/picky/fault_messages.clj.html">dog-and-duck.quack.picky.fault-messages</a></td><td class="with-bar"><div class="covered" - style="width:100.0%; - float:left;"> 29 </div></td> -<td class="with-number">100.00 %</td> -<td class="with-bar"><div class="covered" - style="width:100.0%; - float:left;"> 3 </div></td> -<td class="with-number">100.00 %</td> -<td class="with-number">35</td><td class="with-number">5</td><td class="with-number">3</td> -</tr> -<tr> - <td><a href="dog_and_duck/quack/picky/required_properties.clj.html">dog-and-duck.quack.picky.required-properties</a></td><td class="with-bar"><div class="covered" - style="width:100.0%; - float:left;"> 1 </div></td> -<td class="with-number">100.00 %</td> -<td class="with-bar"><div class="covered" - style="width:100.0%; - float:left;"> 1 </div></td> -<td class="with-number">100.00 %</td> -<td class="with-number">1</td><td class="with-number">0</td><td class="with-number">1</td> -</tr> -<tr> - <td><a href="dog_and_duck/quack/picky/utils.clj.html">dog-and-duck.quack.picky.utils</a></td><td class="with-bar"><div class="covered" - style="width:49.94786235662148%; - float:left;"> 479 </div><div class="not-covered" - style="width:50.05213764337852%; - float:left;"> 480 </div></td> -<td class="with-number">49.95 %</td> -<td class="with-bar"><div class="covered" - style="width:38.775510204081634%; - float:left;"> 57 </div><div class="partial" - style="width:6.122448979591836%; - float:left;"> 9 </div><div class="not-covered" - style="width:55.10204081632653%; - float:left;"> 81 </div></td> -<td class="with-number">44.90 %</td> -<td class="with-number">319</td><td class="with-number">30</td><td class="with-number">147</td> -</tr> -<tr> - <td><a href="dog_and_duck/quack/quack.clj.html">dog-and-duck.quack.quack</a></td><td class="with-bar"><div class="covered" - style="width:46.56488549618321%; - float:left;"> 122 </div><div class="not-covered" - style="width:53.43511450381679%; - float:left;"> 140 </div></td> -<td class="with-number">46.56 %</td> -<td class="with-bar"><div class="covered" - style="width:51.02040816326531%; - float:left;"> 25 </div><div class="partial" - style="width:12.244897959183673%; - float:left;"> 6 </div><div class="not-covered" - style="width:36.734693877551024%; + <td><a href="dog_and_duck/quack/picky/distribution.clj.html">dog-and-duck.quack.picky.distribution</a></td><td class="with-bar"><div class="covered" + style="width:10.0%; + float:left;"> 2 </div><div class="not-covered" + style="width:90.0%; float:left;"> 18 </div></td> -<td class="with-number">63.27 %</td> -<td class="with-number">171</td><td class="with-number">21</td><td class="with-number">49</td> -</tr> -<tr> - <td><a href="dog_and_duck/scratch/core.clj.html">dog-and-duck.scratch.core</a></td><td class="with-bar"><div class="covered" +<td class="with-number">10.00 %</td> +<td class="with-bar"><div class="covered" style="width:33.333333333333336%; float:left;"> 2 </div><div class="not-covered" style="width:66.66666666666667%; float:left;"> 4 </div></td> <td class="with-number">33.33 %</td> +<td class="with-number">30</td><td class="with-number">5</td><td class="with-number">6</td> +</tr> +<tr> + <td><a href="dog_and_duck/quack/picky/objects.clj.html">dog-and-duck.quack.picky.objects</a></td><td class="with-bar"><div class="covered" + style="width:81.38759172781855%; + float:left;"> 1220 </div><div class="not-covered" + style="width:18.612408272181455%; + float:left;"> 279 </div></td> +<td class="with-number">81.39 %</td> <td class="with-bar"><div class="covered" - style="width:66.66666666666667%; - float:left;"> 2 </div><div class="not-covered" - style="width:33.333333333333336%; + style="width:83.48348348348348%; + float:left;"> 278 </div><div class="partial" + style="width:7.5075075075075075%; + float:left;"> 25 </div><div class="not-covered" + style="width:9.00900900900901%; + float:left;"> 30 </div></td> +<td class="with-number">90.99 %</td> +<td class="with-number">522</td><td class="with-number">16</td><td class="with-number">333</td> +</tr> +<tr> + <td><a href="dog_and_duck/quack/picky/scratch.clj.html">dog-and-duck.quack.picky.scratch</a></td><td class="with-bar"><div class="covered" + style="width:100.0%; float:left;"> 1 </div></td> -<td class="with-number">66.67 %</td> -<td class="with-number">22</td><td class="with-number">5</td><td class="with-number">3</td> +<td class="with-number">100.00 %</td> +<td class="with-bar"><div class="covered" + style="width:100.0%; + float:left;"> 1 </div></td> +<td class="with-number">100.00 %</td> +<td class="with-number">53</td><td class="with-number">6</td><td class="with-number">1</td> +</tr> +<tr> + <td><a href="dog_and_duck/quack/picky/time.clj.html">dog-and-duck.quack.picky.time</a></td><td class="with-bar"><div class="covered" + style="width:7.407407407407407%; + float:left;"> 10 </div><div class="not-covered" + style="width:92.5925925925926%; + float:left;"> 125 </div></td> +<td class="with-number">7.41 %</td> +<td class="with-bar"><div class="covered" + style="width:22.22222222222222%; + float:left;"> 4 </div><div class="partial" + style="width:11.11111111111111%; + float:left;"> 2 </div><div class="not-covered" + style="width:66.66666666666667%; + float:left;"> 12 </div></td> +<td class="with-number">33.33 %</td> +<td class="with-number">66</td><td class="with-number">7</td><td class="with-number">18</td> +</tr> +<tr> + <td><a href="dog_and_duck/quack/picky/utils.clj.html">dog-and-duck.quack.picky.utils</a></td><td class="with-bar"><div class="covered" + style="width:62.62626262626262%; + float:left;"> 434 </div><div class="not-covered" + style="width:37.37373737373738%; + float:left;"> 259 </div></td> +<td class="with-number">62.63 %</td> +<td class="with-bar"><div class="covered" + style="width:60.18518518518518%; + float:left;"> 65 </div><div class="partial" + style="width:16.666666666666668%; + float:left;"> 18 </div><div class="not-covered" + style="width:23.14814814814815%; + float:left;"> 25 </div></td> +<td class="with-number">76.85 %</td> +<td class="with-number">253</td><td class="with-number">26</td><td class="with-number">108</td> +</tr> +<tr> + <td><a href="dog_and_duck/quack/quack.clj.html">dog-and-duck.quack.quack</a></td><td class="with-bar"><div class="covered" + style="width:46.18320610687023%; + float:left;"> 121 </div><div class="not-covered" + style="width:53.81679389312977%; + float:left;"> 141 </div></td> +<td class="with-number">46.18 %</td> +<td class="with-bar"><div class="covered" + style="width:48.97959183673469%; + float:left;"> 24 </div><div class="partial" + style="width:14.285714285714286%; + float:left;"> 7 </div><div class="not-covered" + style="width:36.734693877551024%; + float:left;"> 18 </div></td> +<td class="with-number">63.27 %</td> +<td class="with-number">172</td><td class="with-number">21</td><td class="with-number">49</td> </tr> <tr> <td><a href="dog_and_duck/scratch/parser.clj.html">dog-and-duck.scratch.parser</a></td><td class="with-bar"><div class="covered" @@ -238,13 +195,13 @@ <tr> <td><a href="dog_and_duck/scratch/scratch.clj.html">dog-and-duck.scratch.scratch</a></td><td class="with-bar"><div class="covered" style="width:100.0%; - float:left;"> 66 </div></td> + float:left;"> 3 </div></td> <td class="with-number">100.00 %</td> <td class="with-bar"><div class="covered" style="width:100.0%; - float:left;"> 17 </div></td> + float:left;"> 2 </div></td> <td class="with-number">100.00 %</td> -<td class="with-number">57</td><td class="with-number">9</td><td class="with-number">17</td> +<td class="with-number">66</td><td class="with-number">10</td><td class="with-number">2</td> </tr> <tr> <td><a href="dog_and_duck/utils/process.clj.html">dog-and-duck.utils.process</a></td><td class="with-bar"><div class="covered" @@ -263,9 +220,9 @@ </tr> <tr><td>Totals:</td> <td class="with-bar"></td> -<td class="with-number">50.34 %</td> +<td class="with-number">60.82 %</td> <td class="with-bar"></td> -<td class="with-number">57.34 %</td> +<td class="with-number">75.54 %</td> </tr> </table> </body> diff --git a/docs/codox/Desiderata.html b/docs/codox/Desiderata.html index 810a57a..fd544c4 100644 --- a/docs/codox/Desiderata.html +++ b/docs/codox/Desiderata.html @@ -1,6 +1,6 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>Desiderata</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 current"><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#desiderata" name="desiderata"></a>Desiderata</h1> +<html><head><meta charset="UTF-8" /><title>Desiderata</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 current"><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#desiderata" name="desiderata"></a>Desiderata</h1> <p><em>Social media features which users want which [Mastodon](<a href="https://en.wikipedia.org/wiki/Mastodon_(social_network)">https://en.wikipedia.org/wiki/Mastodon_(social_network)</a>) does not provide, or provides poorly.</em></p> <ol> <li>User-specified inbox-ordering algorithms;</li> diff --git a/docs/codox/Using_ActivityPub.html b/docs/codox/Using_ActivityPub.html index 2d7035c..ff9b583 100644 --- a/docs/codox/Using_ActivityPub.html +++ b/docs/codox/Using_ActivityPub.html @@ -1,6 +1,6 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>Using ActivityPub</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 current"><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#using-activitypub" name="using-activitypub"></a>Using ActivityPub</h1> +<html><head><meta charset="UTF-8" /><title>Using ActivityPub</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 current"><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#using-activitypub" name="using-activitypub"></a>Using ActivityPub</h1> <h2><a href="#introduction" name="introduction"></a>Introduction</h2> <p>I do not know what I am doing; I am learning, and playing. Nothing in this document should be treated as good advice; it simply relates to the current state of my knowledge.</p> <h2><a href="#what-happens-when-you-post-a-new-item-to-an-activitypub-server" name="what-happens-when-you-post-a-new-item-to-an-activitypub-server"></a>What happens when you post a new item to an ActivityPub server</h2> diff --git a/docs/codox/Validation_Faults.html b/docs/codox/Validation_Faults.html index f6ae4bd..a792602 100644 --- a/docs/codox/Validation_Faults.html +++ b/docs/codox/Validation_Faults.html @@ -1,6 +1,6 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>Validation Faults in ActivityPub documents</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 current"><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#validation-faults-in-activitypub-documents" name="validation-faults-in-activitypub-documents"></a>Validation Faults in ActivityPub documents</h1> +<html><head><meta charset="UTF-8" /><title>Validation Faults in ActivityPub documents</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 current"><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#validation-faults-in-activitypub-documents" name="validation-faults-in-activitypub-documents"></a>Validation Faults in ActivityPub documents</h1> <h2><a href="#motivation" name="motivation"></a>Motivation</h2> <p>This document is intended to provide an extension vocabulary for <a href="https://www.w3.org/TR/activitystreams-core/">ActivityStreams</a> documents, which provides vocabulary for categorising and describing faults in <a href="https://www.w3.org/TR/activitypub/">ActivityPub</a> documents.</p> <p>The motivation is to be able to serialise a validation report on an ActivityPub document as an ActivityStreams document.</p> diff --git a/docs/codox/dog-and-duck.quack.cli.html b/docs/codox/dog-and-duck.quack.cli.html new file mode 100644 index 0000000..ea99992 --- /dev/null +++ b/docs/codox/dog-and-duck.quack.cli.html @@ -0,0 +1,3 @@ +<!DOCTYPE html PUBLIC "" + ""> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.cli documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch current"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var--main"><div class="inner"><span>-main</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var-cli-options"><div class="inner"><span>cli-options</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var-html-fault-row"><div class="inner"><span>html-fault-row</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var-html-header-row"><div class="inner"><span>html-header-row</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var-output"><div class="inner"><span>output</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var-output-csv"><div class="inner"><span>output-csv</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var-output-html"><div class="inner"><span>output-html</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var-stylesheet-url"><div class="inner"><span>stylesheet-url</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.cli.html#var-validate"><div class="inner"><span>validate</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.cli</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var--main"><h3>-main</h3><div class="usage"><code>(-main & args)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L121">view source</a></div></div><div class="public anchor" id="var-cli-options"><h3>cli-options</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L20">view source</a></div></div><div class="public anchor" id="var-html-fault-row"><h3>html-fault-row</h3><div class="usage"><code>(html-fault-row fault cols)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L64">view source</a></div></div><div class="public anchor" id="var-html-header-row"><h3>html-header-row</h3><div class="usage"><code>(html-header-row cols)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L60">view source</a></div></div><div class="public anchor" id="var-output"><h3>output</h3><div class="usage"><code>(output content options)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L112">view source</a></div></div><div class="public anchor" id="var-output-csv"><h3>output-csv</h3><div class="usage"><code>(output-csv faults)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L51">view source</a></div></div><div class="public anchor" id="var-output-html"><h3>output-html</h3><div class="usage"><code>(output-html faults opts)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L81">view source</a></div></div><div class="public anchor" id="var-stylesheet-url"><h3>stylesheet-url</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L16">view source</a></div></div><div class="public anchor" id="var-validate"><h3>validate</h3><div class="usage"><code>(validate source)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/cli.clj#L41">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.quack.picky.collections.html b/docs/codox/dog-and-duck.quack.picky.collections.html index 9b3f142..d89cb27 100644 --- a/docs/codox/dog-and-duck.quack.picky.collections.html +++ b/docs/codox/dog-and-duck.quack.picky.collections.html @@ -1,3 +1,3 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.collections documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.collections.html#var-collection-page-faults"><div class="inner"><span>collection-page-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.collections.html#var-paged-collection-faults"><div class="inner"><span>paged-collection-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.collections.html#var-simple-collection-faults"><div class="inner"><span>simple-collection-faults</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.collections</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-collection-page-faults"><h3>collection-page-faults</h3><div class="usage"><code>(collection-page-faults x type)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/collections.clj#L47">view source</a></div></div><div class="public anchor" id="var-paged-collection-faults"><h3>paged-collection-faults</h3><div class="usage"><code>(paged-collection-faults x type)</code></div><div class="doc"><div class="markdown"><p>Return a list of faults found in <code>x</code> considered as a paged collection object of this sub-<code>type</code>, or <code>nil</code> if none are found.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/collections.clj#L24">view source</a></div></div><div class="public anchor" id="var-simple-collection-faults"><h3>simple-collection-faults</h3><div class="usage"><code>(simple-collection-faults x type)</code></div><div class="doc"><div class="markdown"><p>Return a list of faults found in <code>x</code> considered as a non-paged collection object of this sub-<code>type</code>, or <code>nil</code> if none are found.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/collections.clj#L35">view source</a></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.collections documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.collections.html#var-collection-page-faults"><div class="inner"><span>collection-page-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.collections.html#var-paged-collection-faults"><div class="inner"><span>paged-collection-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.collections.html#var-simple-collection-faults"><div class="inner"><span>simple-collection-faults</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.collections</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-collection-page-faults"><h3>collection-page-faults</h3><div class="usage"><code>(collection-page-faults x type)</code></div><div class="doc"><div class="markdown"><p>Return a list of faults found in <code>x</code> considered as a collection page object of this sub-<code>type</code>, or <code>nil</code> if none are found.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/collections.clj#L48">view source</a></div></div><div class="public anchor" id="var-paged-collection-faults"><h3>paged-collection-faults</h3><div class="usage"><code>(paged-collection-faults x type)</code></div><div class="doc"><div class="markdown"><p>Return a list of faults found in <code>x</code> considered as a paged collection object of this sub-<code>type</code>, or <code>nil</code> if none are found.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/collections.clj#L24">view source</a></div></div><div class="public anchor" id="var-simple-collection-faults"><h3>simple-collection-faults</h3><div class="usage"><code>(simple-collection-faults x type)</code></div><div class="doc"><div class="markdown"><p>Return a list of faults found in <code>x</code> considered as a non-paged collection object of this sub-<code>type</code>, or <code>nil</code> if none are found.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/collections.clj#L35">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.quack.picky.constants.html b/docs/codox/dog-and-duck.quack.picky.constants.html index 7dd8bad..78543bd 100644 --- a/docs/codox/dog-and-duck.quack.picky.constants.html +++ b/docs/codox/dog-and-duck.quack.picky.constants.html @@ -1,12 +1,14 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.constants documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-activitystreams-context-uri"><div class="inner"><span>activitystreams-context-uri</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-actor-types"><div class="inner"><span>actor-types</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-context-key"><div class="inner"><span>context-key</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-severity"><div class="inner"><span>severity</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-severity-filters"><div class="inner"><span>severity-filters</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-validation-fault-context-uri"><div class="inner"><span>validation-fault-context-uri</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-verb-types"><div class="inner"><span>verb-types</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.constants</h1><div class="doc"><div class="markdown"><p>Constants supporting the picky validator.</p></div></div><div class="public anchor" id="var-activitystreams-context-uri"><h3>activitystreams-context-uri</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The URI of the context of an ActivityStreams object is expected to be this literal string.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L20">view source</a></div></div><div class="public anchor" id="var-actor-types"><h3>actor-types</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The set of types we will accept as actors.</p> -<p>There’s an <a href="https://www.w3.org/TR/activitystreams-vocabulary/#actor-types">explicit set of allowed actor types</a>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L25">view source</a></div></div><div class="public anchor" id="var-context-key"><h3>context-key</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The Clojure reader barfs on <code>:@context</code>, although it is in principle a valid keyword. So we’ll make it once, here, to make the code more performant and easier to read.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L36">view source</a></div></div><div class="public anchor" id="var-severity"><h3>severity</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Severity of faults found, as follows:</p> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.constants documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-activity-types"><div class="inner"><span>activity-types</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-activitystreams-context-uri"><div class="inner"><span>activitystreams-context-uri</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-actor-types"><div class="inner"><span>actor-types</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-context-key"><div class="inner"><span>context-key</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-implicit-noun-types"><div class="inner"><span>implicit-noun-types</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-noun-types"><div class="inner"><span>noun-types</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-re-rfc5646"><div class="inner"><span>re-rfc5646</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-severity"><div class="inner"><span>severity</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-severity-filters"><div class="inner"><span>severity-filters</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.constants.html#var-validation-fault-context-uri"><div class="inner"><span>validation-fault-context-uri</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.constants</h1><div class="doc"><div class="markdown"><p>Constants supporting the picky validator.</p></div></div><div class="public anchor" id="var-activity-types"><h3>activity-types</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The set of types we will accept as activities.</p> +<p>There’s an <a href="https://www.w3.org/TR/activitystreams-vocabulary/#activity-types">explicit set of allowed activity types</a>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L79">view source</a></div></div><div class="public anchor" id="var-activitystreams-context-uri"><h3>activitystreams-context-uri</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The URI of the context of an ActivityStreams object is expected to be this literal string.</p> +<p><strong>NOTE THAT</strong> the URI actually used in the published suite of activitystreams-test-documents use this URI with ‘http’ rather than ‘https’ as the property part, but the spec itself specifies ‘https’.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L20">view source</a></div></div><div class="public anchor" id="var-actor-types"><h3>actor-types</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The set of types we will accept as actors.</p> +<p>There’s an <a href="https://www.w3.org/TR/activitystreams-vocabulary/#actor-types">explicit set of allowed actor types</a>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L29">view source</a></div></div><div class="public anchor" id="var-context-key"><h3>context-key</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The Clojure reader barfs on <code>:@context</code>, although it is in principle a valid keyword. So we’ll make it once, here, to make the code more performant and easier to read.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L40">view source</a></div></div><div class="public anchor" id="var-implicit-noun-types"><h3>implicit-noun-types</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>These types are not explicitly listed in <a href="https://www.w3.org/TR/activitystreams-vocabulary/#object-types">Section 3.3 of the spec</a>, but are mentioned in narrative</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L111">view source</a></div></div><div class="public anchor" id="var-noun-types"><h3>noun-types</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The set of object types we will accept as nouns.</p> +<p>There’s an <a href="https://www.w3.org/TR/activitystreams-vocabulary/#object-types">explicit set of allowed ‘object types’</a>, but by implication it is not exhaustive.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L89">view source</a></div></div><div class="public anchor" id="var-re-rfc5646"><h3>re-rfc5646</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A regex which tests conformity to RFC 5646. Cribbed from <a href="https://newbedev.com/regex-to-detect-locales">https://newbedev.com/regex-to-detect-locales</a></p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L46">view source</a></div></div><div class="public anchor" id="var-severity"><h3>severity</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Severity of faults found, as follows:</p> <ol> <li><code>:info</code> not actually a fault, but an issue noted during validation;</li> <li><code>:minor</code> things which I consider to be faults, but which don’t actually breach the spec;</li> <li><code>:should</code> instances where the spec says something SHOULD be done, which isn’t;</li> <li><code>:must</code> instances where the spec says something MUST be done, which isn’t;</li> <li><code>:critical</code> instances where I believe the fault means that the object cannot be meaningfully processed.</li> -</ol></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L42">view source</a></div></div><div class="public anchor" id="var-severity-filters"><h3>severity-filters</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Hack for implementing a severity hierarchy</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L56">view source</a></div></div><div class="public anchor" id="var-validation-fault-context-uri"><h3>validation-fault-context-uri</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The URI of the context of a validation fault report object shall be this literal string.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L65">view source</a></div></div><div class="public anchor" id="var-verb-types"><h3>verb-types</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The set of types we will accept as verbs.</p> -<p>There’s an <a href="https://www.w3.org/TR/activitystreams-vocabulary/#activity-types">explicit set of allowed verb types</a>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L70">view source</a></div></div></div></body></html> \ No newline at end of file +</ol></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L51">view source</a></div></div><div class="public anchor" id="var-severity-filters"><h3>severity-filters</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Hack for implementing a severity hierarchy</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L65">view source</a></div></div><div class="public anchor" id="var-validation-fault-context-uri"><h3>validation-fault-context-uri</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The URI of the context of a validation fault report object shall be this literal string.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/constants.clj#L74">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.quack.picky.control-variables.html b/docs/codox/dog-and-duck.quack.picky.control-variables.html index 93114ad..9c3579d 100644 --- a/docs/codox/dog-and-duck.quack.picky.control-variables.html +++ b/docs/codox/dog-and-duck.quack.picky.control-variables.html @@ -1,6 +1,6 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.control-variables documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.control-variables.html#var-*reify-refs*"><div class="inner"><span>*reify-refs*</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.control-variables.html#var-*reject-severity*"><div class="inner"><span>*reject-severity*</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.control-variables</h1><div class="doc"><div class="markdown"><p>Control variables for the picky validator.</p></div></div><div class="public anchor" id="var-*reify-refs*"><h3>*reify-refs*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>If <code>true</code>, references to objects in fields will be reified and validated. If <code>false</code>, they won’t, but an <code>:info</code> level fault report will be generated.</p> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.control-variables documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.control-variables.html#var-*reify-refs*"><div class="inner"><span>*reify-refs*</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.control-variables.html#var-*reject-severity*"><div class="inner"><span>*reject-severity*</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.control-variables</h1><div class="doc"><div class="markdown"><p>Control variables for the picky validator.</p></div></div><div class="public anchor" id="var-*reify-refs*"><h3>*reify-refs*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>If <code>true</code>, references to objects in fields will be reified and validated. If <code>false</code>, they won’t, but an <code>:info</code> level fault report will be generated.</p> <p>There are several things in the spec which, in a document, may correctly be either</p> <ol> <li>a fully fleshed out object, or</li> diff --git a/docs/codox/dog-and-duck.quack.picky.distribution.html b/docs/codox/dog-and-duck.quack.picky.distribution.html new file mode 100644 index 0000000..6cd5e59 --- /dev/null +++ b/docs/codox/dog-and-duck.quack.picky.distribution.html @@ -0,0 +1,4 @@ +<!DOCTYPE html PUBLIC "" + ""> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.distribution documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.distribution.html#var-distribution"><div class="inner"><span>distribution</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.distribution</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-distribution"><h3>distribution</h3><div class="usage"><code>(distribution f vals)</code></div><div class="doc"><div class="markdown"><p>Distribution of values of function <code>f</code> when applied to <code>vals</code>.</p> +<p>I <em>know</em> there’s a library function that does this, probably better, but I don’t remember what it’s called!</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/distribution.clj#L19">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.quack.picky.html b/docs/codox/dog-and-duck.quack.picky.html index 654beba..f598648 100644 --- a/docs/codox/dog-and-duck.quack.picky.html +++ b/docs/codox/dog-and-duck.quack.picky.html @@ -1,6 +1,6 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 current"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-accept-required-properties"><div class="inner"><span>accept-required-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-activity-faults"><div class="inner"><span>activity-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-activity-required-properties"><div class="inner"><span>activity-required-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-activity-type-faults"><div class="inner"><span>activity-type-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-actor-faults"><div class="inner"><span>actor-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-base-activity-required-properties"><div class="inner"><span>base-activity-required-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-collection-faults"><div class="inner"><span>collection-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-intransitive-activity-required-properties"><div class="inner"><span>intransitive-activity-required-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-link-faults"><div class="inner"><span>link-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-persistent-object-faults"><div class="inner"><span>persistent-object-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-uri-or-fault"><div class="inner"><span>uri-or-fault</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky</h1><div class="doc"><div class="markdown"><p>Fault-finder for ActivityPub documents. </p> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3 current"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-accept-required-properties"><div class="inner"><span>accept-required-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-activity-faults"><div class="inner"><span>activity-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-activity-required-properties"><div class="inner"><span>activity-required-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-activity-type-faults"><div class="inner"><span>activity-type-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-actor-faults"><div class="inner"><span>actor-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-base-activity-required-properties"><div class="inner"><span>base-activity-required-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-collection-faults"><div class="inner"><span>collection-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-intransitive-activity-required-properties"><div class="inner"><span>intransitive-activity-required-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-link-faults"><div class="inner"><span>link-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-persistent-object-faults"><div class="inner"><span>persistent-object-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.html#var-uri-or-fault"><div class="inner"><span>uri-or-fault</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky</h1><div class="doc"><div class="markdown"><p>Fault-finder for ActivityPub documents. </p> <p>Generally, each <code>-faults</code> function will return:</p> <ol> <li><code>nil</code> if no faults were found;</li> diff --git a/docs/codox/dog-and-duck.quack.picky.objects.html b/docs/codox/dog-and-duck.quack.picky.objects.html new file mode 100644 index 0000000..67d7b5b --- /dev/null +++ b/docs/codox/dog-and-duck.quack.picky.objects.html @@ -0,0 +1,27 @@ +<!DOCTYPE html PUBLIC "" + ""> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.objects documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-check-property"><div class="inner"><span>check-property</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-check-property-required"><div class="inner"><span>check-property-required</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-check-property-valid"><div class="inner"><span>check-property-valid</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-coll-object-reference-or-fault"><div class="inner"><span>coll-object-reference-or-fault</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-maybe-reify"><div class="inner"><span>maybe-reify</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-maybe-reify-or-faults"><div class="inner"><span>maybe-reify-or-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-object-expected-properties"><div class="inner"><span>object-expected-properties</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-object-faults"><div class="inner"><span>object-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-object-reference-or-faults"><div class="inner"><span>object-reference-or-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.objects.html#var-properties-faults"><div class="inner"><span>properties-faults</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.objects</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-check-property"><h3>check-property</h3><div class="usage"><code>(check-property obj prop)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L377">view source</a></div></div><div class="public anchor" id="var-check-property-required"><h3>check-property-required</h3><div class="usage"><code>(check-property-required obj prop clause)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L358">view source</a></div></div><div class="public anchor" id="var-check-property-valid"><h3>check-property-valid</h3><div class="usage"><code>(check-property-valid obj prop clause)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L366">view source</a></div></div><div class="public anchor" id="var-coll-object-reference-or-fault"><h3>coll-object-reference-or-fault</h3><div class="usage"><code>(coll-object-reference-or-fault value expected-type severity token)</code></div><div class="doc"><div class="markdown"><p>As object-reference-or-fault, except <code>value</code> argument may also be a list of objects and/or object references.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L505">view source</a></div></div><div class="public anchor" id="var-maybe-reify"><h3>maybe-reify</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>If <code>*reify-refs*</code> is <code>true</code>, return the object at this <code>target</code> URI. Returns <code>nil</code> if</p> +<ol> + <li><code>*reify-refs*</code> is false;</li> + <li>the object was not found;</li> + <li>access to the object was not permitted.</li> +</ol> +<p>Consequently, use with care.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L434">view source</a></div></div><div class="public anchor" id="var-maybe-reify-or-faults"><h3>maybe-reify-or-faults</h3><div class="usage"><code>(maybe-reify-or-faults value expected-type severity token)</code></div><div class="doc"><div class="markdown"><p>If <code>*reify-refs*</code> is <code>true</code>, runs basic checks on the object at this <code>target</code> URI, if it is found, or a list containing a fault object with this <code>severity</code> and <code>token</code> if it is not.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L455">view source</a></div></div><div class="public anchor" id="var-object-expected-properties"><h3>object-expected-properties</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Requirements of properties of object, cribbed from <a href="https://www.w3.org/TR/activitystreams-vocabulary/#properties">https://www.w3.org/TR/activitystreams-vocabulary/#properties</a></p> +<p>Note the following sub-key value types:</p> +<ul> + <li><code>:collection</code> opposite of <code>:functional</code>: if true, value should be a collection (in the Clojure sense), not a single object;</li> + <li><code>:functional</code> if true, value should be a single object; if false, may be a single object or a sequence of objects, but each must pass validation checks;</li> + <li><code>:if-invalid</code> a sequence of two keywords, first indicating severity, second being a message key;</li> + <li><code>:if-missing</code> a sequence of two keywords, first indicating severity, second being a message key;</li> + <li><code>:required</code> a boolean, or a function of one argument returning a boolean, in which case the function will be applied to the object having the property;</li> + <li><code>:validator</code> a function of one argument returning a boolean, which will be applied to the value or values of the identified property.</li> +</ul></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L46">view source</a></div></div><div class="public anchor" id="var-object-faults"><h3>object-faults</h3><div class="usage"><code>(object-faults x)</code><code>(object-faults x expected-type)</code></div><div class="doc"><div class="markdown"><p>Return a list of faults found in object <code>x</code>, or <code>nil</code> if none are.</p> +<p>If <code>expected-type</code> is also passed, verify that <code>x</code> has <code>expected-type</code>. <code>expected-type</code> may be passed as a string or as a set of strings. Detailed verification of the particular features of types is not done here.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L402">view source</a></div></div><div class="public anchor" id="var-object-reference-or-faults"><h3>object-reference-or-faults</h3><div class="usage"><code>(object-reference-or-faults value expected-type severity token)</code></div><div class="doc"><div class="markdown"><p>If this <code>value</code> is either </p> +<ol> + <li>an object of <code>expected-type</code>;</li> + <li>a URI referencing an object of <code>expected-type</code>; or</li> + <li>a link object referencing an object of <code>expected-type</code></li> +</ol> +<p>and no faults are returned from validating the linked object, then return <code>nil</code>; else return a sequence comprising a fault object with this <code>severity</code> and <code>token</code>, prepended to the faults returned.</p> +<p>As with <code>has-type-or-fault</code> (q.v.), <code>expected-type</code> may be passed as a string, as a set of strings, or <code>nil</code> (indicating the type of the referenced object should not be checked).</p> +<p><strong>NOTE THAT</strong> if <code>*reify-refs*</code> is <code>false</code>, referenced objects will not actually be checked.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L465">view source</a></div></div><div class="public anchor" id="var-properties-faults"><h3>properties-faults</h3><div class="usage"><code>(properties-faults x)</code></div><div class="doc"><div class="markdown"><p>Return a lost of faults found on properties of the object <code>x</code>, or <code>nil</code> if none are.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/objects.clj#L387">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.quack.picky.scratch.html b/docs/codox/dog-and-duck.quack.picky.scratch.html new file mode 100644 index 0000000..ac8693c --- /dev/null +++ b/docs/codox/dog-and-duck.quack.picky.scratch.html @@ -0,0 +1,3 @@ +<!DOCTYPE html PUBLIC "" + ""> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.scratch documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.scratch</h1><div class="doc"><div class="markdown"><p>Development scratchpad</p></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.quack.picky.time.html b/docs/codox/dog-and-duck.quack.picky.time.html new file mode 100644 index 0000000..196063d --- /dev/null +++ b/docs/codox/dog-and-duck.quack.picky.time.html @@ -0,0 +1,4 @@ +<!DOCTYPE html PUBLIC "" + ""> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.time documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch current"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.time.html#var-date-time-property-or-fault"><div class="inner"><span>date-time-property-or-fault</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.time.html#var-xsd-date-time.3F"><div class="inner"><span>xsd-date-time?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.time.html#var-xsd-duration.3F"><div class="inner"><span>xsd-duration?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.time</h1><div class="doc"><div class="markdown"><p>Time, gentleman, please! Recognising and validating date time values.</p></div></div><div class="public anchor" id="var-date-time-property-or-fault"><h3>date-time-property-or-fault</h3><div class="usage"><code>(date-time-property-or-fault x property severity token required?)</code></div><div class="doc"><div class="markdown"><p>If the value of this <code>property</code> of object <code>x</code> is a valid xsd:dateTime value, return a fault object with this <code>token</code> and <code>severity</code>. </p> +<p>If <code>required?</code> is false and there is no such property, no fault will be returned.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/time.clj#L55">view source</a></div></div><div class="public anchor" id="var-xsd-date-time.3F"><h3>xsd-date-time?</h3><div class="usage"><code>(xsd-date-time? value)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if <code>value</code> matches the pattern for an <a href="https://www.w3.org/TR/xmlschema11-2/#dateTime">xsd:dateTime</a>, else <code>false</code></p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/time.clj#L28">view source</a></div></div><div class="public anchor" id="var-xsd-duration.3F"><h3>xsd-duration?</h3><div class="usage"><code>(xsd-duration? value)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if <code>value</code> matches the pattern for an <a href="https://www.w3.org/TR/xmlschema11-2/#duration">xsd:duration</a>, else <code>false</code></p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/time.clj#L41">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.quack.picky.utils.html b/docs/codox/dog-and-duck.quack.picky.utils.html index 41b6075..ed78aad 100644 --- a/docs/codox/dog-and-duck.quack.picky.utils.html +++ b/docs/codox/dog-and-duck.quack.picky.utils.html @@ -1,17 +1,9 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.utils documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4 current"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-actor-type.3F"><div class="inner"><span>actor-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-any-or-faults"><div class="inner"><span>any-or-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-coll-object-reference-or-fault"><div class="inner"><span>coll-object-reference-or-fault</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-concat-non-empty"><div class="inner"><span>concat-non-empty</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-cond-make-fault-object"><div class="inner"><span>cond-make-fault-object</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-context.3F"><div class="inner"><span>context?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-filter-severity"><div class="inner"><span>filter-severity</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-activity-type.3F"><div class="inner"><span>has-activity-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-actor-type.3F"><div class="inner"><span>has-actor-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-context.3F"><div class="inner"><span>has-context?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-type-or-fault"><div class="inner"><span>has-type-or-fault</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-type.3F"><div class="inner"><span>has-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-link-or-uri.3F"><div class="inner"><span>link-or-uri?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-make-fault-object"><div class="inner"><span>make-fault-object</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-nil-if-empty"><div class="inner"><span>nil-if-empty</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-object-faults"><div class="inner"><span>object-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-object-or-uri.3F"><div class="inner"><span>object-or-uri?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-object-reference-or-faults"><div class="inner"><span>object-reference-or-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-string-or-fault"><div class="inner"><span>string-or-fault</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-truthy.3F"><div class="inner"><span>truthy?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-verb-type.3F"><div class="inner"><span>verb-type?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.utils</h1><div class="doc"><div class="markdown"><p>Utility functions supporting the picky validator</p></div></div><div class="public anchor" id="var-actor-type.3F"><h3>actor-type?</h3><div class="usage"><code>(actor-type? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the <code>x</code> is a recognised actor type, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L34">view source</a></div></div><div class="public anchor" id="var-any-or-faults"><h3>any-or-faults</h3><div class="usage"><code>(any-or-faults options severity-if-none token)</code></div><div class="doc"><div class="markdown"><p>Return <code>nil</code> if validating one of these options returns <code>nil</code>; otherwise return a list comprising a fault report object with this <code>severity-if-none</code> and this token followed by all the fault reports from validating each option.</p> -<p>There are several places - but especially in validating collections - where there are several different valid configurations, but few or no properties are always required.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L196">view source</a></div></div><div class="public anchor" id="var-coll-object-reference-or-fault"><h3>coll-object-reference-or-fault</h3><div class="usage"><code>(coll-object-reference-or-fault value expected-type severity token)</code></div><div class="doc"><div class="markdown"><p>As object-reference-or-fault, except <code>value</code> argument may also be a list of objects and/or object references.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L302">view source</a></div></div><div class="public anchor" id="var-concat-non-empty"><h3>concat-non-empty</h3><div class="usage"><code>(concat-non-empty & lists)</code></div><div class="doc"><div class="markdown"><p>Quick function to replace the pattern (nil-if-empty (remove nil? (concat …))) which I’m using a lot!</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L166">view source</a></div></div><div class="public anchor" id="var-cond-make-fault-object"><h3>cond-make-fault-object</h3><h4 class="type">macro</h4><div class="usage"><code>(cond-make-fault-object v severity token)</code></div><div class="doc"><div class="markdown"><p>If <code>v</code> is <code>false</code> or <code>nil</code>, return a fault object with this <code>severity</code> and <code>token</code>, else return nil.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L211">view source</a></div></div><div class="public anchor" id="var-context.3F"><h3>context?</h3><div class="usage"><code>(context? x)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> iff <code>x</code> quacks like an ActivityStreams context, else false.</p> -<p>A context is either 1. the URI (actually an IRI) <code>activitystreams-context-uri</code>, or 2. a collection comprising that URI and a map.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L115">view source</a></div></div><div class="public anchor" id="var-filter-severity"><h3>filter-severity</h3><div class="usage"><code>(filter-severity reports severity)</code></div><div class="doc"><div class="markdown"><p>Return a list of reports taken from these <code>reports</code> where the severity of the report is greater than this or equal to this <code>severity</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L97">view source</a></div></div><div class="public anchor" id="var-has-activity-type.3F"><h3>has-activity-type?</h3><div class="usage"><code>(has-activity-type? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the object <code>x</code> has a type which is an activity type, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L79">view source</a></div></div><div class="public anchor" id="var-has-actor-type.3F"><h3>has-actor-type?</h3><div class="usage"><code>(has-actor-type? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the object <code>x</code> has a type which is an actor type, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L88">view source</a></div></div><div class="public anchor" id="var-has-context.3F"><h3>has-context?</h3><h4 class="type">macro</h4><div class="usage"><code>(has-context? x)</code></div><div class="doc"><div class="markdown"><p>True if <code>x</code> is an ActivityStreams object with a valid context, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L130">view source</a></div></div><div class="public anchor" id="var-has-type-or-fault"><h3>has-type-or-fault</h3><div class="usage"><code>(has-type-or-fault x acceptable severity token)</code></div><div class="doc"><div class="markdown"><p>If object <code>x</code> has a <code>:type</code> value which is <code>acceptable</code>, return <code>nil</code>; else return a fault object with this <code>severity</code> and <code>token</code>.</p> -<p><code>acceptable</code> may be passed as either nil, a string, or a set of strings. If <code>acceptable</code> is <code>nil</code>, no type specific tests will be performed.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L172">view source</a></div></div><div class="public anchor" id="var-has-type.3F"><h3>has-type?</h3><div class="usage"><code>(has-type? x type)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if object <code>x</code> has type <code>type</code>, else <code>false</code>.</p> -<p>The values of <code>type</code> fields of ActivityStreams objects may be lists; they are considered to have a type if the type token is a member of the list.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L45">view source</a></div></div><div class="public anchor" id="var-link-or-uri.3F"><h3>link-or-uri?</h3><h4 class="type">macro</h4><div class="usage"><code>(link-or-uri? x)</code></div><div class="doc"><div class="markdown"><p>Very basic check that <code>x</code> is either a link object or a URI.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L67">view source</a></div></div><div class="public anchor" id="var-make-fault-object"><h3>make-fault-object</h3><div class="usage"><code>(make-fault-object severity fault)</code></div><div class="doc"><div class="markdown"><p>Return a fault object with these <code>severity</code>, <code>fault</code> and <code>narrative</code> values.</p> -<p>An ActivityPub object MUST have a globally unique ID. Whether this is meaningful depends on whether we persist fault report objects and serve them, which at present I have no plans to do.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L135">view source</a></div></div><div class="public anchor" id="var-nil-if-empty"><h3>nil-if-empty</h3><h4 class="type">macro</h4><div class="usage"><code>(nil-if-empty x)</code></div><div class="doc"><div class="markdown"><p>if <code>x</code> is an empty collection, return <code>nil</code>; else return <code>x</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L160">view source</a></div></div><div class="public anchor" id="var-object-faults"><h3>object-faults</h3><div class="usage"><code>(object-faults x)</code><code>(object-faults x expected-type)</code></div><div class="doc"><div class="markdown"><p>Return a list of faults found in object <code>x</code>, or <code>nil</code> if none are.</p> -<p>If <code>expected-type</code> is also passed, verify that <code>x</code> has <code>expected-type</code>. <code>expected-type</code> may be passed as a string or as a set of strings. Detailed verification of the particular features of types is not done here.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L229">view source</a></div></div><div class="public anchor" id="var-object-or-uri.3F"><h3>object-or-uri?</h3><div class="usage"><code>(object-or-uri? x)</code></div><div class="doc"><div class="markdown"><p>Very basic check that <code>x</code> is either an object or a URI.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L57">view source</a></div></div><div class="public anchor" id="var-object-reference-or-faults"><h3>object-reference-or-faults</h3><div class="usage"><code>(object-reference-or-faults value expected-type severity token)</code></div><div class="doc"><div class="markdown"><p>If this <code>value</code> is either </p> -<ol> - <li>an object of <code>expected-type</code>;</li> - <li>a URI referencing an object of <code>expected-type</code>; or</li> - <li>a link object referencing an object of <code>expected-type</code></li> -</ol> -<p>and no faults are returned from validating the linked object, then return <code>nil</code>; else return a sequence comprising a fault object with this <code>severity</code> and <code>token</code>, prepended to the faults returned.</p> -<p>As with <code>has-type-or-fault</code> (q.v.), <code>expected-type</code> may be passed as a string, as a set of strings, or <code>nil</code> (indicating the type of the referenced object should not be checked).</p> -<p><strong>NOTE THAT</strong> if <code>*reify-refs*</code> is <code>false</code>, referenced objects will not actually be checked.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L256">view source</a></div></div><div class="public anchor" id="var-string-or-fault"><h3>string-or-fault</h3><div class="usage"><code>(string-or-fault value severity token)</code><code>(string-or-fault value severity token pattern)</code></div><div class="doc"><div class="markdown"><p>If this <code>value</code> is not a string, return a fault object with this <code>severity</code> and <code>token</code>, else <code>nil</code>. If <code>pattern</code> is also passed, it is expected to be a Regex, and the fault object will be returned unless <code>value</code> matches the <code>pattern</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L217">view source</a></div></div><div class="public anchor" id="var-truthy.3F"><h3>truthy?</h3><div class="usage"><code>(truthy? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if <code>x</code> is truthy, else <code>false</code>. There must be some more idiomatic way to do this?</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L39">view source</a></div></div><div class="public anchor" id="var-verb-type.3F"><h3>verb-type?</h3><div class="usage"><code>(verb-type? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> if <code>x</code>, a string, represents a recognised ActivityStreams activity type.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L73">view source</a></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.picky.utils documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4 current"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-activity-type.3F"><div class="inner"><span>activity-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-actor-type.3F"><div class="inner"><span>actor-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-any-or-faults"><div class="inner"><span>any-or-faults</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-concat-non-empty"><div class="inner"><span>concat-non-empty</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-cond-make-fault-object"><div class="inner"><span>cond-make-fault-object</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-context.3F"><div class="inner"><span>context?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-filter-severity"><div class="inner"><span>filter-severity</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-activity-type.3F"><div class="inner"><span>has-activity-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-actor-type.3F"><div class="inner"><span>has-actor-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-context.3F"><div class="inner"><span>has-context?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-type-or-fault"><div class="inner"><span>has-type-or-fault</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-has-type.3F"><div class="inner"><span>has-type?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-link-or-uri.3F"><div class="inner"><span>link-or-uri?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-make-fault-object"><div class="inner"><span>make-fault-object</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-nil-if-empty"><div class="inner"><span>nil-if-empty</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-object-or-uri.3F"><div class="inner"><span>object-or-uri?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-string-or-fault"><div class="inner"><span>string-or-fault</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-truthy.3F"><div class="inner"><span>truthy?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.picky.utils.html#var-xsd-non-negative-integer.3F"><div class="inner"><span>xsd-non-negative-integer?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.picky.utils</h1><div class="doc"><div class="markdown"><p>Utility functions supporting the picky validator</p></div></div><div class="public anchor" id="var-activity-type.3F"><h3>activity-type?</h3><div class="usage"><code>(activity-type? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> if <code>x</code>, a string, represents a recognised ActivityStreams activity type.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L90">view source</a></div></div><div class="public anchor" id="var-actor-type.3F"><h3>actor-type?</h3><div class="usage"><code>(actor-type? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the <code>x</code> is a recognised actor type, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L32">view source</a></div></div><div class="public anchor" id="var-any-or-faults"><h3>any-or-faults</h3><div class="usage"><code>(any-or-faults options severity-if-none token)</code></div><div class="doc"><div class="markdown"><p>Return <code>nil</code> if validating one of these options returns <code>nil</code>; otherwise return a list comprising a fault report object with this <code>severity-if-none</code> and this token followed by all the fault reports from validating each option.</p> +<p>There are several places - but especially in validating collections - where there are several different valid configurations, but few or no properties are always required.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L223">view source</a></div></div><div class="public anchor" id="var-concat-non-empty"><h3>concat-non-empty</h3><div class="usage"><code>(concat-non-empty & lists)</code></div><div class="doc"><div class="markdown"><p>Quick function to replace the pattern (nil-if-empty (remove nil? (concat …))) which I’m using a lot!</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L190">view source</a></div></div><div class="public anchor" id="var-cond-make-fault-object"><h3>cond-make-fault-object</h3><div class="usage"><code>(cond-make-fault-object v severity token)</code></div><div class="doc"><div class="markdown"><p>If <code>v</code> is <code>false</code> or <code>nil</code>, return a fault object with this <code>severity</code> and <code>token</code>, else return nil.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L238">view source</a></div></div><div class="public anchor" id="var-context.3F"><h3>context?</h3><div class="usage"><code>(context? x)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> iff <code>x</code> quacks like an ActivityStreams context, else false.</p> +<p>A context is either 1. the URI (actually an IRI) <code>activitystreams-context-uri</code>, or 2. a collection comprising that URI and a map.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L139">view source</a></div></div><div class="public anchor" id="var-filter-severity"><h3>filter-severity</h3><div class="usage"><code>(filter-severity reports severity)</code></div><div class="doc"><div class="markdown"><p>Return a list of reports taken from these <code>reports</code> where the severity of the report is greater than this or equal to this <code>severity</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L114">view source</a></div></div><div class="public anchor" id="var-has-activity-type.3F"><h3>has-activity-type?</h3><div class="usage"><code>(has-activity-type? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the object <code>x</code> has a type which is an activity type, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L96">view source</a></div></div><div class="public anchor" id="var-has-actor-type.3F"><h3>has-actor-type?</h3><div class="usage"><code>(has-actor-type? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the object <code>x</code> has a type which is an actor type, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L105">view source</a></div></div><div class="public anchor" id="var-has-context.3F"><h3>has-context?</h3><h4 class="type">macro</h4><div class="usage"><code>(has-context? x)</code></div><div class="doc"><div class="markdown"><p>True if <code>x</code> is an ActivityStreams object with a valid context, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L154">view source</a></div></div><div class="public anchor" id="var-has-type-or-fault"><h3>has-type-or-fault</h3><div class="usage"><code>(has-type-or-fault x acceptable severity token)</code></div><div class="doc"><div class="markdown"><p>If object <code>x</code> has a <code>:type</code> value which is <code>acceptable</code>, return <code>nil</code>; else return a fault object with this <code>severity</code> and <code>token</code>.</p> +<p><code>acceptable</code> may be passed as either nil, a string, or a set of strings. If <code>acceptable</code> is <code>nil</code>, no type specific tests will be performed.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L196">view source</a></div></div><div class="public anchor" id="var-has-type.3F"><h3>has-type?</h3><div class="usage"><code>(has-type? x acceptable)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if object <code>x</code> has a type in <code>acceptable</code>, else <code>false</code>.</p> +<p>The values of <code>:type</code> fields of ActivityStreams objects may be lists; they are considered to have a type if a member of the list is in <code>acceptable</code>.</p> +<p><code>acceptable</code> may be passed as a string, in which case there is only one acceptable value, or as a set of strings, in which case any member of the set is acceptable.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L49">view source</a></div></div><div class="public anchor" id="var-link-or-uri.3F"><h3>link-or-uri?</h3><h4 class="type">macro</h4><div class="usage"><code>(link-or-uri? x)</code></div><div class="doc"><div class="markdown"><p>Very basic check that <code>x</code> is either a link object or a URI.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L84">view source</a></div></div><div class="public anchor" id="var-make-fault-object"><h3>make-fault-object</h3><div class="usage"><code>(make-fault-object severity fault)</code></div><div class="doc"><div class="markdown"><p>Return a fault object with these <code>severity</code>, <code>fault</code> and <code>narrative</code> values.</p> +<p>An ActivityPub object MUST have a globally unique ID. Whether this is meaningful depends on whether we persist fault report objects and serve them, which at present I have no plans to do.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L159">view source</a></div></div><div class="public anchor" id="var-nil-if-empty"><h3>nil-if-empty</h3><h4 class="type">macro</h4><div class="usage"><code>(nil-if-empty x)</code></div><div class="doc"><div class="markdown"><p>if <code>x</code> is an empty collection, return <code>nil</code>; else return <code>x</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L184">view source</a></div></div><div class="public anchor" id="var-object-or-uri.3F"><h3>object-or-uri?</h3><div class="usage"><code>(object-or-uri? x)</code><code>(object-or-uri? x type)</code></div><div class="doc"><div class="markdown"><p>Very basic check that <code>x</code> is either an object or a URI.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L68">view source</a></div></div><div class="public anchor" id="var-string-or-fault"><h3>string-or-fault</h3><div class="usage"><code>(string-or-fault value severity token)</code><code>(string-or-fault value severity token pattern)</code></div><div class="doc"><div class="markdown"><p>If this <code>value</code> is not a string, return a fault object with this <code>severity</code> and <code>token</code>, else <code>nil</code>. If <code>pattern</code> is also passed, it is expected to be a Regex, and the fault object will be returned unless <code>value</code> matches the <code>pattern</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L244">view source</a></div></div><div class="public anchor" id="var-truthy.3F"><h3>truthy?</h3><div class="usage"><code>(truthy? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if <code>x</code> is truthy, else <code>false</code>. There must be some more idiomatic way to do this?</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L37">view source</a></div></div><div class="public anchor" id="var-xsd-non-negative-integer.3F"><h3>xsd-non-negative-integer?</h3><div class="usage"><code>(xsd-non-negative-integer? x)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if <code>value</code> matches the pattern for an <a href="https://www.w3.org/TR/xmlschema11-2/#nonNegativeInteger">xsd:nonNegativeInteger</a>, else <code>false</code></p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/picky/utils.clj#L43">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.quack.quack.html b/docs/codox/dog-and-duck.quack.quack.html index cfba417..3d3a69d 100644 --- a/docs/codox/dog-and-duck.quack.quack.html +++ b/docs/codox/dog-and-duck.quack.quack.html @@ -1,14 +1,14 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.quack documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3 current"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-activity.3F"><div class="inner"><span>activity?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-actor-or-uri.3F"><div class="inner"><span>actor-or-uri?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-actor.3F"><div class="inner"><span>actor?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-collection-page.3F"><div class="inner"><span>collection-page?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-collection.3F"><div class="inner"><span>collection?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-link-or-uri.3F"><div class="inner"><span>link-or-uri?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-link.3F"><div class="inner"><span>link?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-object.3F"><div class="inner"><span>object?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-ordered-collection-page.3F"><div class="inner"><span>ordered-collection-page?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-ordered-collection.3F"><div class="inner"><span>ordered-collection?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-persistent-object.3F"><div class="inner"><span>persistent-object?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-unordered-collection.3F"><div class="inner"><span>unordered-collection?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.quack</h1><div class="doc"><div class="markdown"><p>Validator for ActivityPub objects: if it walks like a duck, and it quacks like a duck…</p> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.quack.quack documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3 current"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-activity.3F"><div class="inner"><span>activity?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-actor-or-uri.3F"><div class="inner"><span>actor-or-uri?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-actor.3F"><div class="inner"><span>actor?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-collection-page.3F"><div class="inner"><span>collection-page?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-collection.3F"><div class="inner"><span>collection?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-link-or-uri.3F"><div class="inner"><span>link-or-uri?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-link.3F"><div class="inner"><span>link?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-object.3F"><div class="inner"><span>object?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-ordered-collection-page.3F"><div class="inner"><span>ordered-collection-page?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-ordered-collection.3F"><div class="inner"><span>ordered-collection?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-persistent-object.3F"><div class="inner"><span>persistent-object?</span></div></a></li><li class="depth-1"><a href="dog-and-duck.quack.quack.html#var-unordered-collection.3F"><div class="inner"><span>unordered-collection?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.quack.quack</h1><div class="doc"><div class="markdown"><p>Validator for ActivityPub objects: if it walks like a duck, and it quacks like a duck…</p> <p>**NOTE THAT the ActivityPub spec <a href="https://www.w3.org/TR/activitypub/#obj">says</a></p> <blockquote> <p>Servers SHOULD validate the content they receive to avoid content spoofing attacks</p> </blockquote> -<p>but in practice ActivityPub content collected in the wild bears only a hazy relationship to the spec, so this is difficult. I suspect that I may have to implement a <code>*strict*</code> dynamic variable, so that users can toggle some checks off.</p></div></div><div class="public anchor" id="var-activity.3F"><h3>activity?</h3><div class="usage"><code>(activity? x)</code><code>(activity? x severity)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like an activity, else false.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L96">view source</a></div></div><div class="public anchor" id="var-actor-or-uri.3F"><h3>actor-or-uri?</h3><div class="usage"><code>(actor-or-uri? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> if <code>x</code> is either a URI or an actor.</p> -<p><strong>TODO</strong>: I need to decide about whether to reify referenced objects before validation or after. After reification, every reference to an actor <em>must be</em> to an actor object, but before, may only be to a URI pointing to one.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L80">view source</a></div></div><div class="public anchor" id="var-actor.3F"><h3>actor?</h3><div class="usage"><code>(actor? x)</code><code>(actor? x severity)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if <code>x</code> quacks like an actor, else false.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L74">view source</a></div></div><div class="public anchor" id="var-collection-page.3F"><h3>collection-page?</h3><div class="usage"><code>(collection-page? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like a page in a paged collection, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L161">view source</a></div></div><div class="public anchor" id="var-collection.3F"><h3>collection?</h3><div class="usage"><code>(collection? x object-type)</code><code>(collection? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like a collection of type <code>object-type</code>, else <code>false</code>.</p> -<p>With one argument, will recognise plain collections and ordered collections, but (currently) not collection pages.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L119">view source</a></div></div><div class="public anchor" id="var-link-or-uri.3F"><h3>link-or-uri?</h3><div class="usage"><code>(link-or-uri? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> is either a URI or a link, else false.</p> -<p>There are several points in the specification where e.g. the <code>:image</code> property (if present) may be either a link or a URI.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L108">view source</a></div></div><div class="public anchor" id="var-link.3F"><h3>link?</h3><div class="usage"><code>(link? x)</code><code>(link? x severity)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like a link, else false.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L102">view source</a></div></div><div class="public anchor" id="var-object.3F"><h3>object?</h3><div class="usage"><code>(object? x)</code><code>(object? x severity)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> iff <code>x</code> is recognisably an ActivityStreams object.</p> +<p>but in practice ActivityPub content collected in the wild bears only a hazy relationship to the spec, so this is difficult. I suspect that I may have to implement a <code>*strict*</code> dynamic variable, so that users can toggle some checks off.</p></div></div><div class="public anchor" id="var-activity.3F"><h3>activity?</h3><div class="usage"><code>(activity? x)</code><code>(activity? x severity)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like an activity, else false.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L97">view source</a></div></div><div class="public anchor" id="var-actor-or-uri.3F"><h3>actor-or-uri?</h3><div class="usage"><code>(actor-or-uri? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> if <code>x</code> is either a URI or an actor.</p> +<p><strong>TODO</strong>: I need to decide about whether to reify referenced objects before validation or after. After reification, every reference to an actor <em>must be</em> to an actor object, but before, may only be to a URI pointing to one.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L81">view source</a></div></div><div class="public anchor" id="var-actor.3F"><h3>actor?</h3><div class="usage"><code>(actor? x)</code><code>(actor? x severity)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if <code>x</code> quacks like an actor, else false.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L75">view source</a></div></div><div class="public anchor" id="var-collection-page.3F"><h3>collection-page?</h3><div class="usage"><code>(collection-page? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like a page in a paged collection, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L162">view source</a></div></div><div class="public anchor" id="var-collection.3F"><h3>collection?</h3><div class="usage"><code>(collection? x object-type)</code><code>(collection? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like a collection of type <code>object-type</code>, else <code>false</code>.</p> +<p>With one argument, will recognise plain collections and ordered collections, but (currently) not collection pages.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L120">view source</a></div></div><div class="public anchor" id="var-link-or-uri.3F"><h3>link-or-uri?</h3><div class="usage"><code>(link-or-uri? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> is either a URI or a link, else false.</p> +<p>There are several points in the specification where e.g. the <code>:image</code> property (if present) may be either a link or a URI.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L109">view source</a></div></div><div class="public anchor" id="var-link.3F"><h3>link?</h3><div class="usage"><code>(link? x)</code><code>(link? x severity)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like a link, else false.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L103">view source</a></div></div><div class="public anchor" id="var-object.3F"><h3>object?</h3><div class="usage"><code>(object? x)</code><code>(object? x severity)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> iff <code>x</code> is recognisably an ActivityStreams object.</p> <p><strong>NOTE THAT</strong> The ActivityStreams spec <a href="https://www.w3.org/TR/activitystreams-core/#object">says</a>:</p> <blockquote> <p>All properties are optional (including the id and type)</p> @@ -18,5 +18,5 @@ <blockquote> <p>Implementers SHOULD include the ActivityPub context in their object definitions</p> </blockquote> -<p>but in samples found in the wild they typically don’t.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L40">view source</a></div></div><div class="public anchor" id="var-ordered-collection-page.3F"><h3>ordered-collection-page?</h3><div class="usage"><code>(ordered-collection-page? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like a page in an ordered paged collection, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L166">view source</a></div></div><div class="public anchor" id="var-ordered-collection.3F"><h3>ordered-collection?</h3><div class="usage"><code>(ordered-collection? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like an ordered collection, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L156">view source</a></div></div><div class="public anchor" id="var-persistent-object.3F"><h3>persistent-object?</h3><div class="usage"><code>(persistent-object? x)</code><code>(persistent-object? x severity)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> is a persistent object.</p> -<p>Transient objects in ActivityPub are not required to have an <code>id</code> key, but persistent ones must have a key, and it must be an IRI (but normally a URI).</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L64">view source</a></div></div><div class="public anchor" id="var-unordered-collection.3F"><h3>unordered-collection?</h3><div class="usage"><code>(unordered-collection? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like an unordered collection, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L151">view source</a></div></div></div></body></html> \ No newline at end of file +<p>but in samples found in the wild they typically don’t.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L41">view source</a></div></div><div class="public anchor" id="var-ordered-collection-page.3F"><h3>ordered-collection-page?</h3><div class="usage"><code>(ordered-collection-page? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like a page in an ordered paged collection, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L167">view source</a></div></div><div class="public anchor" id="var-ordered-collection.3F"><h3>ordered-collection?</h3><div class="usage"><code>(ordered-collection? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like an ordered collection, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L157">view source</a></div></div><div class="public anchor" id="var-persistent-object.3F"><h3>persistent-object?</h3><div class="usage"><code>(persistent-object? x)</code><code>(persistent-object? x severity)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> is a persistent object.</p> +<p>Transient objects in ActivityPub are not required to have an <code>id</code> key, but persistent ones must have a key, and it must be an IRI (but normally a URI).</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L65">view source</a></div></div><div class="public anchor" id="var-unordered-collection.3F"><h3>unordered-collection?</h3><div class="usage"><code>(unordered-collection? x)</code></div><div class="doc"><div class="markdown"><p><code>true</code> iff <code>x</code> quacks like an unordered collection, else <code>false</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/quack/quack.clj#L152">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.scratch.parser.html b/docs/codox/dog-and-duck.scratch.parser.html index 1d60fba..da2de6c 100644 --- a/docs/codox/dog-and-duck.scratch.parser.html +++ b/docs/codox/dog-and-duck.scratch.parser.html @@ -1,3 +1,3 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.scratch.parser documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch current"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.scratch.parser.html#var-clean"><div class="inner"><span>clean</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.scratch.parser</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-clean"><h3>clean</h3><div class="usage"><code>(clean json)</code></div><div class="doc"><div class="markdown"><p>Take this <code>json</code> input, and return a sequence of ActivityPub objects represented by it.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/scratch/parser.clj#L24">view source</a></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8" /><title>dog-and-duck.scratch.parser documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch current"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.scratch.parser.html#var-clean"><div class="inner"><span>clean</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.scratch.parser</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-clean"><h3>clean</h3><div class="usage"><code>(clean json)</code></div><div class="doc"><div class="markdown"><p>Take this <code>json</code> input, and return a sequence of ActivityPub objects represented by it.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/scratch/parser.clj#L24">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.scratch.scratch.html b/docs/codox/dog-and-duck.scratch.scratch.html index 45ff4af..b993d57 100644 --- a/docs/codox/dog-and-duck.scratch.scratch.html +++ b/docs/codox/dog-and-duck.scratch.scratch.html @@ -1,3 +1,3 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.scratch.scratch documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3 current"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.scratch.scratch.html#var-account"><div class="inner"><span>account</span></div></a></li><li class="depth-1"><a href="dog-and-duck.scratch.scratch.html#var-account-handle"><div class="inner"><span>account-handle</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.scratch.scratch</h1><div class="doc"><div class="markdown"><p>Scratchpad where I try to understand how to do this stuff.</p></div></div><div class="public anchor" id="var-account"><h3>account</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/scratch/scratch.clj#L37">view source</a></div></div><div class="public anchor" id="var-account-handle"><h3>account-handle</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/scratch/scratch.clj#L28">view source</a></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8" /><title>dog-and-duck.scratch.scratch documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3 current"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.scratch.scratch.html#var-account-handle"><div class="inner"><span>account-handle</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.scratch.scratch</h1><div class="doc"><div class="markdown"><p>Scratchpad where I try to understand how to do this stuff.</p></div></div><div class="public anchor" id="var-account-handle"><h3>account-handle</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/scratch/scratch.clj#L28">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/dog-and-duck.utils.process.html b/docs/codox/dog-and-duck.utils.process.html index 4e8ae03..9a4c9f7 100644 --- a/docs/codox/dog-and-duck.utils.process.html +++ b/docs/codox/dog-and-duck.utils.process.html @@ -1,5 +1,5 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>dog-and-duck.utils.process documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3 current"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.utils.process.html#var-get-hostname"><div class="inner"><span>get-hostname</span></div></a></li><li class="depth-1"><a href="dog-and-duck.utils.process.html#var-get-pid"><div class="inner"><span>get-pid</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.utils.process</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-get-hostname"><h3>get-hostname</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>return the hostname of the current host.</p> +<html><head><meta charset="UTF-8" /><title>dog-and-duck.utils.process documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3 current"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="dog-and-duck.utils.process.html#var-get-hostname"><div class="inner"><span>get-hostname</span></div></a></li><li class="depth-1"><a href="dog-and-duck.utils.process.html#var-get-pid"><div class="inner"><span>get-pid</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">dog-and-duck.utils.process</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-get-hostname"><h3>get-hostname</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>return the hostname of the current host.</p> <p>Java’s methods for getting the hostname are quite startlingly slow, we do not want todo this repeatedly!</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/utils/process.clj#L45">view source</a></div></div><div class="public anchor" id="var-get-pid"><h3>get-pid</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Get the process id of the current process.</p> <p>OK, this is hacky as fuck, but I hope it works. The problem is that the way to get the process id has changed several times during the history of Java development, and the code for one version of Java won’t even compile in a different version.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/dog-and-duck/blob/master/src/dog_and_duck/utils/process.clj#L20">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/index.html b/docs/codox/index.html index 5c9c887..df3f44e 100644 --- a/docs/codox/index.html +++ b/docs/codox/index.html @@ -1,3 +1,3 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>Dog-and-duck 0.1.0-SNAPSHOT</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 current"><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="namespace-index" id="content"><h1><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></h1><h5 class="license">Released under the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html">GPL-2.0-or-later</a></h5><div class="doc"><p>A playground for hacking ActivityPub stuff.</p></div><h2>Installation</h2><p>To install, add the following dependency to your project or build file:</p><pre class="deps">[dog-and-duck "0.1.0-SNAPSHOT"]</pre><h2>Topics</h2><ul class="topics"><li><a href="Desiderata.html">Desiderata</a></li><li><a href="Using_ActivityPub.html">Using ActivityPub</a></li><li><a href="Validation_Faults.html">Validation Faults in ActivityPub documents</a></li><li><a href="intro.html">Introduction</a></li></ul><h2>Namespaces</h2><div class="namespace"><h3><a href="dog-and-duck.quack.picky.html">dog-and-duck.quack.picky</a></h3><div class="doc"><div class="markdown"><p>Fault-finder for ActivityPub documents. </p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.html#var-accept-required-properties">accept-required-properties</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-activity-faults">activity-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-activity-required-properties">activity-required-properties</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-activity-type-faults">activity-type-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-actor-faults">actor-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-base-activity-required-properties">base-activity-required-properties</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-collection-faults">collection-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-intransitive-activity-required-properties">intransitive-activity-required-properties</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-link-faults">link-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-persistent-object-faults">persistent-object-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-uri-or-fault">uri-or-fault</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.collections.html">dog-and-duck.quack.picky.collections</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.collections.html#var-collection-page-faults">collection-page-faults</a> </li><li> <a href="dog-and-duck.quack.picky.collections.html#var-paged-collection-faults">paged-collection-faults</a> </li><li> <a href="dog-and-duck.quack.picky.collections.html#var-simple-collection-faults">simple-collection-faults</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.constants.html">dog-and-duck.quack.picky.constants</a></h3><div class="doc"><div class="markdown"><p>Constants supporting the picky validator.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.constants.html#var-activitystreams-context-uri">activitystreams-context-uri</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-actor-types">actor-types</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-context-key">context-key</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-severity">severity</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-severity-filters">severity-filters</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-validation-fault-context-uri">validation-fault-context-uri</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-verb-types">verb-types</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.control-variables.html">dog-and-duck.quack.picky.control-variables</a></h3><div class="doc"><div class="markdown"><p>Control variables for the picky validator.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.control-variables.html#var-*reify-refs*">*reify-refs*</a> </li><li> <a href="dog-and-duck.quack.picky.control-variables.html#var-*reject-severity*">*reject-severity*</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.fault-messages.html">dog-and-duck.quack.picky.fault-messages</a></h3><div class="doc"><div class="markdown"><p>Narrative values for fault reports of specific types, used by the picky validator.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.fault-messages.html#var-messages">messages</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.required-properties.html">dog-and-duck.quack.picky.required-properties</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.utils.html">dog-and-duck.quack.picky.utils</a></h3><div class="doc"><div class="markdown"><p>Utility functions supporting the picky validator</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.utils.html#var-actor-type.3F">actor-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-any-or-faults">any-or-faults</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-coll-object-reference-or-fault">coll-object-reference-or-fault</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-concat-non-empty">concat-non-empty</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-cond-make-fault-object">cond-make-fault-object</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-context.3F">context?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-filter-severity">filter-severity</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-activity-type.3F">has-activity-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-actor-type.3F">has-actor-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-context.3F">has-context?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-type-or-fault">has-type-or-fault</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-type.3F">has-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-link-or-uri.3F">link-or-uri?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-make-fault-object">make-fault-object</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-nil-if-empty">nil-if-empty</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-object-faults">object-faults</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-object-or-uri.3F">object-or-uri?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-object-reference-or-faults">object-reference-or-faults</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-string-or-fault">string-or-fault</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-truthy.3F">truthy?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-verb-type.3F">verb-type?</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.quack.html">dog-and-duck.quack.quack</a></h3><div class="doc"><div class="markdown"><p>Validator for ActivityPub objects: if it walks like a duck, and it quacks like a duck…</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.quack.html#var-activity.3F">activity?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-actor-or-uri.3F">actor-or-uri?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-actor.3F">actor?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-collection-page.3F">collection-page?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-collection.3F">collection?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-link-or-uri.3F">link-or-uri?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-link.3F">link?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-object.3F">object?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-ordered-collection-page.3F">ordered-collection-page?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-ordered-collection.3F">ordered-collection?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-persistent-object.3F">persistent-object?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-unordered-collection.3F">unordered-collection?</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.scratch.core.html">dog-and-duck.scratch.core</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.scratch.core.html#var-foo">foo</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.scratch.parser.html">dog-and-duck.scratch.parser</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.scratch.parser.html#var-clean">clean</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.scratch.scratch.html">dog-and-duck.scratch.scratch</a></h3><div class="doc"><div class="markdown"><p>Scratchpad where I try to understand how to do this stuff.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.scratch.scratch.html#var-account">account</a> </li><li> <a href="dog-and-duck.scratch.scratch.html#var-account-handle">account-handle</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.utils.process.html">dog-and-duck.utils.process</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.utils.process.html#var-get-hostname">get-hostname</a> </li><li> <a href="dog-and-duck.utils.process.html#var-get-pid">get-pid</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8" /><title>Dog-and-duck 0.1.0</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 current"><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="namespace-index" id="content"><h1><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></h1><h5 class="license">Released under the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html">GPL-2.0-or-later</a></h5><div class="doc"><p>A playground for hacking ActivityPub stuff.</p></div><h2>Installation</h2><p>To install, add the following dependency to your project or build file:</p><pre class="deps">[dog-and-duck "0.1.0"]</pre><h2>Topics</h2><ul class="topics"><li><a href="Desiderata.html">Desiderata</a></li><li><a href="Using_ActivityPub.html">Using ActivityPub</a></li><li><a href="Validation_Faults.html">Validation Faults in ActivityPub documents</a></li><li><a href="intro.html">The Old Dog and Duck</a></li></ul><h2>Namespaces</h2><div class="namespace"><h3><a href="dog-and-duck.quack.cli.html">dog-and-duck.quack.cli</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.cli.html#var--main">-main</a> </li><li> <a href="dog-and-duck.quack.cli.html#var-cli-options">cli-options</a> </li><li> <a href="dog-and-duck.quack.cli.html#var-html-fault-row">html-fault-row</a> </li><li> <a href="dog-and-duck.quack.cli.html#var-html-header-row">html-header-row</a> </li><li> <a href="dog-and-duck.quack.cli.html#var-output">output</a> </li><li> <a href="dog-and-duck.quack.cli.html#var-output-csv">output-csv</a> </li><li> <a href="dog-and-duck.quack.cli.html#var-output-html">output-html</a> </li><li> <a href="dog-and-duck.quack.cli.html#var-stylesheet-url">stylesheet-url</a> </li><li> <a href="dog-and-duck.quack.cli.html#var-validate">validate</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.html">dog-and-duck.quack.picky</a></h3><div class="doc"><div class="markdown"><p>Fault-finder for ActivityPub documents. </p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.html#var-accept-required-properties">accept-required-properties</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-activity-faults">activity-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-activity-required-properties">activity-required-properties</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-activity-type-faults">activity-type-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-actor-faults">actor-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-base-activity-required-properties">base-activity-required-properties</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-collection-faults">collection-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-intransitive-activity-required-properties">intransitive-activity-required-properties</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-link-faults">link-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-persistent-object-faults">persistent-object-faults</a> </li><li> <a href="dog-and-duck.quack.picky.html#var-uri-or-fault">uri-or-fault</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.collections.html">dog-and-duck.quack.picky.collections</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.collections.html#var-collection-page-faults">collection-page-faults</a> </li><li> <a href="dog-and-duck.quack.picky.collections.html#var-paged-collection-faults">paged-collection-faults</a> </li><li> <a href="dog-and-duck.quack.picky.collections.html#var-simple-collection-faults">simple-collection-faults</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.constants.html">dog-and-duck.quack.picky.constants</a></h3><div class="doc"><div class="markdown"><p>Constants supporting the picky validator.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.constants.html#var-activity-types">activity-types</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-activitystreams-context-uri">activitystreams-context-uri</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-actor-types">actor-types</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-context-key">context-key</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-implicit-noun-types">implicit-noun-types</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-noun-types">noun-types</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-re-rfc5646">re-rfc5646</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-severity">severity</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-severity-filters">severity-filters</a> </li><li> <a href="dog-and-duck.quack.picky.constants.html#var-validation-fault-context-uri">validation-fault-context-uri</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.control-variables.html">dog-and-duck.quack.picky.control-variables</a></h3><div class="doc"><div class="markdown"><p>Control variables for the picky validator.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.control-variables.html#var-*reify-refs*">*reify-refs*</a> </li><li> <a href="dog-and-duck.quack.picky.control-variables.html#var-*reject-severity*">*reject-severity*</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.distribution.html">dog-and-duck.quack.picky.distribution</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.distribution.html#var-distribution">distribution</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.objects.html">dog-and-duck.quack.picky.objects</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.objects.html#var-check-property">check-property</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-check-property-required">check-property-required</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-check-property-valid">check-property-valid</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-coll-object-reference-or-fault">coll-object-reference-or-fault</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-maybe-reify">maybe-reify</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-maybe-reify-or-faults">maybe-reify-or-faults</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-object-expected-properties">object-expected-properties</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-object-faults">object-faults</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-object-reference-or-faults">object-reference-or-faults</a> </li><li> <a href="dog-and-duck.quack.picky.objects.html#var-properties-faults">properties-faults</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.scratch.html">dog-and-duck.quack.picky.scratch</a></h3><div class="doc"><div class="markdown"><p>Development scratchpad</p></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.time.html">dog-and-duck.quack.picky.time</a></h3><div class="doc"><div class="markdown"><p>Time, gentleman, please! Recognising and validating date time values.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.time.html#var-date-time-property-or-fault">date-time-property-or-fault</a> </li><li> <a href="dog-and-duck.quack.picky.time.html#var-xsd-date-time.3F">xsd-date-time?</a> </li><li> <a href="dog-and-duck.quack.picky.time.html#var-xsd-duration.3F">xsd-duration?</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.picky.utils.html">dog-and-duck.quack.picky.utils</a></h3><div class="doc"><div class="markdown"><p>Utility functions supporting the picky validator</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.picky.utils.html#var-activity-type.3F">activity-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-actor-type.3F">actor-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-any-or-faults">any-or-faults</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-concat-non-empty">concat-non-empty</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-cond-make-fault-object">cond-make-fault-object</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-context.3F">context?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-filter-severity">filter-severity</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-activity-type.3F">has-activity-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-actor-type.3F">has-actor-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-context.3F">has-context?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-type-or-fault">has-type-or-fault</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-has-type.3F">has-type?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-link-or-uri.3F">link-or-uri?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-make-fault-object">make-fault-object</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-nil-if-empty">nil-if-empty</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-object-or-uri.3F">object-or-uri?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-string-or-fault">string-or-fault</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-truthy.3F">truthy?</a> </li><li> <a href="dog-and-duck.quack.picky.utils.html#var-xsd-non-negative-integer.3F">xsd-non-negative-integer?</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.quack.quack.html">dog-and-duck.quack.quack</a></h3><div class="doc"><div class="markdown"><p>Validator for ActivityPub objects: if it walks like a duck, and it quacks like a duck…</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.quack.quack.html#var-activity.3F">activity?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-actor-or-uri.3F">actor-or-uri?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-actor.3F">actor?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-collection-page.3F">collection-page?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-collection.3F">collection?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-link-or-uri.3F">link-or-uri?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-link.3F">link?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-object.3F">object?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-ordered-collection-page.3F">ordered-collection-page?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-ordered-collection.3F">ordered-collection?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-persistent-object.3F">persistent-object?</a> </li><li> <a href="dog-and-duck.quack.quack.html#var-unordered-collection.3F">unordered-collection?</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.scratch.parser.html">dog-and-duck.scratch.parser</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.scratch.parser.html#var-clean">clean</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.scratch.scratch.html">dog-and-duck.scratch.scratch</a></h3><div class="doc"><div class="markdown"><p>Scratchpad where I try to understand how to do this stuff.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.scratch.scratch.html#var-account-handle">account-handle</a> </li></ul></div></div><div class="namespace"><h3><a href="dog-and-duck.utils.process.html">dog-and-duck.utils.process</a></h3><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="dog-and-duck.utils.process.html#var-get-hostname">get-hostname</a> </li><li> <a href="dog-and-duck.utils.process.html#var-get-pid">get-pid</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/docs/codox/intro.html b/docs/codox/intro.html index b19fbd1..7ad3c51 100644 --- a/docs/codox/intro.html +++ b/docs/codox/intro.html @@ -1,16 +1,41 @@ <!DOCTYPE html PUBLIC "" ""> -<html><head><meta charset="UTF-8" /><title>Introduction</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 current"><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.fault-messages.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fault-messages</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.required-properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>required-properties</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#introduction" name="introduction"></a>Introduction</h1> -<h2><a href="#the-old-dog-and-duck" name="the-old-dog-and-duck"></a>The Old Dog and Duck</h2> +<html><head><meta charset="UTF-8" /><title>The Old Dog and Duck</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Desiderata.html"><div class="inner"><span>Desiderata</span></div></a></li><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 current"><a href="intro.html"><div class="inner"><span>The Old Dog and Duck</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.cli.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cli</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.collections.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>collections</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.control-variables.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>control-variables</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.distribution.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distribution</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.objects.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>objects</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-4 branch"><a href="dog-and-duck.quack.picky.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="dog-and-duck.quack.picky.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#the-old-dog-and-duck" name="the-old-dog-and-duck"></a>The Old Dog and Duck</h1> <p>A Clojure library designed to implement the ActivityPub protocol, obviously.</p> -<p><img src="../images/dog-and-duck-beverley.jpg" alt="The Dog and Duck, Derby" /></p> +<p><img src="https://simon-brooke.github.io/dog-and-duck/images/Dog_and_Duck_tavern.jpg" alt="The Dog and Duck, St George’s Fields, London, 1647" /></p> +<h2><a href="#introduction" name="introduction"></a>Introduction</h2> <p>The Old Dog and Duck is clearly a pub, and it’s a pub related to an activity; to whit, hunting ducks with dogs. Yes, of course one could also hunt dogs with ducks, but in practice that doesn’t work so well. The point isn’t whether or not I approve of hunting ducks with dogs (or vice versa); to be clear, I don’t. The point is that it’s a pub related to an activity, and is therefore an <a href="https://www.w3.org/TR/activitypub/">ActivityPub</a>.</p> <p>Are we clear?</p> <p>Good.</p> <p>Let us proceed.</p> <p><strong>The Old Dog and Duck</strong> is intended to be a set of libraries to enable people to build stuff which interacts with ActivityPub. It isn’t intended to be a replacement for, or clone of, Mastodon. I do think I might implement my own ActivityPub server on top of The Old Dog and Duck, that specifically might allow for user-pluggable feed-sorting algorithms and with my own user interface/user experience take, but that project is not (yet, at any rate) this project.</p> <h2><a href="#status" name="status"></a>Status</h2> -<p>This is a long way pre-alpha. Everything will change. Feel free to play, but do so at your own risk. Contributions welcome.</p> +<p>This is still pre-alpha. Everything will change. There’s still a lot of code that was written when I was feeling my way around the problems, which is redundant and should now be pruned. Feel free to play, but do so at your own risk. Contributions welcome.</p> +<h2><a href="#usage" name="usage"></a>Usage</h2> +<p>At present, only the duck-typing validator works. To play with it, build the uberjar (or download it from github) and run it with</p> +<pre><code>java -jar target/dog-and-duck-0.1.0-standalone.jar -i resources/activitystreams-test-documents/vocabulary-ex10-jsonld.json -f html -o report.html -s info +</code></pre> +<p>The full range of command-line switches is as follows:</p> +<pre><code> -i, --input SOURCE standard input The file or URL to validate + -o, --output DEST standard output The file to write to, defaults to standard out + -f, --format FORMAT :edn The format to output, one of `edn` `csv` `html` + -l, --language LANG en-GB The ISO 639-1 code for the language to output + -s, --severity LEVEL :info The minimum severity of faults to report + -h, --help Print this message and exit +</code></pre> +<p>Note, though, that internationalisation files for languages other than British English have not yet been written, and that one is not complete.</p> +<p>The following severity levels are understood:</p> +<ol> + <li><code>info</code> things which are not actuallys fault, but issues noted during validation;</li> + <li><code>minor</code> things which I consider to be faults, but which don’t actually breach the spec;</li> + <li><code>should</code> instances where the spec says something <em>SHOULD</em> be done, which isn’t;</li> + <li><code>must</code> instances where the spec says something <em>MUST</em> be done, which isn’t;</li> + <li><code>critical</code> instances where I believe the fault means that the object cannot be meaningfully processed.</li> +</ol> +<p>Note that it is almost certain that in some places I have misinterpreted the spec. Of all 205 documents in the <a href="https://github.com/w3c-social/activitystreams-test-documents">activitystreams-test-documents repository</a>, not a single one passes validation, and that must be wrong.</p> +<p>Nevertheless I think that this is a basis on which a useful validator can be built. Feedback and contributions welcome.</p> +<h2><a href="#documentation" name="documentation"></a>Documentation</h2> +<p>Full documentation is <a href="https://simon-brooke.github.io/dog-and-duck/">here</a>.</p> <h2><a href="#architecture" name="architecture"></a>Architecture</h2> <p>There are a number of separate concerns required to implement ActivityPub. They include</p> <ol> @@ -48,11 +73,25 @@ <h3><a href="#quack" name="quack"></a>Quack</h3> <p>Duck-typing for ActivityStreams objects.</p> <p>As of version 0.1.0, this is substantially the only part that is yet at all useful, and it is still a long way from finished or robust.</p> +<h3><a href="#bouncer" name="bouncer"></a>Bouncer</h3> +<p>Enhanced tools for moderators (I have as yet absolutely no idea what this looks like).</p> <h3><a href="#scratch" name="scratch"></a>Scratch</h3> <p>What the dog does when bored. Essentially, a place where I can learn how to make this stuff work, but perhaps eventually an ActivityPub server in its own right.</p> -<h2><a href="#usage" name="usage"></a>Usage</h2> -<p>At present, only the duck-typing functions work. To play with them, use</p> -<pre><code class="clojure">(require '[dog-and-duck.quack.quack :as q]) +<h2><a href="#building" name="building"></a>Building</h2> +<h3><a href="#clj-activitypub" name="clj-activitypub"></a>clj-activitypub</h3> +<p><strong>NOTE THAT</strong> <code>dog-and-duck</code> depends on Jahfer’s <code>clj-activitypub</code>, which is also currently not yet released and under rapid development and consequently currently <em>very</em> unstable. For this reason it’s probably best to clone <a href="https://github.com/simon-brooke/clj-activitypub">my fork</a> rather than <a href="https://github.com/jahfer/clj-activitypub">the original</a>, because that way you are less likely to encounter version incompatibilities.</p> +<p><code>clj-activitypub</code> is configured to build with <a href="https://clojure.org/guides/tools_build">tools.bui;d</a>. To prepare <code>clj-activitypub</code> before building <code>dog-and-duck</code>, do</p> +<pre><code class="bash">$ git clone git@github.com:simon-brooke/clj-activitypub.git +$ cd clj-activitypub/ +$ clj -T:build jar +$ clj -T:build install +</code></pre> +<p>I shall keep <code>dog-and-duck</code> and my fork of <code>clj-activitypub</code> in sync at least until Jahfer makes a production release of his project to <a href="">Clojars</a>.</p> +<h3><a href="#leiningen" name="leiningen"></a>Leiningen</h3> +<p><code>dog-and-duck</code> itself is still set up to build with <a href="https://leiningen.org/">Leiningen</a>. Yes, I know that’s not what the cool kids are using any more but hey, I’m an old man, leave me be. To get <code>dog-and-duck</code> up to a point where you can start to play,</p> +<pre><code class="bash">$ git clone git@github.com:simon-brooke/dog-and-duck.git +$ cd dog-and-duck +$ lein repl </code></pre> <h2><a href="#testing" name="testing"></a>Testing</h2> <p>Prior to testing, you should clone <a href="https://github.com/w3c-social/activitystreams-test-documents">activitystreams-test-documents</a> into the <code>resources</code> directory. You can then test with</p> diff --git a/src/dog_and_duck/scratch/scratch.clj b/src/dog_and_duck/scratch/scratch.clj index 54aee05..abb6f90 100644 --- a/src/dog_and_duck/scratch/scratch.clj +++ b/src/dog_and_duck/scratch/scratch.clj @@ -56,11 +56,11 @@ ;; how we make a public/private key pair. But this key pair is not the one ;; known to mastodon.scot as my key pair, so that doesn't get us very far... ;; I think. -(let [rsa (pgp-gen/rsa-keypair-generator 2048) - kp (pgp-gen/generate-keypair rsa :rsa-general) - public (-> kp .getPublicKey .getEncoded) - private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)] - (println (str "Public key: " public)) - (println (str "Private key: " private)) - ) +;; (let [rsa (pgp-gen/rsa-keypair-generator 2048) +;; kp (pgp-gen/generate-keypair rsa :rsa-general) +;; public (-> kp .getPublicKey .getEncoded) +;; private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)] +;; (println (str "Public key: " public)) +;; (println (str "Private key: " private)) +;; )