feat: fix pr issues

This commit is contained in:
Eduardo Chiarotti
2024-08-23 09:44:15 -03:00
parent b87bcd25bb
commit 4f266980ef
3 changed files with 31 additions and 24 deletions

View File

@@ -51,7 +51,7 @@ class TokenManager:
if key is not None:
return key
else:
new_key = Fernet.generate_key()
self.save_secure_file(key_filename, new_key)
return new_key

View File

@@ -189,6 +189,12 @@ def signup():
AuthenticationCommand().signup()
@crewai.command()
def login():
"""Sign Up/Login to CrewAI+."""
AuthenticationCommand().signup()
# DEPLOY CREWAI+ COMMANDS
@crewai.group()
def deploy():

View File

@@ -58,7 +58,8 @@ def get_project_name(pyproject_path: str = "pyproject.toml"):
return None
def get_crewai_version(pyproject_path: str = "pyproject.toml") -> str:
def get_crewai_version(pyproject_path: str = "pyproject.toml") -> str:
"""Get the version number of crewai from the pyproject.toml file."""
try:
# Read the pyproject.toml file
@@ -66,9 +67,9 @@ def get_project_name(pyproject_path: str = "pyproject.toml"):
pyproject_content = tomllib.load(f)
# Extract the version number of crewai
crewai_version = pyproject_content["tool"]["poetry"]["dependencies"][
"crewai"
]["version"]
crewai_version = pyproject_content["tool"]["poetry"]["dependencies"]["crewai"][
"version"
]
return crewai_version