You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Template document for [CODECHECK](https://codecheck.org.uk/)'s with a Jupyter notebook. Note that the files in this repository should be placed into a `codecheck` directory, and require a `codecheck.yml` file in the main folder (i.e. `../codecheck.yml` from the point of view of this notebook). See the [CODECHECK community process guide](https://codecheck.org.uk/guide/community-process) for more details.\n",
9
+
"\n",
10
+
"Note that the `{-}` at the end of the headings is necessary to avoid numbered headings in jupyter's `nbexport`."
11
+
]
12
+
},
13
+
{
14
+
"cell_type": "code",
15
+
"id": "p9fkrelbqqo",
16
+
"source": "from codecheck import Codecheck",
17
+
"metadata": {},
18
+
"execution_count": null,
19
+
"outputs": []
20
+
},
21
+
{
22
+
"cell_type": "code",
23
+
"execution_count": null,
24
+
"id": "d75b33d1",
25
+
"metadata": {},
26
+
"outputs": [],
27
+
"source": "# By default, this expects a file at `../codecheck.yml` -- provide a path/filename otherwise.\n# Set validate=True to check configuration before proceeding\n# Set strict=True to halt on validation errors\ncheck = Codecheck(validate=False, strict=False)"
28
+
},
29
+
{
30
+
"cell_type": "markdown",
31
+
"id": "nekc3mpbi4",
32
+
"source": "## Validation (Optional){-}\n\nThe following cells run validation checks on the `codecheck.yml` file. This is optional but recommended to catch configuration errors early. You can skip these cells if you prefer.",
33
+
"metadata": {}
34
+
},
35
+
{
36
+
"cell_type": "code",
37
+
"id": "afhjxh7y7un",
38
+
"source": "# Run validation checks (set check_manifest=False if outputs/ directory doesn't exist yet)\npassed, issues = check.validate(check_manifest=False, strict=False)\nprint(f\"Validation {'passed' if passed else 'failed'} with {len(issues)} issue(s)\")\ncheck.validation_report()",
39
+
"metadata": {},
40
+
"execution_count": null,
41
+
"outputs": []
42
+
},
43
+
{
44
+
"cell_type": "code",
45
+
"execution_count": null,
46
+
"id": "e5893809",
47
+
"metadata": {},
48
+
"outputs": [],
49
+
"source": [
50
+
"check.title()"
51
+
]
52
+
},
53
+
{
54
+
"cell_type": "markdown",
55
+
"id": "aaa08iw35qj",
56
+
"source": "---",
57
+
"metadata": {}
58
+
},
59
+
{
60
+
"cell_type": "markdown",
61
+
"id": "60b1589a",
62
+
"metadata": {},
63
+
"source": [
64
+
"## CODECHECK summary{-}"
65
+
]
66
+
},
67
+
{
68
+
"cell_type": "code",
69
+
"execution_count": null,
70
+
"id": "42df69b7",
71
+
"metadata": {},
72
+
"outputs": [],
73
+
"source": [
74
+
"check.summary_table()"
75
+
]
76
+
},
77
+
{
78
+
"cell_type": "markdown",
79
+
"id": "db137e9a",
80
+
"metadata": {},
81
+
"source": [
82
+
"## Summary of output files generated{-}"
83
+
]
84
+
},
85
+
{
86
+
"cell_type": "code",
87
+
"execution_count": null,
88
+
"id": "4bdd6dcd",
89
+
"metadata": {},
90
+
"outputs": [],
91
+
"source": [
92
+
"check.files()"
93
+
]
94
+
},
95
+
{
96
+
"cell_type": "markdown",
97
+
"id": "b0af9cd0",
98
+
"metadata": {},
99
+
"source": [
100
+
"## Summary{-}"
101
+
]
102
+
},
103
+
{
104
+
"cell_type": "code",
105
+
"execution_count": null,
106
+
"id": "3d319d3a",
107
+
"metadata": {},
108
+
"outputs": [],
109
+
"source": [
110
+
"check.summary()"
111
+
]
112
+
},
113
+
{
114
+
"cell_type": "markdown",
115
+
"id": "be63e1d6",
116
+
"metadata": {},
117
+
"source": [
118
+
"## CODECHECKER notes{-}\n",
119
+
"\n",
120
+
"*TODO*"
121
+
]
122
+
},
123
+
{
124
+
"cell_type": "markdown",
125
+
"id": "82d0bdb9",
126
+
"metadata": {},
127
+
"source": [
128
+
"## Recommendations to the authors{-}\n",
129
+
"\n",
130
+
"*TODO*"
131
+
]
132
+
},
133
+
{
134
+
"cell_type": "markdown",
135
+
"id": "8fe8127b",
136
+
"metadata": {},
137
+
"source": [
138
+
"## Citing this document{-}"
139
+
]
140
+
},
141
+
{
142
+
"cell_type": "code",
143
+
"execution_count": null,
144
+
"id": "bbb4aec2",
145
+
"metadata": {},
146
+
"outputs": [],
147
+
"source": [
148
+
"check.citation()"
149
+
]
150
+
},
151
+
{
152
+
"cell_type": "markdown",
153
+
"id": "a89d2b5e",
154
+
"metadata": {},
155
+
"source": [
156
+
"## About CODECHECK{-}"
157
+
]
158
+
},
159
+
{
160
+
"cell_type": "code",
161
+
"execution_count": null,
162
+
"id": "400b2603",
163
+
"metadata": {},
164
+
"outputs": [],
165
+
"source": [
166
+
"check.about_codecheck()"
167
+
]
168
+
},
169
+
{
170
+
"cell_type": "markdown",
171
+
"id": "3f5f5d71",
172
+
"metadata": {},
173
+
"source": [
174
+
"## About this document{-}\n",
175
+
"This document was created using a [jupyter notebook](https://jupyter.org/) and converted into PDF via [nbconvert](https://nbconvert.readthedocs.io/), [pandoc](https://pandoc.org/), and [xelatex](http://xetex.sourceforge.net/). \n",
176
+
"\n",
177
+
"## License{-}\n",
178
+
"The code, data, and figures created by the original authors are licensed under the ... license (see their [LICENSE file](https://github.com/codecheckers/causality-review/blob/main/LICENSE)). The content of the `codecheck` directory and this report are licensed under the ... license."
179
+
]
180
+
},
181
+
{
182
+
"cell_type": "markdown",
183
+
"id": "10b01948",
184
+
"metadata": {},
185
+
"source": [
186
+
"## Manifest files{-}\n",
187
+
"\n",
188
+
"### CSV files{-}"
189
+
]
190
+
},
191
+
{
192
+
"cell_type": "code",
193
+
"execution_count": null,
194
+
"id": "86962465",
195
+
"metadata": {},
196
+
"outputs": [],
197
+
"source": [
198
+
"# Show CSV file summaries if any CSV files exist in manifest\n",
199
+
"try:\n",
200
+
" result = check.csv_files(index_col=False, header=None) # arguments for panda's read_csv function\n",
201
+
" if result:\n",
202
+
" display(result)\n",
203
+
"except Exception as e:\n",
204
+
" print(f'No CSV files to display or files not found: {e}')"
205
+
]
206
+
},
207
+
{
208
+
"cell_type": "markdown",
209
+
"id": "c1424a39",
210
+
"metadata": {},
211
+
"source": [
212
+
"### Figures{-}"
213
+
]
214
+
},
215
+
{
216
+
"cell_type": "code",
217
+
"execution_count": null,
218
+
"id": "fb1bccee",
219
+
"metadata": {},
220
+
"outputs": [],
221
+
"source": [
222
+
"# Show figures if any exist in manifest\n",
223
+
"try:\n",
224
+
" result = check.latex_figures(extensions=('.pdf',)) # Manifest files to include\n",
225
+
" if result:\n",
226
+
" display(result)\n",
227
+
"except Exception as e:\n",
228
+
" print(f'No figures to display or files not found: {e}')"
0 commit comments