-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: use schema:ItemList consistently for regen:approvedMethodologies #40
Conversation
27d6841
to
15865d7
Compare
In addition to needing some reviews, we are waiting to merge this because it will require updating credit classes on-chain. |
} | ||
], | ||
"regen:approvedMethodologiesURL": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed together as second option, what about using ItemList
instead? Then we can define some schema:url
directly on it instead of creating our ownregen:approvedMethodologiesURL
I believe it'd look cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me, i'll push a commit making that change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing to note is that we will need to make updates in the bridge service for this change, since it changes the format of the regen:approvedMethodologies
field. toucan projects use that field and so we'll need to update that there.
updates to the bridge service would be located around here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I can create an issue to address that on the bridge side once this is merged, we'll need to update the front-end too since it assumesregen:approvedMethodologies
to be a @list for now (which is why the approved methodologies are not displayed on the credit class page cc/ @clevinson ) and set up txs to update credit classes cc/ @S4mmyb
@wgwz could you update the PR title, now that we're going for |
ebe7e2e
to
4b78ace
Compare
4b78ace
to
a797aab
Compare
@@ -42,332 +36,285 @@ | |||
"Carbon Removals" | |||
], | |||
"regen:approvedMethodologies": { | |||
"@type": "schema:BreadcrumbList", | |||
"@type": "schema:ItemList", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blushi just wanted to point the adjustments to C03 credit class. it's just to conform the approvedMethodologies
to schema:ItemList
.
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
] ; | ||
sh:property regen:ApprovedMethodologiesPropertyShape ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blushi some more adjustments for the C03 credit class here. we're using the same property shape for all instances of regen:approvedMethodologies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, pre-approving, just a few comments
# TODO: eventually this should set on most of our shapes | ||
# this will help us catch missing fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we create an issue to address that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the blocker on adding this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing really blocking it, it probably would just involve a little bit of clean-up and i'd prefer to handle it separately from this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a couple questions.
"schema:url": { | ||
"@type": "schema:URL" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected value of schema:url
is URL
. I don't think need this in the same way we don't need schema:name
and schema:description
with type Text
in the context. Is there another reason for including this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
schema:name
and schema:description
are different.
we used to use schema:Text
for fields like that.
but then we decided to move away from schema:Text
.
when we were using schema:Text
we had to be explicit about those types.
just like we need to be explicit about the type here.
the reason we no longer need a type specified for schema:name
and schema:description
is that we agreed they can be xsd:string
types instead.
when JSON-LD documents are parsed, JSON string values are implicitly assumed to be of the xsd:string
type.
because we do want "schema:url" to be interpreted as a URL type and not an xsd:string
, we need to add that type info in the context.
otherwise schema:url
would also be implicitly assumed to be an xsd:string
value
# TODO: eventually this should set on most of our shapes | ||
# this will help us catch missing fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the blocker on adding this?
Description
Closes: #33
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...