Skip to content

refactor: consolidate package class#103

Draft
wpbonelli wants to merge 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:refactor-package
Draft

refactor: consolidate package class#103
wpbonelli wants to merge 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:refactor-package

Conversation

@wpbonelli

Copy link
Copy Markdown
Member

Merge PackageBase/ListPackage/ArrayPackage/ScalarPackage/AdvancedPackage into a single Package class, which builds whatever combination of scalar/array/list variables a given package type needs at init time. Keep old subclasses as aliases to Package for compatibility, but show a DeprecationWarning when used. Drop the package_factory mechanism. Generic variable access/assignment continues to go through __getattr__/__setattr__. Keep explicit properties for stress_period_data, packagedata, maxbound, nbound, rhs, and hcof, set to None for inapplicable packages. Variables not catalogued in [adv_]pkgvars still use get_advanced_var/set_advanced_var.

No behavior changes, pure refactor. Idea is to simplify the object model and reflect the fact that packages may be composites of multiple variable types, rather than collections of just one variable type.

@wpbonelli wpbonelli added this to the 0.2.1 milestone Jul 8, 2026
@wpbonelli wpbonelli added the refactor Non-functional changes label Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Non-functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant