Skip to content

Commit a3c2dec

Browse files
committed
add receipt template
1 parent 64d4cde commit a3c2dec

File tree

4 files changed

+155
-3
lines changed

4 files changed

+155
-3
lines changed

CONTRIBUTING.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ than waiting for a full **NCL Entry** to be completed.
6363

6464
1. If the content is primarily visualization, create a new file in the
6565
appropriate directory in `applications/` based off of
66-
the `templates/plot_template.ipynb`
66+
the `templates/viz_template.ipynb`
6767

6868
1. If the content is primarily computational (even if it includes
6969
visualization), create a new file in the appropriate directory
7070
in `applications/` based off of the `templates/computational_template.ipynb`
7171

72-
1. If relevant, link to corresponding NCL content at the bottom of the file,
72+
1. If relevant, link to corresponding NCL content at the bottom of the file
7373

7474
1. [INTEND TO AUTOMATE IN THE FUTURE] Add the new file to the `.rst` file in the
7575
same directory in `applications/` as your new file to add it to the webpage's
@@ -79,6 +79,8 @@ than waiting for a full **NCL Entry** to be completed.
7979
the `applications/applications.rst` file to add it to the cards on the main
8080
page of the website.
8181

82+
1. Make sure to clear and run all outputs before asking for a review
83+
8284
### NCL Entry
8385

8486
1. Create a new file in `ncl/ncl_entries/` based off of the
@@ -88,9 +90,16 @@ than waiting for a full **NCL Entry** to be completed.
8890

8991
1. See below for adding the covered functions to the NCL Index
9092

93+
1. Make sure to clear and run all outputs before asking for a review
94+
9195
### Receipt
9296

93-
TO DO
97+
1. Create a new file in `ncl/ncl_receipts/` based off of the
98+
`templates/receipt_template.ipynb` template.
99+
100+
1. See below for adding the covered functions to the NCL Index
101+
102+
1. Make sure to clear and run all outputs before asking for a review
94103

95104
### Adding to the NCL Index
96105

environment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ channels:
33
- conda-forge
44
dependencies:
55
- cartopy
6+
- geocat-datafiles
67
- matplotlib
78
- netcdf4
89
- numpy

templates/receipt_template.ipynb

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "e6eddaf181eacfd3",
6+
"metadata": {},
7+
"source": [
8+
"# [NCL Function name or category]\n",
9+
"<!---\n",
10+
"Title of the notebook should be the name of the function or category of functions\n",
11+
"that are being documented and does not need to include the word \"receipt\".\n",
12+
"\n",
13+
"This should be the only top level header in the notebook.\n",
14+
"\n",
15+
"Remove comments like this before submitting the notebook.\n",
16+
"-->"
17+
]
18+
},
19+
{
20+
"cell_type": "markdown",
21+
"id": "e6be6389ef38b00b",
22+
"metadata": {},
23+
"source": [
24+
"```{warning} This is not meant to be a standalone notebook.\n",
25+
"This notebook is part of the process we have for adding entries to the NCL Index and is not meant to be used as tutorial or example code.\n",
26+
"```"
27+
]
28+
},
29+
{
30+
"cell_type": "markdown",
31+
"id": "536ffded4355d9c6",
32+
"metadata": {},
33+
"source": [
34+
"## Functions covered\n",
35+
"List and link to the NCL documentation for each function that is covered in this notebook."
36+
]
37+
},
38+
{
39+
"cell_type": "markdown",
40+
"id": "4a129c971c083695",
41+
"metadata": {},
42+
"source": [
43+
"## NCL code\n",
44+
"<!---\n",
45+
"Edit the below cell to link to the ncl code included for comparison in this notebook. \n",
46+
"\n",
47+
"It may not be visible in your IDE or local editor, but it will be visible in generated documentation (locally, on PR previews, and the live webpage).\n",
48+
"-->"
49+
]
50+
},
51+
{
52+
"cell_type": "markdown",
53+
"id": "3d70616a8934f0fb",
54+
"metadata": {},
55+
"source": [
56+
"```{literalinclude} ./ncl.ncl\n",
57+
"```"
58+
]
59+
},
60+
{
61+
"cell_type": "code",
62+
"execution_count": null,
63+
"id": "4cc8cfe9ae6bc031",
64+
"metadata": {},
65+
"outputs": [],
66+
"source": [
67+
"import geocat.datafiles\n",
68+
"\n",
69+
"ncl_output = geocat.datafiles.get(\n",
70+
" \"applications_files/ncl_outputs/spec_1_output.nc\"\n",
71+
") # grab your ncl output files from geocat-datafiles"
72+
]
73+
},
74+
{
75+
"cell_type": "markdown",
76+
"id": "d918dec004b6456b",
77+
"metadata": {},
78+
"source": [
79+
"## Python Functionality\n",
80+
"<!---\n",
81+
"Show the python code that replicates the NCL functionality. Don't worry about providing narrative, just provide enough explanation that somebody with the knowledge level of another developer could follow along.\n",
82+
"-->"
83+
]
84+
},
85+
{
86+
"cell_type": "code",
87+
"execution_count": null,
88+
"id": "47cd64dda7652b64",
89+
"metadata": {},
90+
"outputs": [],
91+
"source": []
92+
},
93+
{
94+
"cell_type": "markdown",
95+
"id": "f5249331fd3ece22",
96+
"metadata": {},
97+
"source": ""
98+
},
99+
{
100+
"cell_type": "markdown",
101+
"id": "3237a0bffc6827fc",
102+
"metadata": {},
103+
"source": [
104+
"## Comparison\n",
105+
"<!---\n",
106+
"Directly compare the outputs, numerically, visually, or however is most appropriate.\n",
107+
"\n",
108+
"If possible and reasonable, include assert statements to validate the output.\n",
109+
"-->"
110+
]
111+
},
112+
{
113+
"cell_type": "code",
114+
"execution_count": null,
115+
"id": "1fe6a51d83a36148",
116+
"metadata": {},
117+
"outputs": [],
118+
"source": []
119+
}
120+
],
121+
"metadata": {
122+
"kernelspec": {
123+
"display_name": "Python 3",
124+
"language": "python",
125+
"name": "python3"
126+
},
127+
"language_info": {
128+
"codemirror_mode": {
129+
"name": "ipython",
130+
"version": 2
131+
},
132+
"file_extension": ".py",
133+
"mimetype": "text/x-python",
134+
"name": "python",
135+
"nbconvert_exporter": "python",
136+
"pygments_lexer": "ipython2",
137+
"version": "2.7.6"
138+
}
139+
},
140+
"nbformat": 4,
141+
"nbformat_minor": 5
142+
}
File renamed without changes.

0 commit comments

Comments
 (0)