Skip to content

Commit ec1bbc3

Browse files
author
Richard Sun
committed
[QQC-486] Review feedback
1 parent 1822f99 commit ec1bbc3

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

CONTRIB.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ variable. For more info see [Labelbox API key docs](https://labelbox.helpdocs.io
3939
To pass tests, code must be formatted using the following command:
4040

4141
```shell
42-
yapf labelbox -i --verbose --recursive --parallel --style "google"
42+
yapf tests/* -i --verbose --recursive --parallel --style "google"
43+
yapf labelbox/* -i --verbose --recursive --parallel --style "google"
4344
```
4445

4546
## Release Steps

labelbox/schema/project.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -615,14 +615,12 @@ def create_batch(self, name: str, data_rows: List[str], priority: int = 5):
615615
res['size'] = len(dr_ids)
616616
return Entity.Batch(self.client, self.uid, res)
617617

618-
def _update_queue_mode(self,
619-
mode: "QueueMode") -> "QueueMode":
620-
618+
def _update_queue_mode(self, mode: "QueueMode") -> "QueueMode":
621619
"""
622620
Updates the queueing mode of this project.
623621
624-
This method is deprecated. Going forward, projects must go through a
625-
migration to have the queue mode changed. Users should specify the
622+
Deprecation notice: This method is deprecated. Going forward, projects must
623+
go through a migration to have the queue mode changed. Users should specify the
626624
queue mode for a project during creation if a non-default mode is desired.
627625
628626
Args:
@@ -632,6 +630,10 @@ def _update_queue_mode(self,
632630
633631
"""
634632

633+
logger.warning(
634+
"Updating the queue_mode for a project will soon no longer be supported."
635+
)
636+
635637
if self.queue_mode == mode:
636638
return mode
637639

@@ -661,16 +663,20 @@ def _update_queue_mode(self,
661663

662664
def get_queue_mode(self) -> "QueueMode":
663665
"""
664-
Provides the status of if queue mode is enabled in the project.
666+
Provides the queue mode used for this project.
665667
666-
This method is deprecated and will be removed in a future version. To obtain
667-
the queue mode of a project, simply refer to the queue_mode attribute of a
668-
Project.
668+
Deprecation notice: This method is deprecated and will be removed in
669+
a future version. To obtain the queue mode of a project, simply refer
670+
to the queue_mode attribute of a Project.
669671
670672
Returns: the QueueMode for this project
671673
672674
"""
673675

676+
logger.warning(
677+
"Obtaining the queue_mode for a project through this method will soon"
678+
" no longer be supported.")
679+
674680
query_str = """query %s($projectId: ID!) {
675681
project(where: {id: $projectId}) {
676682
tagSetStatus

tests/integration/test_project.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ def test_project(client, rand_gen):
1515
for o in before:
1616
assert isinstance(o, Project)
1717

18-
data = {"name": rand_gen(str), "description": rand_gen(str), "queue_mode": QueueMode.Dataset}
18+
data = {
19+
"name": rand_gen(str),
20+
"description": rand_gen(str),
21+
"queue_mode": QueueMode.Dataset
22+
}
1923
project = client.create_project(**data)
2024
assert project.name == data["name"]
2125
assert project.description == data["description"]

0 commit comments

Comments
 (0)