Open rogiersbart opened 4 years ago
Any thought on this @cneyens ? I don't think it would affect any recent use of the RMODFLOW dev branch, and the S3 classes you are working on in #20 probably all have the prefix already?
Yes, these all seem like good ideas.
The rmf_package
class is only used in nam
and the top-level functions for checks but indeed doesn't have any S3 methods atm. Could be used as a subclass of the proposed rmf_object
class for printing...
rmf_list
and rmf_2d/3d/4d_array
, so this shouldn't affect that branch.
From the current namespace file, it is obvious we are not really using a consistent approach for naming our S3 classes. We have at least these:
bas
,bcf
,bud
,cbc
,chd
,ddn
,de4
,dis
,drn
,evt
,ghb
,gmg
,hed
,hfb
,hob
,hpr
,huf
,kdep
,lmt
,lpf
,lvda
,mlt
,modflow
,nam
,nwt
,oc
,pcg
,pval
,rch
,riv
,rmf_2d_array
,rmf_3d_array
,rmf_4d_array
,rmf_list
,rmf_package
,sip
,upw
,wel
,zon
. I'd like to propose adding thermf_
prefix everywhere for consistency, and minimizing the potential for conflicts with other packages. Also, I don't think we really have methods in use forrmf_package
, but I would think having this there for all objects that can be part of the first level of a full model object (currentlymodflow
I believe, but maybe this should bermf_model
?) might be useful at some point (i.e. we always have the option to use S3 inheritance when it is there). Besides that one, I think it might be useful to introduce anrmf_object
one, that is added after e.g.rmf_dis
andrmf_package
, and serves as parent class for all RMODFLOW S3 objects. This would allow for consistent printing for instance (I'm thinking of usingrui::inspect()
there, as I would prefer moving the current printing methods to summary methods), by defining a singlermf_object
S3 method.