Skip to content

Commit

Permalink
fix: updated apps.sync to support new app_name parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Aradhya-Tripathi committed May 9, 2022
1 parent fd216f9 commit 7980709
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions bench/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,24 @@ def update_apps_states(
with open(self.states_path, "w") as f:
f.write(json.dumps(self.states, indent=4))

def sync(self,app_name: Union[str, None] = None, branch: Union[str, None] = None, required:List = []):
def sync(
self,
app_name: Union[str, None] = None,
app_dir: Union[str, None] = None,
branch: Union[str, None] = None,
required: List = []
):
self.initialize_apps()

with open(self.bench.apps_txt, "w") as f:
f.write("\n".join(self.apps))
self.update_apps_states(app_name, branch, required)

self.update_apps_states(
app_name=app_name,
app_dir=app_dir,
branch=branch,
required=required
)

def initialize_apps(self):
is_installed = lambda app: app in installed_packages
Expand Down

0 comments on commit 7980709

Please sign in to comment.