Skip to content

Commit

Permalink
fixes round 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ankona committed Oct 17, 2024
1 parent 80d84b2 commit 9bc3f13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
1 change: 1 addition & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 9 additions & 19 deletions smartsim/_core/_install/buildenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9bc3f13

Please sign in to comment.