Summary
The flepimop2-op_system connector (in this repo at flepimop2-op_system/) needs to be brought up to date with the recent module-architecture consolidation on flepimop2 main. The connector currently works against the new base classes by accident — it should explicitly adopt the documented patterns and bump its minimum flepimop2 pin.
Upstream changes that affect us
On GMU-CSDS/flepimop2 main (HEAD ~aaa0d66):
Remove non-pydantic approach to modules (commit 83ead31) — renames ModuleABC → ModuleBase, makes it BaseModel-based, and re-bases SystemABC(ModuleBase, module_namespace="system") on it. Concrete modules now declare their identity via class-kwargs: class Foo(SystemABC, module="<dotted.name>").
Add ModuleBase.patch (commit 8593db2) — modules and ConfigurationModel gain a .patch(...) method for in-place pydantic-aware overrides.
Add flepimop2 patch CLI (commit aaa0d66) — exposes the above via the CLI.
- The
docs/development/pydantic-for-modelers.md doc now prescribes the canonical pattern: subclass declares module: Literal["<dotted.name>"] = "<dotted.name>" (or relies on the module= class-kwarg shortcut) and model_config = ConfigDict(extra="forbid").
Current connector state
flepimop2-op_system/src/flepimop2_op_system/system.py:
class OpSystemSystem(SystemABC, module="flepimop2.system.op_system"):
spec: Mapping[str, Any]
...
def model_post_init(self, __context):
self._compiled = compile_spec(self.spec)
- Imports and class definition resolve under the new
ModuleBase; issubclass(OpSystemSystem, BaseModel) is True at runtime.
pyproject.toml declares version = "0.2.0" but the installed editable metadata still reports 0.1.2 — a release/tag was missed.
- Dependency pin is
flepimop2>=0.2.0. The new ModuleBase work landed in flepimop2>=0.3.0.dev0; older versions will fail at class creation.
- The connector does not yet expose / test
ModuleBase.patch semantics, and there is no integration smoke that exercises the new CLI surface.
Tasks
Repro of the pin issue
$ python -c "import importlib.metadata as m; print(m.version('flepimop2-op_system'), m.version('flepimop2'))"
0.1.2 0.3.0.dev0
Refs
- GMU-CSDS/flepimop2 commit
83ead31 (ModuleBase consolidation)
- GMU-CSDS/flepimop2 commit
8593db2 (ModuleBase.patch)
- GMU-CSDS/flepimop2 commit
aaa0d66 (flepimop2 patch CLI)
- ACCIDDA/COVID19_USA configs
SMH_R19_op_system*.yml are the primary downstream consumer and a good integration target.
Summary
The
flepimop2-op_systemconnector (in this repo atflepimop2-op_system/) needs to be brought up to date with the recent module-architecture consolidation onflepimop2main. The connector currently works against the new base classes by accident — it should explicitly adopt the documented patterns and bump its minimumflepimop2pin.Upstream changes that affect us
On
GMU-CSDS/flepimop2main(HEAD ~aaa0d66):Remove non-pydantic approach to modules(commit83ead31) — renamesModuleABC→ModuleBase, makes itBaseModel-based, and re-basesSystemABC(ModuleBase, module_namespace="system")on it. Concrete modules now declare their identity via class-kwargs:class Foo(SystemABC, module="<dotted.name>").Add ModuleBase.patch(commit8593db2) — modules andConfigurationModelgain a.patch(...)method for in-place pydantic-aware overrides.Add flepimop2 patch CLI(commitaaa0d66) — exposes the above via the CLI.docs/development/pydantic-for-modelers.mddoc now prescribes the canonical pattern: subclass declaresmodule: Literal["<dotted.name>"] = "<dotted.name>"(or relies on themodule=class-kwarg shortcut) andmodel_config = ConfigDict(extra="forbid").Current connector state
flepimop2-op_system/src/flepimop2_op_system/system.py:ModuleBase;issubclass(OpSystemSystem, BaseModel) is Trueat runtime.pyproject.tomldeclaresversion = "0.2.0"but the installed editable metadata still reports0.1.2— a release/tag was missed.flepimop2>=0.2.0. The newModuleBasework landed inflepimop2>=0.3.0.dev0; older versions will fail at class creation.ModuleBase.patchsemantics, and there is no integration smoke that exercises the new CLI surface.Tasks
Bump
flepimop2-op_systemto0.3.0(or0.2.1if you want to keep the connector minor in lockstep with flepimop2's minor), tag, and refresh the editable install metadata.Change the
flepimop2dependency pin to>=0.3.0.dev0(or whatever the first release containing83ead31is).Adopt the documented Literal pattern explicitly:
(Keeping the
module="..."class-kwarg form is also legal — pick one and document it.)Add a smoke test that constructs an
OpSystemSystemfrom a tiny spec and calls.patch(spec=...), verifying re-compilation behavior.Add a regression test that runs
flepimop2 patch ...against a YAML config containing anop_systemsystem:block.README/CHANGELOG note for the supported
flepimop2floor.Repro of the pin issue
Refs
83ead31(ModuleBase consolidation)8593db2(ModuleBase.patch)aaa0d66(flepimop2 patchCLI)SMH_R19_op_system*.ymlare the primary downstream consumer and a good integration target.