Skip to content

Commit 81031bf

Browse files
signekblwjohnst86
andauthored
docs: 🐛 don't execute Extensions example in docs (#162)
# Description The website build fails bc this class doesn't exist yet. I've added a comment so we remember to add the `{}` again when the class is implemented. Needs a quick review. ## Checklist - [X] Ran `just run-all` --------- Co-authored-by: Luke W. Johnston <[email protected]>
1 parent e2d64ea commit 81031bf

File tree

2 files changed

+157
-147
lines changed

2 files changed

+157
-147
lines changed

docs/design/interface.qmd

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -167,30 +167,30 @@ class Extensions:
167167
168168
Examples:
169169
170-
```{python}
171-
#| eval: false
172-
import check_datapackage as cdp
173-
174-
extensions = cdp.Extensions(
175-
required_checks=[
176-
cdp.RequiredCheck(
177-
jsonpath="$.description",
178-
message="Data Packages must include a description."
179-
),
180-
cdp.RequiredCheck(
181-
jsonpath="$.contributors[*].email",
182-
message="All contributors must have an email address."
183-
)
184-
],
185-
custom_checks=[cdp.CustomCheck(
186-
type="only-mit",
187-
jsonpath="$.licenses[*].name",
188-
message="Data Packages may only be licensed under MIT.",
189-
check=lambda license_name: license_name == "mit",
190-
)]
191-
)
192-
# check(properties, config=cdp.Config(extensions=extensions))
193-
```
170+
```python
171+
# TODO: Add curly brackets around python on the line above when the class has been implemented.
172+
import check_datapackage as cdp
173+
174+
extensions = cdp.Extensions(
175+
required_checks=[
176+
cdp.RequiredCheck(
177+
jsonpath="$.description",
178+
message="Data Packages must include a description."
179+
),
180+
cdp.RequiredCheck(
181+
jsonpath="$.contributors[*].email",
182+
message="All contributors must have an email address."
183+
)
184+
],
185+
custom_checks=[cdp.CustomCheck(
186+
type="only-mit",
187+
jsonpath="$.licenses[*].name",
188+
message="Data Packages may only be licensed under MIT.",
189+
check=lambda license_name: license_name == "mit",
190+
)]
191+
)
192+
# check(properties, config=cdp.Config(extensions=extensions))
193+
```
194194
"""
195195
required_checks : list[RequiredCheck] = field(default_factory=list)
196196
custom_checks : list[CustomCheck] = field(default_factory=list)

0 commit comments

Comments
 (0)