Skip to content

Commit

Permalink
annofab v0.132.0 にバージョンアップしました。 (#402)
Browse files Browse the repository at this point in the history
* update swagger

* add

* poetry update

* format

* version up

* annofab v0.132.0の追加
  • Loading branch information
yuji38kwmt committed Jan 18, 2022
1 parent c4447db commit 62f80e1
Show file tree
Hide file tree
Showing 8 changed files with 211 additions and 112 deletions.
4 changes: 2 additions & 2 deletions annofabapi/dataclass/annotation_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class LabelV1(DataClassJsonMixin):
""""""

allow_out_of_image_bounds: Optional[bool]
""""""
"""枠内制御がなくなったため値の設定は出来ません。値の取得では、必ず`true`が入ります。[廃止](/docs/releases/deprecation-announcements.html#notice25)までは互換性のため残されています。 """

metadata: Optional[Dict[str, str]]
"""ユーザーが自由に登録できるkey-value型のメタデータです。 """
Expand Down Expand Up @@ -347,7 +347,7 @@ class LabelV2(DataClassJsonMixin):
""""""

allow_out_of_image_bounds: Optional[bool]
""""""
"""枠内制御がなくなったため値の設定は出来ません。値の取得では、必ず`true`が入ります。[廃止](/docs/releases/deprecation-announcements.html#notice25)までは互換性のため残されています。 """

metadata: Optional[Dict[str, str]]
"""ユーザーが自由に登録できるkey-value型のメタデータです。 """
Expand Down
39 changes: 37 additions & 2 deletions annofabapi/generated_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def _request_wrapper(
query_params: Optional[Dict[str, Any]] = None,
header_params: Optional[Dict[str, Any]] = None,
request_body: Optional[Any] = None,
raise_for_status: bool = True,
) -> Tuple[Any, requests.Response]:
pass

Expand Down Expand Up @@ -1411,6 +1410,7 @@ def update_organization(self, request_body: Optional[Any] = None, **kwargs) -> T
"""組織名変更
https://annofab.com/docs/api/#operation/updateOrganization
.. deprecated:: X
authorizations: OrganizationOwner
Expand All @@ -1419,13 +1419,18 @@ def update_organization(self, request_body: Optional[Any] = None, **kwargs) -> T
Args:
request_body (Any): Request Body
put_organization_name_request (PutOrganizationNameRequest): (required)
update_organization_name_request (UpdateOrganizationNameRequest): (required)
Returns:
Tuple[Organization, requests.Response]
"""
warnings.warn(
"annofabapi.AnnofabApi.update_organization() is deprecated and will be removed.",
FutureWarning,
stacklevel=2,
)
url_path = f"/my/organizations"
http_method = "PUT"
keyword_params: Dict[str, Any] = {
Expand Down Expand Up @@ -1576,6 +1581,36 @@ def get_projects_of_organization(
keyword_params.update(**kwargs)
return self._request_wrapper(http_method, url_path, **keyword_params)

def put_organization(
self, organization_name: str, request_body: Optional[Any] = None, **kwargs
) -> Tuple[Any, requests.Response]:
"""組織情報更新
https://annofab.com/docs/api/#operation/putOrganization
authorizations: OrganizationOwner
同じ name の組織が既に存在する場合は失敗(400)します。
Args:
organization_name (str): 組織名。組織名を変更する場合は現在の組織名と異なる値を指定します。 同じ名前の組織が既に存在する場合は失敗(400)します。 (required)
request_body (Any): Request Body
put_organization_request (PutOrganizationRequest): (required)
Returns:
Tuple[Organization, requests.Response]
"""
url_path = f"/organizations/{organization_name}"
http_method = "PUT"
keyword_params: Dict[str, Any] = {
"request_body": request_body,
}
keyword_params.update(**kwargs)
return self._request_wrapper(http_method, url_path, **keyword_params)

#########################################
# Public Method : AfOrganizationInputApi
# NOTE: This method is auto generated by OpenAPI Generator
Expand Down
61 changes: 30 additions & 31 deletions annofabapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,7 @@ class JobStatus(Enum):
* annotation_editor_feature: AnnotationEditorFeature
* allow_out_of_image_bounds: bool
枠内制御がなくなったため値の設定は出来ません。値の取得では、必ず`true`が入ります。[廃止](/docs/releases/deprecation-announcements.html#notice25)までは互換性のため残されています。
* metadata: dict(str, str)
ユーザーが自由に登録できるkey-value型のメタデータです。
Expand Down Expand Up @@ -2450,7 +2450,7 @@ class JobStatus(Enum):
* annotation_editor_feature: AnnotationEditorFeature
* allow_out_of_image_bounds: bool
枠内制御がなくなったため値の設定は出来ません。値の取得では、必ず`true`が入ります。[廃止](/docs/releases/deprecation-announcements.html#notice25)までは互換性のため残されています。
* metadata: dict(str, str)
ユーザーが自由に登録できるkey-value型のメタデータです。
Expand Down Expand Up @@ -2874,21 +2874,6 @@ class OrganizationMemberStatus(Enum):
* price_plan: PricePlan
"""

OutOfImageBounds = Dict[str, Any]
"""
画像範囲外にアノテーションがはみ出しているエラー
Kyes of Dict
* label_id: str
* annotation_id: str
* type: str
OutOfImageBounds
"""

OverlappedRangeAnnotation = Dict[str, Any]
Expand Down Expand Up @@ -3277,7 +3262,7 @@ class PricePlan(Enum):
「アノテーション」をコピーするかどうかを指定します。 この属性の値を true とする場合、他の属性の値を必ず次のように指定してください。 * copy_inputs の値を true とする * copy_tasks の値を true とする
* copy_webhooks: bool
「Webhook」をコピーするかどうかを指定します。
* copy_supplementaly_data: bool
* copy_supplementary_data: bool
「補助情報」をコピーするかどうかを指定します。 この属性の値を true とする場合、他の属性の値を必ず次のように指定してください。 * copy_inputs の値を true とする
* copy_instructions: bool
「作業ガイド」をコピーするかどうかを指定します。
Expand Down Expand Up @@ -3483,6 +3468,7 @@ class ProjectStatus(Enum):

ACTIVE = "active"
SUSPENDED = "suspended"
INITIALIZING = "initializing"


ProjectSummary = Dict[str, Any]
Expand Down Expand Up @@ -3616,35 +3602,33 @@ class ProjectStatus(Enum):
"""

PutOrganizationNameRequest = Dict[str, Any]
PutOrganizationPluginRequest = Dict[str, Any]
"""
Kyes of Dict
* organization_id: str
* plugin_name: str
プラグインの名前です。 プラグイン一覧や、プロジェクトで使うプラグインを選ぶときなどに表示されます。
* description: str
プラグインの説明です。 プラグイン一覧や、プロジェクトで使うプラグインを選ぶときなどに表示されます。
* detail: PluginDetail
* organization_name: str
組織名。[値の制約についてはこちら。](#section/API-Convention/APIID)
* last_updated_datetime: str
新規作成時は未指定、更新時は必須(更新前の日時)
"""

PutOrganizationPluginRequest = Dict[str, Any]
PutOrganizationRequest = Dict[str, Any]
"""
Kyes of Dict
* plugin_name: str
プラグインの名前です。 プラグイン一覧や、プロジェクトで使うプラグインを選ぶときなどに表示されます。
* description: str
プラグインの説明です。 プラグイン一覧や、プロジェクトで使うプラグインを選ぶときなどに表示されます。
* detail: PluginDetail
* organization_name: str
組織名。[値の制約についてはこちら。](#section/API-Convention/APIID)
* last_updated_datetime: str
新規作成時は未指定、更新時は必須(更新前の日時)
"""

Expand Down Expand Up @@ -4521,6 +4505,21 @@ class TaskStatus(Enum):
* type: str
UnknownLinkTarget
"""

UpdateOrganizationNameRequest = Dict[str, Any]
"""
Kyes of Dict
* organization_id: str
* organization_name: str
組織名。[値の制約についてはこちら。](#section/API-Convention/APIID)
* last_updated_datetime: str
"""

UserCacheRecord = Dict[str, Any]
Expand Down
4 changes: 3 additions & 1 deletion annofabapi/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,11 @@ def _create_request_body_for_copy_annotation(
task_id: str,
input_data_id: str,
src_details: List[Dict[str, Any]],
account_id: str,
account_id: Optional[str] = None,
annotation_specs_relation: Optional[AnnotationSpecsRelation] = None,
) -> Dict[str, Any]:
if account_id is None:
account_id = self.api.account_id
dest_details: List[Dict[str, Any]] = []

for src_detail in src_details:
Expand Down
38 changes: 20 additions & 18 deletions generate/swagger/swagger-api-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,18 @@ components:
format: email
price_plan:
$ref: "#/components/schemas/PricePlan"
PutOrganizationNameRequest:
PutOrganizationRequest:
type: object
required:
- organization_name
- last_updated_datetime
properties:
organization_name:
$ref: "#/components/schemas/OrganizationName"
last_updated_datetime:
type: string
format: date-time
UpdateOrganizationNameRequest:
type: object
required:
- organization_id
Expand Down Expand Up @@ -1148,6 +1159,7 @@ components:
enum:
- active
- suspended
- initializing
description: |
プロジェクトの状態
* `active` - プロジェクトが進行中
Expand Down Expand Up @@ -1650,7 +1662,7 @@ components:
description: |
「Webhook」をコピーするかどうかを指定します。
default: false
copy_supplementaly_data:
copy_supplementary_data:
type: boolean
description: |
「補助情報」をコピーするかどうかを指定します。
Expand Down Expand Up @@ -2550,7 +2562,9 @@ components:
$ref: "#/components/schemas/AnnotationEditorFeature"
allow_out_of_image_bounds:
type: boolean
default: false
deprecated: true
description: |
枠内制御がなくなったため値の設定は出来ません。値の取得では、必ず`true`が入ります。[廃止](/docs/releases/deprecation-announcements.html#notice25)までは互換性のため残されています。
metadata:
type: object
description: |
Expand Down Expand Up @@ -2638,7 +2652,9 @@ components:
$ref: "#/components/schemas/AnnotationEditorFeature"
allow_out_of_image_bounds:
type: boolean
default: false
deprecated: true
description: |
枠内制御がなくなったため値の設定は出来ません。値の取得では、必ず`true`が入ります。[廃止](/docs/releases/deprecation-announcements.html#notice25)までは互換性のため残されています。
metadata:
type: object
description: |
Expand Down Expand Up @@ -5135,7 +5151,6 @@ components:
- $ref: "#/components/schemas/InvalidChoice"
- $ref: "#/components/schemas/Duplicated"
- $ref: "#/components/schemas/UnknownAdditionalData"
- $ref: "#/components/schemas/OutOfImageBounds"
- $ref: "#/components/schemas/OverlappedRangeAnnotation"
- $ref: "#/components/schemas/UnknownLabel"
discriminator:
Expand All @@ -5149,7 +5164,6 @@ components:
InvalidChoice: "#/components/schemas/InvalidChoice"
Duplicated: "#/components/schemas/Duplicated"
UnknownAdditionalData: "#/components/schemas/UnknownAdditionalData"
OutOfImageBounds: "#/components/schemas/OutOfImageBounds"
OverlappedRangeAnnotation: "#/components/schemas/OverlappedRangeAnnotation"
UnknownLabel: "#/components/schemas/UnknownLabel"
InvalidAnnotationData:
Expand Down Expand Up @@ -5264,18 +5278,6 @@ components:
type: string
description: UnknownAdditionalData
example: "UnknownAdditionalData"
OutOfImageBounds:
type: object
description: 画像範囲外にアノテーションがはみ出しているエラー
properties:
label_id:
type: string
annotation_id:
type: string
_type:
type: string
description: OutOfImageBounds
example: "OutOfImageBounds"
OverlappedRangeAnnotation:
type: object
description: 区間が重複しているアノテーションが存在している場合に発生するエラー
Expand Down
2 changes: 1 addition & 1 deletion generate/swagger/swagger.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ info:
上記例 `account_id_count` は、タスクのフィールド `account_id` でタスクを分類したところ「`account_id` が `c5eee002` であるタスクが9件、`9f110e48` であるタスクが5件、`b25dfeb3` であるタスクが1件」だったという結果を表しています。
version: 0.131.0
version: 0.132.0
title: AnnoFab Web API
x-logo:
url: "https://annofab.com/resource/images/logo_landscape.png"
Expand Down

0 comments on commit 62f80e1

Please sign in to comment.