From 6a8f313df441c73673f8780a203a7233ae4f3ecc Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Sun, 26 Jan 2025 16:37:08 -0500 Subject: [PATCH] refactor(get-modflow): don't hard-code available os tags (#2426) Since these are given to change, it seems sufficient to raise (as we do) if a corresponding asset doesn't exist. --- flopy/utils/get_modflow.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/flopy/utils/get_modflow.py b/flopy/utils/get_modflow.py index d13035a21..c7271e530 100755 --- a/flopy/utils/get_modflow.py +++ b/flopy/utils/get_modflow.py @@ -35,15 +35,6 @@ "modflow6-nightly-build": "modflow6_nightly", } available_repos = list(renamed_prefix.keys()) -available_ostags = [ - "linux", - "mac", - "macarm", - "win32", - "win64", - "win64ext", - "win64par", -] max_http_tries = 3 # Check if this is running from flopy @@ -83,9 +74,7 @@ def get_suffixes(ostag) -> Tuple[str, str]: elif "mac" in ostag: return "", ".dylib" else: - raise KeyError( - f"unrecognized ostag {ostag!r}; choose one of {available_ostags}" - ) + raise KeyError(f"unrecognized ostag {ostag!r}") def get_request(url, params={}): @@ -699,7 +688,6 @@ def cli_main(): ) parser.add_argument( "--ostag", - choices=available_ostags, help="Operating system tag; default is to automatically choose.", ) parser.add_argument(