From 3790587509ee711e25ebc1e8f57cfc7cfae38055 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Mon, 9 Jun 2025 09:49:42 -0400 Subject: [PATCH] chore(models): clean up comments/docstrings Correct some outdated docstrings and comments --- modflow_devtools/models.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/modflow_devtools/models.py b/modflow_devtools/models.py index 534bf26e..c2fc9b6e 100644 --- a/modflow_devtools/models.py +++ b/modflow_devtools/models.py @@ -1,4 +1,4 @@ -# - support mf2005 models in modflow6-testmodels repo +# TODO # - switch modflow6-testmodels and -largetestmodels to # fetch zip of the repo instead of individual files? @@ -88,16 +88,12 @@ def copy_to( class LocalRegistry(ModelRegistry): """ - A registry of models in a local directory. + A registry of models in one or more local directories. *Not* persistent — lives only in memory, unlike `PoochRegistry`. - The registry is loaded eagerly on initialization by recursively scanning - the given directory for models (located by the presence of a namefile) - and corresponding input files. - - If model input files change on disk, you can force a reload by calling - `load()`. The model folder may not be changed after registry creation. + Indexing a directory recursively scans it for models (located by the + presence of a namefile) and registers corresponding input files. """ exclude: ClassVar = [".DS_Store", "compare"] @@ -213,17 +209,17 @@ def examples(self) -> dict: class PoochRegistry(ModelRegistry): """ A registry of models living in one or more GitHub repositories, accessible via - URLs. The registry uses Pooch to fetch models from the remote repos if needed. + URLs. The registry uses Pooch to fetch models from the remote(s) where needed. - On import, the registry is loaded from a database included as a module resource. - This consists of TOML files containing file information (as expected by Pooch), + On import, the registry is loaded from a database distributed with the package. + This database consists of TOML files containing file info as expected by Pooch, a map grouping files by model name, and a map grouping model names by example. Creating this database is a developer task. It should be checked into version control and updated whenever models are added to, removed from, or edited in the repositories referenced by the registry. - Since the registry must change whenever the remote branch does, it should be - aimed only at stable branches. + **Note**: since the registry must change whenever the remote branch does, it + should be aimed only at stable branches. """ anchor: ClassVar = f"{modflow_devtools.__name__}.registry"