From 8bf70eec40e1cddbc89dddb6a98493a652044011 Mon Sep 17 00:00:00 2001 From: Robert Parker Date: Thu, 22 Aug 2024 14:31:32 -0600 Subject: [PATCH] Bump extensions version to 3.4.2 (#1473) * update extensions version to 3.4.2 * add bin_directory option to print_extensions_version and use it in get-extensions --------- Co-authored-by: Keith Beattie --- idaes/commands/extensions.py | 11 +++++++---- idaes/config.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/idaes/commands/extensions.py b/idaes/commands/extensions.py index 35d364804b..841a1063c4 100644 --- a/idaes/commands/extensions.py +++ b/idaes/commands/extensions.py @@ -31,19 +31,21 @@ _log = logging.getLogger("idaes.commands.extensions") -def print_extensions_version(library_only=False): +def print_extensions_version(library_only=False, bin_directory=None): click.echo("---------------------------------------------------") click.echo("IDAES Extensions Build Versions") click.echo("===================================================") + if bin_directory is None: + bin_directory = idaes.bin_directory if not library_only: - v = os.path.join(idaes.bin_directory, "version_solvers.txt") + v = os.path.join(bin_directory, "version_solvers.txt") try: with open(v, "r") as f: v = f.readline().strip() except FileNotFoundError: v = "no version file found" click.echo("Solvers: v{}".format(v)) - v = os.path.join(idaes.bin_directory, "version_lib.txt") + v = os.path.join(bin_directory, "version_lib.txt") try: with open(v, "r") as f: v = f.readline().strip() @@ -150,7 +152,8 @@ def get_extensions( for k, i in d.items(): click.echo(f"{k:14}: {i}") else: - print_extensions_version(library_only) + # If `to` is None, we default to idaes.bin_directory. + print_extensions_version(library_only=library_only, bin_directory=to) else: click.echo("\n* You must provide a download URL for IDAES binary files.") diff --git a/idaes/config.py b/idaes/config.py index e3f1b31ab4..8acd5073bd 100644 --- a/idaes/config.py +++ b/idaes/config.py @@ -23,7 +23,7 @@ _log = logging.getLogger(__name__) # Default release version if no options provided for get-extensions -default_binary_release = "3.4.0" +default_binary_release = "3.4.2" # Where to download releases from get-extensions release_base_url = "https://github.com/IDAES/idaes-ext/releases/download" # Where to get release checksums