Skip to content

Add ChatExperimental TaskType #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scaleapi/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "2.15.4"
__version__ = "2.15.5"
__package_name__ = "scaleapi"
1 change: 1 addition & 0 deletions scaleapi/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class TaskType(Enum):
VideoCuboidAnnotation = "videocuboidannotation"
SensorFusion = "sensorfusion"
Chat = "chat"
ChatExperimental = "chatexperimental"


class TaskReviewStatus(Enum):
Expand Down
22 changes: 13 additions & 9 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
ScaleUnauthorized,
)
from scaleapi.tasks import TaskType
from scaleapi.teams import TeammateRole

# from scaleapi.teams import TeammateRole

TEST_PROJECT_NAME = "scaleapi-python-sdk"

Expand Down Expand Up @@ -483,18 +484,21 @@ def test_files_import():
)


current_timestamp = str(uuid.uuid4)[-9:]
TEST_USER = f"test+{current_timestamp}@scale.com"
# current_timestamp = str(uuid.uuid4)[-9:]
# TEST_USER = f"test+{current_timestamp}@scale.com"


def test_list_teammates():
teammates = client.list_teammates()
assert len(teammates) > 0


def test_invite_teammates():
old_teammates = client.list_teammates()
new_teammates = client.invite_teammates([TEST_USER], TeammateRole.Member)
assert len(new_teammates) >= len(
old_teammates
) # needs to sleep for teammates list to be updated
# def test_invite_teammates():
# old_teammates = client.list_teammates()
# new_teammates = client.invite_teammates(
# [TEST_USER],
# TeammateRole.Member,
# )
# assert len(new_teammates) >= len(
# old_teammates
# ) # needs to sleep for teammates list to be updated