Skip to content

Commit

Permalink
Merge pull request #312 from blaylockbk/303-migrate-mature-functions-…
Browse files Browse the repository at this point in the history
…from-carpenter_workshop-into-herbie

Migrate mature capabilities from Carpenter_Workshop into Herbie
  • Loading branch information
blaylockbk authored Jun 30, 2024
2 parents e517c81 + 67c2318 commit 2dde811
Show file tree
Hide file tree
Showing 106 changed files with 34,105 additions and 29,103 deletions.
Binary file added docs/_static/paint/AirQualityIndex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/AirQualityIndex_lightness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/Herbie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/Herbie_Colors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/Herbie_Colors_lightness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/Herbie_lightness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/Land_Sequential.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/Land_Sequential_lightness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/NWSTemperature_kwargs2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/NWS_Continuous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/NWS_Continuous_lightness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/NWS_Qualitative.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/NWS_Qualitative_lightness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/NWS_Sequential.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/NWS_Sequential_lightness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/Radar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/Radar_lightness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/herbie_paint_landGreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/herbie_paint_nws.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/paint/herbie_paint_nwsTmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/api_reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ Docstring reference for the ``herbie`` module
accessors
fast
latest
paint
wgrib2
misc
35 changes: 35 additions & 0 deletions docs/api_reference/paint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
=============
herbie.paint
=============

.. toctree::
:maxdepth: 2

.. currentmodule:: herbie.paint

.. autosummary::
:toctree: _autosummary

NWSTemperature
NWSWindChill
NWSHeatIndex
NWSDewPointTemperature
NWSRelativeHumidity
NWSWindSpeed
NWSCloudCover
NWSProbabilityOfPrecipitation
NWSProbabilityOfPrecipitationSnow
NWSProbabilityOfPrecipitationIce
NWSPrecipitation
NWSPrecipitationSnow
NWSPrecipitationIce
NWSWaveHeight
LandTan
LandBrown
LandGreen
Water
HerbieWhite
HerbieTan
HerbieBlack


27 changes: 27 additions & 0 deletions docs/fix_notebook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Fix jupyter notebooks when they have issues.
I've had to use this on my notebooks to fix them after doing find/replace
operations, and other weird things that happen.
"""

import nbformat
from pathlib import Path


for FILE in sorted(Path("./").rglob("*.ipynb")):
print(FILE)
with open(FILE, "r") as file:
nb_corrupted = nbformat.reader.read(file)

nbformat.validator.validate(nb_corrupted)
# <stdin>:1: MissingIDFieldWarning: Code cell is missing an id field,
# this will become a hard error in future nbformat versions.
# You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4).
# Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.

nb_fixed = nbformat.validator.normalize(nb_corrupted)
nbformat.validator.validate(nb_fixed[1])
# Produces no warnings or errors.

with open(FILE, "w") as file:
nbformat.write(nb_fixed[1], file)
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"outputs": [],
"source": [
"from herbie import Herbie\n",
"from toolbox import EasyMap, pc"
"from herbie.toolbox import EasyMap, pc"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
},
"orig_nbformat": 4
}
},
"nbformat": 4,
"nbformat_minor": 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,6 @@
"pygments_lexer": "ipython3",
"version": "3.10.8"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "ac511961bc6976a3d289cde8fc247e6b0e9298cf513cb762aa0a7df646d192ed"
Expand Down
Loading

0 comments on commit 2dde811

Please sign in to comment.