Skip to content

Commit 6473419

Browse files
authored
AnnoFab v0.123.0に対応 (#364)
* update v0.123.0 * 統計API * versionup
1 parent d973218 commit 6473419

File tree

9 files changed

+25
-11
lines changed

9 files changed

+25
-11
lines changed

annofabapi/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.48.1"
1+
__version__ = "0.48.2"

annofabapi/dataclass/my.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class MyAccount(DataClassJsonMixin):
7979
""""""
8080

8181
is_external_account: bool
82-
"""[外部アカウント連携](/docs/faq/#mpl0n7)済みのアカウントである場合true """
82+
"""[外部アカウントだけで作成したアカウント](/docs/faq/#v1u344)の場合true。 外部アカウント連携していないAnnoFabアカウントや、後から[外部アカウントとの紐付け](/docs/faq/#yyyub0)をしたAnnoFabアカウントの場合false。 """
8383

8484
updated_datetime: Optional[str]
8585
""""""

annofabapi/generated_api.py

+1
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ def get_annotation_list(
373373
page (int): 検索結果のうち、取得したいページの番号(1始まり)
374374
limit (int): 1ページあたりの取得するデータ件数
375375
aggregate_by_task_and_input (bool): trueを指定した場合に「タスクIDと入力IDの組」ごとに検索結果を集計するようにする。
376+
no_aggregate_label_and_input (bool): trueを指定した場合、ラベルIDによるアノテーション検索数の集約結果、および属性IDによるアノテーション検索数の集約結果を取得しなくなります。 集約計算は時間がかかる処理であるため、アノテーション件数が多い場合はアノテーション検索が遅くなる場合がありますが、 このパラメーターをtrueに指定することで集約計算をおこなわなくなるため、アノテーション検索が速くなる可能性があります。
376377
query (str): 絞り込み条件([AnnotationQuery](#section/AnnotationQuery))をJSON形式で表した文字列。
377378
sort (str): ソート順の指定。 使用可能キーはtask_id, input_data_id, detail.annotation_id, detail.account_id, detail.label_id, detail.data_holding_type, detail.created_datetime, detail.updated_datetimeのいずれかです。降順指定時は先頭に-(ハイフン)を付与します。 複数指定時は,(カンマ)区切りで列挙します。複数キーを列挙した場合は、先頭から優先順位を割り振られます。
378379

annofabapi/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
* authority: AccountAuthority
198198
199199
* is_external_account: bool
200-
[外部アカウント連携](/docs/faq/#mpl0n7)済みのアカウントである場合true
200+
[外部アカウントだけで作成したアカウント](/docs/faq/#v1u344)の場合true。 外部アカウント連携していないAnnoFabアカウントや、後から[外部アカウントとの紐付け](/docs/faq/#yyyub0)をしたAnnoFabアカウントの場合false。
201201
* updated_datetime: str
202202
203203
@@ -2561,7 +2561,7 @@ class JobStatus(Enum):
25612561
* authority: AccountAuthority
25622562
25632563
* is_external_account: bool
2564-
[外部アカウント連携](/docs/faq/#mpl0n7)済みのアカウントである場合true
2564+
[外部アカウントだけで作成したアカウント](/docs/faq/#v1u344)の場合true。 外部アカウント連携していないAnnoFabアカウントや、後から[外部アカウントとの紐付け](/docs/faq/#yyyub0)をしたAnnoFabアカウントの場合false。
25652565
* updated_datetime: str
25662566
25672567
* reset_requested_email: str

annofabapi/wrapper.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -991,8 +991,8 @@ def _request_location_header_url(self, response: requests.Response) -> Optional[
991991

992992
response.encoding = "utf-8"
993993
_raise_for_status(response)
994-
content = self.api._response_to_content(response)
995-
return content
994+
# Locationヘッダに記載されているURLの中身はJSONであること前提
995+
return response.json()
996996

997997
def get_task_statistics(self, project_id: str) -> List[Any]:
998998
"""

generate/swagger/swagger-api-components.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,9 @@ components:
526526
is_external_account:
527527
type: boolean
528528
description: |
529-
[外部アカウント連携](/docs/faq/#mpl0n7)済みのアカウントである場合true
529+
[外部アカウントだけで作成したアカウント](/docs/faq/#v1u344)の場合true。
530+
531+
外部アカウント連携していないAnnoFabアカウントや、後から[外部アカウントとの紐付け](/docs/faq/#yyyub0)をしたAnnoFabアカウントの場合false。
530532
updated_datetime:
531533
type: string
532534
format: date-time
@@ -1494,7 +1496,7 @@ components:
14941496
$ref: "#/components/schemas/WebhookHeader"
14951497
body:
14961498
type: string
1497-
example: '{\"message\": \"{{PROJECT_ID}} is updated at {{COMPLETE_DATETIME}}\"}'
1499+
example: '{"message": "{{PROJECT_ID}} is updated at {{COMPLETE_DATETIME}}"}'
14981500
url:
14991501
type: string
15001502
format: uri

generate/swagger/swagger.v2.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ info:
115115
116116
上記例 `account_id_count` は、タスクのフィールド `account_id` でタスクを分類したところ「`account_id` が `c5eee002` であるタスクが9件、`9f110e48` であるタスクが5件、`b25dfeb3` であるタスクが1件」だったという結果を表しています。
117117
118-
version: 0.121.0
118+
version: 0.123.0
119119
title: AnnoFab Web API
120120
x-logo:
121121
url: "https://annofab.com/resource/images/logo_landscape.png"

generate/swagger/swagger.yaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ info:
116116
上記例 `account_id_count` は、タスクのフィールド `account_id` でタスクを分類したところ「`account_id` が `c5eee002` であるタスクが9件、`9f110e48` であるタスクが5件、`b25dfeb3` であるタスクが1件」だったという結果を表しています。
117117
また、AggregationResultの集約の件数は、合計で10000件以下に制限されており、それを超える件数がある場合は上位10000件が取得されます。もし、省略された部分を取得したい場合は、検索条件を縛って結果に上る集約の数を減らしてください。
118118
119-
version: 0.121.0
119+
version: 0.123.0
120120
title: AnnoFab Web API
121121
x-logo:
122122
url: "https://annofab.com/resource/images/logo_landscape.png"
@@ -4132,6 +4132,17 @@ paths:
41324132
schema:
41334133
type: boolean
41344134
default: false
4135+
- name: no_aggregate_label_and_input
4136+
in: query
4137+
description: |
4138+
trueを指定した場合、ラベルIDによるアノテーション検索数の集約結果、および属性IDによるアノテーション検索数の集約結果を取得しなくなります。
4139+
4140+
集約計算は時間がかかる処理であるため、アノテーション件数が多い場合はアノテーション検索が遅くなる場合がありますが、
4141+
このパラメーターをtrueに指定することで集約計算をおこなわなくなるため、アノテーション検索が速くなる可能性があります。
4142+
required: false
4143+
schema:
4144+
type: boolean
4145+
default: false
41354146
- name: query
41364147
in: query
41374148
description: |

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "annofabapi"
3-
version = "0.48.1"
3+
version = "0.48.2"
44
description = "Python Clinet Library of AnnoFab WebAPI (https://annofab.com/docs/api/)"
55
authors = ["yuji38kwmt"]
66
license = "MIT"

0 commit comments

Comments
 (0)