Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models API #134

Open
wpbonelli opened this issue Jan 11, 2024 · 3 comments
Open

Models API #134

wpbonelli opened this issue Jan 11, 2024 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@wpbonelli
Copy link
Contributor

wpbonelli commented Jan 11, 2024

Demo programmatic access to example data/models via https://github.com/fatiando/pooch.

This could be convenient for

@wpbonelli wpbonelli added enhancement New feature or request question Further information is requested labels Jan 11, 2024
@wpbonelli wpbonelli changed the title Models API Models API (demo) Feb 1, 2024
@wpbonelli
Copy link
Contributor Author

wpbonelli commented Feb 1, 2024

A simple proof of concept is available here: https://github.com/wpbonelli/modflow-devtools/tree/models-api

If this seems worthwhile, flopy may be a better place for it because the API

  • could return MFSimulation or model directly
  • could construct models lazily from Python/flopy on first call then cache input files, as an alternative to downloading them from GitHub

@wpbonelli
Copy link
Contributor Author

wpbonelli commented Mar 3, 2025

I think we can build a registry in release time CI, release it with the package, and then devtools can provide access to models in

..without moving the input files here. This would also work for flopy example data. Though at some point it is probably still worth considering defining all examples in flopy python code, at which point it probably makes more sense to move this there.

@wpbonelli wpbonelli mentioned this issue Mar 5, 2025
@wpbonelli wpbonelli changed the title Models API (demo) Models API Mar 5, 2025
wpbonelli added a commit that referenced this issue Mar 5, 2025
First draft of #134. API dynamically generated from a pooch registry. Alongside the registry a TOML file mapping model names to the set of model input files. These can be built and distributed with the package at release time. Then model input files can be downloaded at runtime.

This approach gives us the flexibility to support input files stored anywhere on GitHub, e.g. in the test models repos. It does not provide access to models defined with flopy, since this package does not depend on flopy.
@wpbonelli
Copy link
Contributor Author

This will deprecate the test models fixtures when we have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant