Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
enum bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
okedeji committed Apr 23, 2024
1 parent f594629 commit 6ce1f54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions allocmd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def generate():
def worker(environment, name=None, topic=None):
"""Initialize your Allora Worker Node with necessary boilerplates"""

blocklessNode(environment, env, BlocklessNodeType.worker, name, topic)
blocklessNode(environment, env, BlocklessNodeType.worker.name, name, topic)

@generate.command()
@click.option('--env', 'environment', required=True, type=click.Choice(['dev', 'prod']), help='Environment to generate for')
Expand All @@ -38,7 +38,7 @@ def worker(environment, name=None, topic=None):
def reputer(environment, name=None, topic=None):
"""Initialize your Allora Reputer Node with necessary boilerplates"""

blocklessNode(environment, env, BlocklessNodeType.reputer, name, topic)
blocklessNode(environment, env, BlocklessNodeType.reputer.name, name, topic)


@generate.command()
Expand Down
2 changes: 1 addition & 1 deletion allocmd/utilities/constants.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cliVersion = "0.3.10"
cliVersion = "0.3.11"
12 changes: 6 additions & 6 deletions allocmd/utilities/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import re
import yaml

def create_worker_account(worker_name, faucet_url, type:BlocklessNodeType):
def create_worker_account(worker_name, faucet_url, type):
current_file_dir = os.path.dirname(os.path.abspath(__file__))
cli_tool_dir = os.path.dirname(current_file_dir)
allora_chain_dir = os.path.join(cli_tool_dir, 'allora-chain')
Expand Down Expand Up @@ -120,7 +120,7 @@ def generate_all_files(env: Environment, file_configs, command: Command, name =
if command == Command.INIT:
cprint("\nAll files bootstrapped successfully. ALLORA!!!", 'green', attrs=['bold'])

def run_key_generate_command(worker_name, type:BlocklessNodeType):
def run_key_generate_command(worker_name, type):
command = (
f'docker run -it --entrypoint=bash -v "$(pwd)/{worker_name}/data":/data '
'alloranetwork/allora-inference-base:latest '
Expand All @@ -136,7 +136,7 @@ def run_key_generate_command(worker_name, type:BlocklessNodeType):
except subprocess.CalledProcessError as e:
click.echo(f"error generating local {type} identity: {e}", err=True)

def generateWorkerAccount(worker_name, type:BlocklessNodeType):
def generateWorkerAccount(worker_name, type):
config_path = os.path.join(os.getcwd(), worker_name, 'config.yaml')
try:
with open(config_path, 'r') as file:
Expand All @@ -162,7 +162,7 @@ def generateWorkerAccount(worker_name, type:BlocklessNodeType):
with open(config_path, 'w') as file:
yaml.safe_dump(config, file)

def generateProdCompose(env: Environment, type:BlocklessNodeType):
def generateProdCompose(env: Environment, type):
"""Deploy resource production kubernetes cluster"""

subprocess.run("mkdir -p ./data/scripts", shell=True, check=True)
Expand Down Expand Up @@ -215,7 +215,7 @@ def generateProdCompose(env: Environment, type:BlocklessNodeType):
cprint(f"please run chmod -R +rx ./data/scripts to grant script access to the image", 'yellow')


def blocklessNode(environment, env, type:BlocklessNodeType, name=None, topic=None):
def blocklessNode(environment, env, type, name=None, topic=None):
"""Initialize your Allora Worker Node with necessary boilerplates"""

if not check_docker_running():
Expand Down Expand Up @@ -288,7 +288,7 @@ def blocklessNode(environment, env, type:BlocklessNodeType, name=None, topic=Non
if not os.path.exists(devComposePath):
cprint(f"You must initialize the {type} on dev please run allocmd generate {type} --env dev --name <{type} name> --topic <topic id> and then run the prod generate in the directory created", 'red')
else:
generateProdCompose(env)
generateProdCompose(env, type)



Expand Down

0 comments on commit 6ce1f54

Please sign in to comment.