Skip to content

Commit

Permalink
Support for Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Jul 2, 2024
1 parent 906ebaa commit 816787f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
32 changes: 16 additions & 16 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ troposphere = "^4.7.0"

# Foursight ...

foursight-core = "5.5.0.1b3"
foursight-core = "5.5.0.1b4"

# Define poetry "groups" for foursight-cgap and foursight, named foursight_cgap and
# foursight_fourfront, respectively. This is so we can conditionally include either but
# not both in the Chalice package (via foursight_core/deploy.py). dmichaels/2022-11-01.

[tool.poetry.group.foursight_smaht.dependencies]
# foursight-smaht = "^0.8.7"
foursight-smaht = "0.8.7.1b6"
foursight-smaht = "0.8.7.1b8"

[tool.poetry.group.foursight_cgap.dependencies]
foursight-cgap = "4.3.0.1b5"
foursight-cgap = "4.3.0.1b6"

[tool.poetry.group.foursight_fourfront.dependencies]
foursight = "4.7.1.1b5"
foursight = "4.7.1.1b6"

[tool.poetry.dev-dependencies]
jupyter = "1.0.0"
Expand Down
7 changes: 6 additions & 1 deletion src/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def _load_config(cls, filename):
"""
with io.open(filename) as fp:
config = json.load(fp)
#config = {k: v and str(v) for k, v in config.items()}
# config = {k: v and str(v) for k, v in config.items()}
config = {k: str(v) if v is not None else None for k, v in config.items()}
return config

Expand Down Expand Up @@ -361,6 +361,11 @@ def find_stack_output(cls, key_or_pred, value_only=False):
if value_only
else results) # if not value-only, result is a dictionary, which is fine
else:
# 2024-07-02: Fix for results == ["smaht-devtest-foursight-envs", "smaht-wolf-foursight-envs"]
# and ConfigManager.get_config_setting(Settings.ENV_NAME) == "smaht-wolf".
if env_name := ConfigManager.get_config_setting(Settings.ENV_NAME):
if (results := [result for result in results if env_name in result]) and (len(results) == 1):
return results[0]
raise ValueError(f"Too many matches for {key_or_pred}: {results}")

@classmethod
Expand Down

0 comments on commit 816787f

Please sign in to comment.