Skip to content

Commit

Permalink
Annofab v0.162.0に対応する (#541)
Browse files Browse the repository at this point in the history
* update swagger

* update generate sh

* update sh

* updatet api

* dataclassの追加

* annotation

* 削除

* データクラスを削除

* poetry update

* update travis

* update_status_of_inspections の削除

* format

* update poetry
  • Loading branch information
yuji38kwmt committed Jan 27, 2023
1 parent 5047eff commit d744126
Show file tree
Hide file tree
Showing 21 changed files with 1,222 additions and 1,118 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ python:
- "3.8"
- "3.9"
- "3.10"
- "3.11-dev"
- "3.11"

install:
- pip install pip --upgrade
- pip install "poetry<1.2"
- travis_retry poetry install

script:
- make lint
- pytest tests/test_local*.py

branches:
only:
- main

env:
- PIP_DEFAULT_TIMEOUT=100

cache: pip

2 changes: 1 addition & 1 deletion annofabapi/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.67.1"
__version__ = "0.68.0"
79 changes: 65 additions & 14 deletions annofabapi/dataclass/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
FullAnnotationAdditionalDataValue = Dict[str, Any]
AnnotationDetailV2Input = Dict[str, Any]
AnnotationDetailContentOutput = Dict[str, Any]

AnnotationType = str


AnnotationDetailContentInput = Dict[str, Any]
AnnotationDetailV2Output = Dict[str, Any]

Expand Down Expand Up @@ -147,6 +150,17 @@ class AdditionalDataV1(DataClassJsonMixin):
"""選択肢ID。[値の制約についてはこちら。](#section/API-Convention/APIID) """


@dataclass
class AdditionalDataV2(DataClassJsonMixin):
""" """

definition_id: str
"""属性ID。[値の制約についてはこちら。](#section/API-Convention/APIID) """

value: Optional[AdditionalDataValue]
""""""


@dataclass
class FullAnnotationAdditionalData(DataClassJsonMixin):
"""
Expand Down Expand Up @@ -283,7 +297,7 @@ class SimpleAnnotation(DataClassJsonMixin):


@dataclass
class SingleAnnotationDetail(DataClassJsonMixin):
class SingleAnnotationDetailV1(DataClassJsonMixin):
"""
アノテーション情報
"""
Expand Down Expand Up @@ -320,7 +334,35 @@ class SingleAnnotationDetail(DataClassJsonMixin):


@dataclass
class SingleAnnotation(DataClassJsonMixin):
class SingleAnnotationDetailV2(DataClassJsonMixin):
"""
アノテーション情報
"""

annotation_id: str
"""アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。 """

account_id: str
"""アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID) """

label_id: str
"""ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID) """

body: AnnotationDetailContentOutput
""""""

additional_data_list: List[AdditionalDataV2]
""""""

created_datetime: str
"""作成日時"""

updated_datetime: str
"""更新日時"""


@dataclass
class SingleAnnotationV1(DataClassJsonMixin):
""" """

project_id: str
Expand All @@ -332,7 +374,27 @@ class SingleAnnotation(DataClassJsonMixin):
input_data_id: str
"""入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) """

detail: SingleAnnotationDetail
detail: SingleAnnotationDetailV1
""""""

updated_datetime: str
"""更新日時"""


@dataclass
class SingleAnnotationV2(DataClassJsonMixin):
""" """

project_id: str
"""プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """

task_id: str
"""タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) """

input_data_id: str
"""入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) """

detail: SingleAnnotationDetailV2
""""""

updated_datetime: str
Expand Down Expand Up @@ -400,17 +462,6 @@ class AnnotationV1(DataClassJsonMixin):
"""更新日時"""


@dataclass
class AdditionalDataV2(DataClassJsonMixin):
""" """

definition_id: str
"""属性ID。[値の制約についてはこちら。](#section/API-Convention/APIID) """

value: Optional[AdditionalDataValue]
""""""


@dataclass
class AnnotationPropsForEditor(DataClassJsonMixin):
"""
Expand Down
6 changes: 0 additions & 6 deletions annofabapi/dataclass/annotation_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@ class LabelV1(DataClassJsonMixin):
annotation_editor_feature: AnnotationEditorFeature
""""""

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 @@ -527,9 +524,6 @@ class LabelV2(DataClassJsonMixin):
annotation_editor_feature: AnnotationEditorFeature
""""""

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

metadata: Optional[Dict[str, str]]
"""ユーザーが自由に登録できるkey-value型のメタデータです。 """

Expand Down
80 changes: 0 additions & 80 deletions annofabapi/dataclass/inspection.py

This file was deleted.

60 changes: 0 additions & 60 deletions annofabapi/dataclass/instruction.py

This file was deleted.

0 comments on commit d744126

Please sign in to comment.