You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update the model registry generation tool to work with local files or release assets
* add an experimental warning to the programs API, for now
* trim developer docs, update user-facing docs
* finish incomplete cache clear functionality
-[🚧 Future Work (Upstream CI)](#-future-work-upstream-ci)
33
+
-[Status and Next Steps](#status-and-next-steps)
40
34
-[Cross-API Consistency](#cross-api-consistency)
41
35
-[Shared Patterns](#shared-patterns)
42
36
-[Key Differences](#key-differences)
43
37
-[Demo & Usage Examples](#demo--usage-examples)
44
38
-[Python API](#python-api)
45
39
-[Basic Workflow](#basic-workflow)
46
-
-[Convenience Methods on BootstrapSource](#convenience-methods-on-bootstrapsource)
40
+
-[Object-Oriented API](#object-oriented-api)
47
41
-[Cache Management](#cache-management)
48
42
-[CLI Usage](#cli-usage)
49
43
-[Show Registry Status](#show-registry-status)
@@ -388,7 +382,6 @@ Required steps in source model repositories include:
388
382
```bash
389
383
# Downloads from remote and indexes subdirectory (recommended)
390
384
python -m modflow_devtools.models.make_registry \
391
-
--mode version \
392
385
--repo MODFLOW-ORG/modflow6-testmodels \
393
386
--ref master \
394
387
--name mf6/test \
@@ -398,14 +391,12 @@ Required steps in source model repositories include:
398
391
399
392
**For release asset models** (zip published with releases):
400
393
```bash
401
-
# Downloads from remote and indexes subdirectory (recommended)
394
+
# Downloads from remote (provide --asset-file to index from release asset)
402
395
python -m modflow_devtools.models.make_registry \
403
-
--mode release \
404
396
--repo MODFLOW-ORG/modflow6-examples \
405
397
--ref current \
406
398
--asset-file mf6examples.zip \
407
399
--name mf6/example \
408
-
--path examples \
409
400
--output .registry
410
401
```
411
402
@@ -509,59 +500,11 @@ Expose as `DEFAULT_REGISTRY` a `MergedRegistry` with all sources configured in t
509
500
510
501
This will break any code checking `isinstance(DEFAULT_REGISTRY, PoochRegistry)`, but it's unlikely anyone is doing that.
511
502
512
-
## Migration path
513
-
514
-
The transition to the dynamic registry system is complete. The package no longer ships large TOML registry files - only a minimal bootstrap file (`modflow_devtools/models/models.toml`) that tells the system where to find remote model repositories.
515
-
516
-
On first import, `modflow-devtools` attempts to auto-sync the default registries. If this fails (e.g., no network), users will get a clear error message when trying to use the registry, directing them to run `python -m modflow_devtools.models sync`.
517
-
518
-
Since `modflow-devtools` is currently used only internally (dogfooding), there are no external consumers to worry about for backwards compatibility.
519
-
520
-
### Implementation Summary
521
-
522
-
The dynamic registry system has been fully implemented with a streamlined object-oriented design:
523
-
524
-
#### ✅ Core Infrastructure
525
-
-**Consolidated implementation**: All code in single `modflow_devtools/models/__init__.py` file
-`PoochRegistry`: Remote model fetching with Pooch integration
541
-
-`DiscoveredModelRegistry`: Discovery result with metadata
542
-
-**No separate modules**: Schema, cache, discovery, and sync logic integrated into classes
543
-
-**Method-based API**: Operations are methods on objects (e.g., `source.sync()`, `cache.load()`)
544
-
- Auto-sync on first import (`_try_best_effort_sync()`)
545
-
546
-
#### ✅ User Features
547
-
- User config overlay (`~/.config/modflow-devtools/models.toml`)
548
-
- Bootstrap config merging via `ModelSourceConfig.load()`
549
-
- Explicit model versioning via git refs
550
-
- Platform-appropriate cache locations
551
-
- Clear error messages when sync is needed
552
-
-**Consolidated registry format**: Single `models.toml` file only
553
-
554
-
#### ✅ Testing
555
-
- Comprehensive test suite in `autotest/test_models.py`
556
-
- All 34 tests passing
557
-
- Tests configured via `.env` file
558
-
- Parallel execution with pytest-xdist (`--dist loadgroup`)
559
-
- Full mypy type checking with no errors
560
-
561
-
#### 🚧 Future Work (Upstream CI)
562
-
- Add `.github/workflows/registry.yml` to each model repo
563
-
- Automate registry generation in CI
564
-
- Add registry as release asset for repos with releases
503
+
## Status and Next Steps
504
+
505
+
The dynamic registry system is fully implemented. The package ships only a minimal bootstrap file that tells the system where to find remote model repositories. On first import, `modflow-devtools` attempts to auto-sync the default registries.
506
+
507
+
The next step is upstream integration: model repositories should automate registry generation in CI workflows.
565
508
566
509
## Cross-API Consistency
567
510
@@ -764,6 +707,22 @@ $ mf models list --ref registry
764
707
$ mf models list --source mf6/test --ref registry --verbose
765
708
```
766
709
710
+
#### Clear Cached Registries
711
+
712
+
```bash
713
+
# Clear all cached registries (with confirmation)
714
+
$ mf models clear
715
+
716
+
# Clear specific source
717
+
$ mf models clear --source mf6/test
718
+
719
+
# Clear specific source and ref
720
+
$ mf models clear --source mf6/test --ref develop
721
+
722
+
# Skip confirmation prompt
723
+
$ mf models clear --force
724
+
```
725
+
767
726
### Registry Creation Tool
768
727
769
728
The `make_registry` tool uses a mode-based interface with **remote-first operation** by default:
@@ -772,7 +731,7 @@ The `make_registry` tool uses a mode-based interface with **remote-first operati
0 commit comments