Skip to content

Commit 9e5ade5

Browse files
committed
updated method to set endpoints
1 parent d888bee commit 9e5ade5

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

pyproject.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
[project]
2-
name = "herbie-plugin-tutorial"
3-
version = "0.1.0"
4-
description = "A demonstration of a Herbie plugin to use custom model templates."
2+
name = "herbie-plugin-tutorial" #EDIT ME
3+
version = "0.1.0" # EDIT ME
4+
description = "A demonstration of a Herbie plugin to use custom model templates." # EDIT ME
55
readme = "README.md"
66
authors = [
7-
{ name = "Brian Blaylock", email = "blaylockbk@gmail.com" }
7+
{ name = "Brian Blaylock", email = "blaylockbk@gmail.com" } # EDIT ME
88
]
99
requires-python = ">=3.10"
1010
dependencies = [
1111
"herbie-data>=2025.3.1",
1212
]
1313

14+
[project.entry-points."herbie.plugins"]
15+
hrrr_analysis = "herbie_plugin_tutorial:hrrr_analysis" # EDIT ME
16+
bmw = "herbie_plugin_tutorial:bmw" # EDIT ME
17+
1418
[build-system]
1519
requires = ["hatchling"]
1620
build-backend = "hatchling.build"

src/herbie_plugin_tutorial/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ def template(self):
8888
self.SOURCES = {
8989
"aws": f"https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr.{self.date:%Y%m%d}/conus/hrrr.t{self.date:%H}z.wrf{self.product}f00.grib2",
9090
}
91+
self.LOCALFILE = f"{self.get_remoteFileName}"
9192

9293

93-
class bwm:
94+
class bmw:
9495
"""Custom template for Brian's Model of Weather (BMW) data."""
9596

9697
def template(self):
@@ -104,3 +105,4 @@ def template(self):
104105
self.SOURCES = {
105106
"local_main": f"/path/to/bmw/model/output/{self.model}/gribfiles/{self.date:%Y%m%d%H}/my_file.t{self.date:%H}z.f{self.fxx:02d}_{self.domain}.grib2",
106107
}
108+
self.LOCALFILE = f"{self.get_remoteFileName}"

0 commit comments

Comments
 (0)