Skip to content

Commit 8f228d6

Browse files
committed
Define base config as an entry point
1 parent 8709fca commit 8f228d6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Diff for: pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ rompy = "rompy.cli:main"
6969
"netcdf_fcstack" = "rompy.intake:NetCDFFCStackSource"
7070

7171
[project.entry-points."rompy.config"]
72+
base = "rompy.core.config:BaseConfig"
7273
swan = "rompy.swan.config:SwanConfig"
7374
swan_components = "rompy.swan.config:SwanConfigComponents"
7475
schism = "rompy.schism.config:SchismCSIROConfig"

Diff for: rompy/model.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616
logger = logging.getLogger(__name__)
1717

1818

19-
# Accepted config types defined by the BaseConfig and any other config types
20-
# defined in the entry points of the rompy.config group
21-
config_eps = entry_points(group="rompy.config")
22-
CONFIG_TYPES = (BaseConfig,) + tuple(eps.load() for eps in config_eps)
19+
# Accepted config types are defined in the entry points of the rompy.config group
20+
CONFIG_TYPES = tuple(eps.load() for eps in entry_points(group="rompy.config"))
2321

2422

2523
class ModelRun(RompyBaseModel):

0 commit comments

Comments
 (0)