diff --git a/doc/changelog.md b/doc/changelog.md index 99c43261f..9358bcd5a 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -13,6 +13,7 @@ Jump to: Description +- Merge core refactor into MLI feature branch - Implement asynchronous notifications for shared data - Quick bug fix in _validate - Add helper methods to MLI classes diff --git a/smartsim/_core/_install/buildenv.py b/smartsim/_core/_install/buildenv.py index 64f288239..c016282e8 100644 --- a/smartsim/_core/_install/buildenv.py +++ b/smartsim/_core/_install/buildenv.py @@ -37,6 +37,8 @@ from packaging.version import InvalidVersion, Version, parse +DbEngine = t.Literal["REDIS", "KEYDB"] + class SetupError(Exception): """A simple exception class for errors in _install.buildenv file. @@ -161,25 +163,13 @@ class Versioner: SMARTSIM = Version_(get_env("SMARTSIM_VERSION", "0.8.0")) SMARTSIM_SUFFIX = get_env("SMARTSIM_SUFFIX", "") - # # Redis - # REDIS = Version_(get_env("SMARTSIM_REDIS", "7.2.4")) - # REDIS_URL = get_env("SMARTSIM_REDIS_URL", "https://github.com/redis/redis.git") - # REDIS_BRANCH = get_env("SMARTSIM_REDIS_BRANCH", REDIS) - - # # RedisAI - # REDISAI = "1.2.7" - # REDISAI_URL = get_env( - # "SMARTSIM_REDISAI_URL", "https://github.com/RedisAI/RedisAI.git" - # ) - # REDISAI_BRANCH = get_env("SMARTSIM_REDISAI_BRANCH", f"v{REDISAI}") - - # def as_dict(self, db_name: DbEngine = "REDIS") -> t.Dict[str, t.Tuple[str, ...]]: - # pkg_map = { - # "SMARTSIM": self.SMARTSIM, - # db_name: self.REDIS, - # "REDISAI": self.REDISAI, - # } - # return {"Packages": tuple(pkg_map), "Versions": tuple(pkg_map.values())} + def as_dict(self, db_name: DbEngine = "REDIS") -> t.Dict[str, t.Tuple[str, ...]]: + pkg_map = { + "SMARTSIM": self.SMARTSIM, + db_name: self.REDIS, + "REDISAI": self.REDISAI, + } + return {"Packages": tuple(pkg_map), "Versions": tuple(pkg_map.values())} @staticmethod def get_sha(setup_py_dir: Path) -> str: