Skip to content

Commit 2bde577

Browse files
authored
Merge pull request #154 from hypercerts-org/refactor/move-evaluation-attachment-to-context
2 parents e657166 + 5a6e619 commit 2bde577

5 files changed

Lines changed: 82 additions & 77 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hypercerts-org/lexicon": minor
3+
---
4+
5+
Move evaluation and attachment lexicons to org.hypercerts.context namespace.

ERD.puml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dataclass activity <<largeBold>> #B4E5D0 {
6969
!endif
7070
}
7171

72-
' org.hypercerts.claim.attachment
72+
' org.hypercerts.context.attachment
7373
dataclass attachment {
7474
!if (SHOW_FIELDS == "true")
7575
subjects[]?
@@ -98,7 +98,7 @@ dataclass measurement {
9898
!endif
9999
}
100100

101-
' org.hypercerts.claim.evaluation
101+
' org.hypercerts.context.evaluation
102102
dataclass evaluation {
103103
!if (SHOW_FIELDS == "true")
104104
subject?

SCHEMAS.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -79,29 +79,6 @@ Hypercerts-specific lexicons for tracking impact work and claims.
7979

8080
---
8181

82-
### `org.hypercerts.claim.attachment`
83-
84-
**Description:** An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation).
85-
86-
**Key:** `tid`
87-
88-
#### Properties
89-
90-
| Property | Type | Required | Description | Comments |
91-
| ------------------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
92-
| `subjects` | `ref` || References to the subject(s) the attachment is connected to—this may be an activity claim, outcome claim, measurement, evaluation, or even another attachment. This is optional as the attachment can exist before the claim is recorded. | maxLength: 100 |
93-
| `contentType` | `string` || The type of attachment, e.g. report, audit, evidence, testimonial, methodology, etc. | maxLength: 64 |
94-
| `content` | `union` || The files, documents, or external references included in this attachment record. | maxLength: 100 |
95-
| `title` | `string` || Display title for this attachment (e.g. 'Impact Assessment Report', 'Audit Findings') | maxLength: 256 |
96-
| `shortDescription` | `string` || Short summary of this attachment, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | maxLength: 3000, maxGraphemes: 300 |
97-
| `shortDescriptionFacets` | `ref` || Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | |
98-
| `description` | `string` || Optional longer description of this attachment, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | maxLength: 30000, maxGraphemes: 3000 |
99-
| `descriptionFacets` | `ref` || Rich text annotations for `description` (mentions, URLs, hashtags, etc). | |
100-
| `location` | `ref` || A strong reference to the location where this attachment's subject matter occurred. The record referenced must conform with the lexicon app.certified.location. | |
101-
| `createdAt` | `string` || Client-declared timestamp when this record was originally created. | |
102-
103-
---
104-
10582
### `org.hypercerts.claim.collection`
10683

10784
**Description:** A collection/group of items (activities and/or other collections). Collections support recursive nesting.
@@ -168,37 +145,6 @@ Hypercerts-specific lexicons for tracking impact work and claims.
168145

169146
---
170147

171-
### `org.hypercerts.claim.evaluation`
172-
173-
**Description:** An evaluation of a hypercert record (e.g. an activity and its impact).
174-
175-
**Key:** `tid`
176-
177-
#### Properties
178-
179-
| Property | Type | Required | Description | Comments |
180-
| -------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
181-
| `subject` | `ref` || A strong reference to what is being evaluated (e.g. activity, measurement, contribution, etc.) | |
182-
| `evaluators` | `ref` || DIDs of the evaluators | maxLength: 1000 |
183-
| `content` | `union` || Evaluation data (URIs or blobs) containing detailed reports or methodology | maxLength: 100 |
184-
| `measurements` | `ref` || Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement | maxLength: 100 |
185-
| `summary` | `string` || Brief evaluation summary | maxLength: 5000, maxGraphemes: 1000 |
186-
| `score` | `ref` || Overall score for an evaluation on a numeric scale. | |
187-
| `location` | `ref` || An optional reference for georeferenced evaluations. The record referenced must conform with the lexicon app.certified.location. | |
188-
| `createdAt` | `string` || Client-declared timestamp when this record was originally created | |
189-
190-
#### Defs
191-
192-
##### `org.hypercerts.claim.evaluation#score`
193-
194-
| Property | Type | Required | Description |
195-
| -------- | --------- | -------- | -------------------------------------------- |
196-
| `min` | `integer` || Minimum value of the scale, e.g. 0 or 1. |
197-
| `max` | `integer` || Maximum value of the scale, e.g. 5 or 10. |
198-
| `value` | `integer` || Score within the inclusive range [min, max]. |
199-
200-
---
201-
202148
### `org.hypercerts.claim.measurement`
203149

204150
**Description:** Measurement data related to a hypercert record (e.g. an activity and its impact).
@@ -244,6 +190,60 @@ Hypercerts-specific lexicons for tracking impact work and claims.
244190

245191
---
246192

193+
### `org.hypercerts.context.attachment`
194+
195+
**Description:** An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation).
196+
197+
**Key:** `tid`
198+
199+
#### Properties
200+
201+
| Property | Type | Required | Description | Comments |
202+
| ------------------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
203+
| `subjects` | `ref` || References to the subject(s) the attachment is connected to—this may be an activity claim, outcome claim, measurement, evaluation, or even another attachment. This is optional as the attachment can exist before the claim is recorded. | maxLength: 100 |
204+
| `contentType` | `string` || The type of attachment, e.g. report, audit, evidence, testimonial, methodology, etc. | maxLength: 64 |
205+
| `content` | `union` || The files, documents, or external references included in this attachment record. | maxLength: 100 |
206+
| `title` | `string` || Display title for this attachment (e.g. 'Impact Assessment Report', 'Audit Findings') | maxLength: 256 |
207+
| `shortDescription` | `string` || Short summary of this attachment, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | maxLength: 3000, maxGraphemes: 300 |
208+
| `shortDescriptionFacets` | `ref` || Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | |
209+
| `description` | `string` || Optional longer description of this attachment, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | maxLength: 30000, maxGraphemes: 3000 |
210+
| `descriptionFacets` | `ref` || Rich text annotations for `description` (mentions, URLs, hashtags, etc). | |
211+
| `location` | `ref` || A strong reference to the location where this attachment's subject matter occurred. The record referenced must conform with the lexicon app.certified.location. | |
212+
| `createdAt` | `string` || Client-declared timestamp when this record was originally created. | |
213+
214+
---
215+
216+
### `org.hypercerts.context.evaluation`
217+
218+
**Description:** An evaluation of a hypercert record (e.g. an activity and its impact).
219+
220+
**Key:** `tid`
221+
222+
#### Properties
223+
224+
| Property | Type | Required | Description | Comments |
225+
| -------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
226+
| `subject` | `ref` || A strong reference to what is being evaluated (e.g. activity, measurement, contribution, etc.) | |
227+
| `evaluators` | `ref` || DIDs of the evaluators | maxLength: 1000 |
228+
| `content` | `union` || Evaluation data (URIs or blobs) containing detailed reports or methodology | maxLength: 100 |
229+
| `measurements` | `ref` || Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement | maxLength: 100 |
230+
| `summary` | `string` || Brief evaluation summary | maxLength: 5000, maxGraphemes: 1000 |
231+
| `score` | `ref` || Overall score for an evaluation on a numeric scale. | |
232+
| `location` | `ref` || An optional reference for georeferenced evaluations. The record referenced must conform with the lexicon app.certified.location. | |
233+
| `createdAt` | `string` || Client-declared timestamp when this record was originally created | |
234+
235+
#### Defs
236+
237+
##### `org.hypercerts.context.evaluation#score`
238+
239+
| Property | Type | Required | Description |
240+
| -------- | --------- | -------- | -------------------------------------------- |
241+
| `min` | `integer` || Minimum value of the scale, e.g. 0 or 1. |
242+
| `max` | `integer` || Maximum value of the scale, e.g. 5 or 10. |
243+
| `value` | `integer` || Score within the inclusive range [min, max]. |
244+
245+
---
246+
247247
### `org.hypercerts.funding.receipt`
248248

249249
**Description:** Records a funding receipt for a payment from one user to another user. It may be recorded by the recipient, by the sender, or by a third party. The sender may remain anonymous.

lexicons/org/hypercerts/claim/attachment.json renamed to lexicons/org/hypercerts/context/attachment.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lexicon": 1,
3-
"id": "org.hypercerts.claim.attachment",
3+
"id": "org.hypercerts.context.attachment",
44
"defs": {
55
"main": {
66
"type": "record",

lexicons/org/hypercerts/claim/evaluation.json renamed to lexicons/org/hypercerts/context/evaluation.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
11
{
22
"lexicon": 1,
3-
"id": "org.hypercerts.claim.evaluation",
3+
"id": "org.hypercerts.context.evaluation",
44
"defs": {
5-
"score": {
6-
"type": "object",
7-
"description": "Overall score for an evaluation on a numeric scale.",
8-
"required": ["min", "max", "value"],
9-
"properties": {
10-
"min": {
11-
"type": "integer",
12-
"description": "Minimum value of the scale, e.g. 0 or 1."
13-
},
14-
"max": {
15-
"type": "integer",
16-
"description": "Maximum value of the scale, e.g. 5 or 10."
17-
},
18-
"value": {
19-
"type": "integer",
20-
"description": "Score within the inclusive range [min, max]."
21-
}
22-
}
23-
},
245
"main": {
256
"type": "record",
267
"description": "An evaluation of a hypercert record (e.g. an activity and its impact).",
@@ -87,6 +68,25 @@
8768
}
8869
}
8970
}
71+
},
72+
"score": {
73+
"type": "object",
74+
"description": "Overall score for an evaluation on a numeric scale.",
75+
"required": ["min", "max", "value"],
76+
"properties": {
77+
"min": {
78+
"type": "integer",
79+
"description": "Minimum value of the scale, e.g. 0 or 1."
80+
},
81+
"max": {
82+
"type": "integer",
83+
"description": "Maximum value of the scale, e.g. 5 or 10."
84+
},
85+
"value": {
86+
"type": "integer",
87+
"description": "Score within the inclusive range [min, max]."
88+
}
89+
}
9090
}
9191
}
9292
}

0 commit comments

Comments
 (0)