Skip to content

Commit 24a0b29

Browse files
docs: ✏️ simple edits during review of design docs (#255)
# Description Did a small review and make a few minor fixes. Needs a quick review. ## Checklist - [x] Formatted Markdown - [x] Ran `just run-all` --------- Co-authored-by: martonvago <57952344+martonvago@users.noreply.github.com>
1 parent 255f2b1 commit 24a0b29

File tree

3 files changed

+28
-34
lines changed

3 files changed

+28
-34
lines changed

docs/design/architecture.qmd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ whole, see the [Seedcase Design](https://design.seedcase-project.org)
88
documentation.
99

1010
This document outlines the architecture of `check-datapackage` mostly to
11-
ensure the team shares a common understanding before implementation, but
11+
ensure the team shares a common understanding about the implementation, but
1212
also to communicate the design to anyone else interested in the internal
1313
workings of the package.
1414

@@ -57,7 +57,7 @@ used throughout the package can be found in the tables below.
5757

5858
: Actions that `check-datapackage` can perform.
5959

60-
### "Why "check" (and not "validate" or "verify")?
60+
### Why "check" and not "validate" or "verify"?
6161

6262
If you have ever searched for tools that check something against a
6363
specification, you'll often see the word "validate". You might also
@@ -197,14 +197,15 @@ do not include a component/code diagram for it at this time.
197197
```{mermaid}
198198
%%| label: fig-c4-component
199199
%%| fig-cap: "C4 component diagram showing the parts of the Python package and their connections."
200+
%%| column: page-right
200201
flowchart LR
201202
202203
subgraph python_package["Core Python Package"]
203204
204205
subgraph config_file["Configuration file"]
205206
config("Config<br>[class]")
206207
exclusion("Exclusion<br>[class]")
207-
extension("Extension<br>[class]")
208+
extension("Extensions<br>[class]")
208209
end
209210
210211
read_config["read_config()<br>[function]"]
@@ -216,11 +217,11 @@ flowchart LR
216217
extension --"Defines additional checks"--> config
217218
config_file -. "Reads configuration<br>from file" .-> read_config
218219
219-
read_json --"Provides properties as dict"--> check
220+
read_json --"Provides properties<br>as dict"--> check
220221
read_config -. "Adds check<br>configurations" .-> check
221222
config --"Adds check<br>configurations"--> check
222223
223-
check --"Passes found issues<br>to get non-technical<br>explanation"--> explain
224+
check --"Passes issues to<br>give more helpful<br>explanation"--> explain
224225
end
225226
226227
dp_standard("Data Package<br>[standard]")

docs/design/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The purpose of these design documents is to describe the design of
66
`check-datapackage` in enough detail to guide a sustainable
77
implementation (i.e., maintainable in the long term) and to ensure that
88
the team has a shared understanding of the package's scope and
9-
architecture before starting the development.
9+
architecture.
1010

1111
`check-datapackage`'s design builds off of our overall Seedcase [design
1212
principles and patterns](https://design.seedcase-project.org/), and

docs/design/interface.qmd

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ title: "Interface"
55
This section of the documentation focuses on the design of the interface
66
and how it is implemented as Python code.
77

8-
::: callout-note
98
We use symbols to indicate parts of the design that are actively being
109
worked on, done, or planned (see table below). For work that is planned
1110
or is in progress, we include the function signatures and docstrings to
@@ -22,7 +21,6 @@ below.
2221

2322
: A table showing the symbols used to indicate the status of interface
2423
components, along with their descriptions.
25-
:::
2624

2725
## Inputs
2826

@@ -60,13 +58,14 @@ CLI or if it could be used some way as Python code. I didn't include it
6058
for now though.
6159
:::
6260

63-
### {{< var wip >}} `check()`
61+
### {{< var done >}} `check()`
6462

6563
This is the main function of this package, which will check a Data
6664
Package properties against the Data Package standard, as well as include
6765
any custom exclusions or custom checks listed in the configuration.
6866

69-
See the help documentation with `help(check)` for more details.
67+
See the help documentation with
68+
[`help(check)`](/docs/reference/check.qmd) for more details.
7069

7170
The `Config` class is described below. By default, `check()` does not
7271
result in an error when issues are found, but errors can be triggered by
@@ -84,19 +83,8 @@ user-friendly. It's important to have this output to provide structured
8483
information about the issues, but we also want to provide a way to
8584
explain these issues in a more pleasant and ergonomic way.
8685

87-
``` python
88-
def explain(issues: list[Issue]) -> list[str]:
89-
"""Explain a list of issues in a user-friendly way.
90-
91-
Args:
92-
issues: A list of `Issue` objects representing issues found while
93-
checking a Data Package properties.
94-
95-
Returns:
96-
A list of user-friendly, human-readable messages
97-
explaining each issue.
98-
"""
99-
```
86+
See the help documentation with
87+
[`help(explain)`](/docs/reference/explain.qmd) for more details.
10088

10189
### {{< var done >}} `read_json()`
10290

@@ -134,15 +122,17 @@ be useful for a CLI interface.
134122
`Config` is a class that holds all the configurations for the `check()`
135123
function.
136124

137-
See the help documentation with `help(Config)` for more details.
125+
See the help documentation with
126+
[`help(Config)`](/docs/reference/Config.qmd) for more details.
138127

139128
### {{< var done >}} `Exclusion`
140129

141130
A sub-item of `Config` that expresses checks to exclude. This can be
142131
useful if you want to exclude (or skip) certain checks from the Data
143132
Package standard that are not relevant to your use case.
144133

145-
See the help documentation with `help(Exclusion)` for more details.
134+
See the help documentation with
135+
[`help(Exclusion)`](/docs/reference/Exclusion.qmd) for more details.
146136

147137
#### {{< var done >}} `Extensions`
148138

@@ -156,14 +146,16 @@ See the help documentation with
156146

157147
A sub-item of `Extensions` that allows users to set specific properties
158148
as required that are not required by the Data Package standard. See the
159-
help documentation with `help(RequiredCheck)` for more details.
149+
help documentation with
150+
[`help(RequiredCheck)`](/docs/reference/RequiredCheck.qmd) for more
151+
details.
160152

161153
#### {{< var done >}} `CustomCheck`
162154

163155
A sub-item of `Extensions` that allows users to add an additional,
164156
custom check that `check-datapackage` will run alongside the standard
165-
checks. See the help documentation with `help(CustomCheck)` for more
166-
details.
157+
checks. See the help documentation with
158+
[`help(CustomCheck)`](/docs/reference/CustomCheck.qmd) for more details.
167159

168160
### {{< var done >}} `Issue`
169161

@@ -216,11 +208,12 @@ check = "lambda name: name.islower()"
216208

217209
## Flow
218210

219-
This is the potential flow of using `check-datapackage`:
211+
This is the flow of how `check-datapackage` is used, or at least how
212+
properties flow through `check-datapackage` functions and classes.
220213

221214
```{mermaid}
222215
%%| label: fig-interface-flow
223-
%%| fig-cap: "Flow of functions and classes when using `check-datapackage`."
216+
%%| fig-cap: "Flow of inputs and outputs through the functions and classes of `check-datapackage`."
224217
%%| fig-alt: "A flowchart showing the flow of using `check-datapackage`, starting with reading the `datapackage.json` and `.cdp.toml` files, then checking the properties with the config, and finally explaining any issues found."
225218
flowchart TD
226219
descriptor_file[(datapackage.json)]
@@ -231,7 +224,7 @@ flowchart TD
231224
read_config["read_config()"]
232225
233226
config[/Config/]
234-
custom_check[/CustomCheck/]
227+
extensions[/Extensions/]
235228
exclusion[/Exclusion/]
236229
check["check()"]
237230
issues[/"list[Issue]"/]
@@ -240,9 +233,9 @@ flowchart TD
240233
messages[/messages/]
241234
242235
descriptor_file --> read_json --> properties
243-
config_file --> read_config --> config
244-
custom_check & exclusion --> config
245-
custom_check & exclusion -.-> config_file
236+
config_file -.-> read_config -.-> config
237+
extensions & exclusion --> config
238+
extensions & exclusion -.-> config_file
246239
247240
properties & config --> check --> issues --> explain --> messages
248241
```

0 commit comments

Comments
 (0)