Skip to content

Commit

Permalink
add receipt template
Browse files Browse the repository at this point in the history
  • Loading branch information
anissa111 committed Jun 2, 2024
1 parent 64d4cde commit a3c2dec
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 3 deletions.
15 changes: 12 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ than waiting for a full **NCL Entry** to be completed.

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

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

1. If relevant, link to corresponding NCL content at the bottom of the file,
1. If relevant, link to corresponding NCL content at the bottom of the file

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

1. Make sure to clear and run all outputs before asking for a review

### NCL Entry

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

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

1. Make sure to clear and run all outputs before asking for a review

### Receipt

TO DO
1. Create a new file in `ncl/ncl_receipts/` based off of the
`templates/receipt_template.ipynb` template.

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

1. Make sure to clear and run all outputs before asking for a review

### Adding to the NCL Index

Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
dependencies:
- cartopy
- geocat-datafiles
- matplotlib
- netcdf4
- numpy
Expand Down
142 changes: 142 additions & 0 deletions templates/receipt_template.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "e6eddaf181eacfd3",
"metadata": {},
"source": [
"# [NCL Function name or category]\n",
"<!---\n",
"Title of the notebook should be the name of the function or category of functions\n",
"that are being documented and does not need to include the word \"receipt\".\n",
"\n",
"This should be the only top level header in the notebook.\n",
"\n",
"Remove comments like this before submitting the notebook.\n",
"-->"
]
},
{
"cell_type": "markdown",
"id": "e6be6389ef38b00b",
"metadata": {},
"source": [
"```{warning} This is not meant to be a standalone notebook.\n",
"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",
"```"
]
},
{
"cell_type": "markdown",
"id": "536ffded4355d9c6",
"metadata": {},
"source": [
"## Functions covered\n",
"List and link to the NCL documentation for each function that is covered in this notebook."
]
},
{
"cell_type": "markdown",
"id": "4a129c971c083695",
"metadata": {},
"source": [
"## NCL code\n",
"<!---\n",
"Edit the below cell to link to the ncl code included for comparison in this notebook. \n",
"\n",
"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",
"-->"
]
},
{
"cell_type": "markdown",
"id": "3d70616a8934f0fb",
"metadata": {},
"source": [
"```{literalinclude} ./ncl.ncl\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4cc8cfe9ae6bc031",
"metadata": {},
"outputs": [],
"source": [
"import geocat.datafiles\n",
"\n",
"ncl_output = geocat.datafiles.get(\n",
" \"applications_files/ncl_outputs/spec_1_output.nc\"\n",
") # grab your ncl output files from geocat-datafiles"
]
},
{
"cell_type": "markdown",
"id": "d918dec004b6456b",
"metadata": {},
"source": [
"## Python Functionality\n",
"<!---\n",
"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",
"-->"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "47cd64dda7652b64",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "f5249331fd3ece22",
"metadata": {},
"source": ""
},
{
"cell_type": "markdown",
"id": "3237a0bffc6827fc",
"metadata": {},
"source": [
"## Comparison\n",
"<!---\n",
"Directly compare the outputs, numerically, visually, or however is most appropriate.\n",
"\n",
"If possible and reasonable, include assert statements to validate the output.\n",
"-->"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1fe6a51d83a36148",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
File renamed without changes.

0 comments on commit a3c2dec

Please sign in to comment.