@@ -5,7 +5,6 @@ title: "Interface"
55This section of the documentation focuses on the design of the interface
66and how it is implemented as Python code.
77
8- ::: callout-note
98We use symbols to indicate parts of the design that are actively being
109worked on, done, or planned (see table below). For work that is planned
1110or is in progress, we include the function signatures and docstrings to
2221
2322: A table showing the symbols used to indicate the status of interface
2423components, 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
6058for now though.
6159:::
6260
63- ### {{< var wip >}} ` check() `
61+ ### {{< var done >}} ` check() `
6462
6563This is the main function of this package, which will check a Data
6664Package properties against the Data Package standard, as well as include
6765any 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
7170The ` Config ` class is described below. By default, ` check() ` does not
7271result 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
8483information about the issues, but we also want to provide a way to
8584explain 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() `
135123function.
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
141130A sub-item of ` Config ` that expresses checks to exclude. This can be
142131useful if you want to exclude (or skip) certain checks from the Data
143132Package 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
157147A sub-item of ` Extensions ` that allows users to set specific properties
158148as 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
163155A sub-item of ` Extensions ` that allows users to add an additional,
164156custom 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."
225218flowchart 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