CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
2 stars 4 forks source link

Remove `Repo` hack from model.py #210

Open SeanBryan51 opened 12 months ago

SeanBryan51 commented 12 months ago

On this line:

https://github.com/CABLE-LSM/benchcab/blob/6f586a1afbfbe636bdcbe53bcbc1d6143fba0dcf/benchcab/model.py#L40-L41

The Model class should not have to know whether repo is a GitRepo or an SVNRepo, we should only be working with the Repo interface. This should be addressed if we want to properly test the model and repo modules.

Originally posted by @SeanBryan51 in https://github.com/CABLE-LSM/benchcab/issues/208#issuecomment-1821888909

ccarouge commented 11 months ago

I wonder if we could use something like Path.rglob() to find the path to the offline/ directory instead of hard-wiring it. I haven't checked if we use Model.src_dir for anything else.

ccarouge commented 11 months ago

I also think this should be changed:

https://github.com/CABLE-LSM/benchcab/blob/6f586a1afbfbe636bdcbe53bcbc1d6143fba0dcf/benchcab/model.py#L107

It should probably be given by the repo instead of set in Model.