Skip to content

Commit 5d48d93

Browse files
authored
Sphinxのバージョンをv0.8に変更しました。 (#670)
* update pyproject toml * update docstring * update * publishできるようにする * format * update requests.txt
1 parent 858f6a0 commit 5d48d93

File tree

10 files changed

+145
-165
lines changed

10 files changed

+145
-165
lines changed

.github/workflows/publish-to-pypi.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ jobs:
99
name: Build and publish Python 🐍 distributions 📦 to PyPI
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- name: Set up Python 3.10
14-
uses: actions/setup-python@v4
12+
- uses: actions/checkout@v4
13+
- name: Set up Python 3.12
14+
uses: actions/setup-python@v5
1515
with:
16-
python-version: "3.10"
16+
python-version: "3.12"
1717
- name: Install poetry
1818
run: |
19-
python -m pip install "poetry<1.7" poetry-dynamic-versioning
19+
python -m pip install "poetry<1.9"
20+
poetry install --only publish
2021
- name: Publish
2122
env:
2223
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

annofabapi/api.py

-2
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,8 @@ def __init__(
257257
self.url_prefix = f"{endpoint_url}/api/v1"
258258
self.session = requests.Session()
259259

260-
#: login, refresh_tokenで取得したtoken情報
261260
self.token_dict: Optional[Dict[str, Any]] = None
262261

263-
#: Signed Cookie情報
264262
self.cookies: Optional[RequestsCookieJar] = None
265263

266264
self.__account_id: Optional[str] = None

annofabapi/api2.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ class AnnofabApi2(AbstractAnnofabApi2):
2929
Args:
3030
api: API v1のインスタンス(一部のAPIは、v1のログインメソッドを利用するため)
3131
32+
Attributes:
33+
cookies: Signed Cookie情報
34+
3235
"""
3336

3437
def __init__(self, api: AnnofabApi) -> None:
3538
self.api = api
3639
self.url_prefix = f"{api.endpoint_url}/api/v2"
3740

38-
#: Signed Cookie情報
3941
cookies: Optional[RequestsCookieJar] = None
4042

4143
#########################################

annofabapi/resource.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,22 @@ class Resource:
2121
endpoint_url: Annofab APIのエンドポイント。
2222
input_mfa_code_via_stdin: MFAコードを標準入力から入力するかどうか
2323
24+
Attributes:
25+
api: ``annofabapi.AnnofabApi`` のインスタンス
26+
wrapper: ``annofabapi.Wrapper`` のインスタンス
27+
api2: ``annofabapi.AnnofabApi2`` のインスタンス
28+
2429
"""
2530

2631
def __init__(
2732
self, login_user_id: str, login_password: str, *, endpoint_url: str = DEFAULT_ENDPOINT_URL, input_mfa_code_via_stdin: bool = False
2833
) -> None:
29-
#: AnnofabApi Instance
3034
self.api = AnnofabApi(
3135
login_user_id=login_user_id, login_password=login_password, endpoint_url=endpoint_url, input_mfa_code_via_stdin=input_mfa_code_via_stdin
3236
)
3337

34-
#: Wrapper Instance
3538
self.wrapper = Wrapper(self.api)
3639

37-
#: AnnofabApi2 Instance
3840
self.api2 = AnnofabApi2(self.api)
3941

4042
logger.debug("Create annofabapi resource instance :: %s", {"login_user_id": login_user_id, "endpoint_url": endpoint_url})

docs/api_reference/dataclass.rst

-25
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,11 @@ annofabapi.dataclass.input module
1717
:members:
1818

1919

20-
annofabapi.dataclass.inspection module
21-
--------------------------------------
22-
.. automodule:: annofabapi.dataclass.inspection
23-
:members:
24-
25-
annofabapi.dataclass.instruction module
26-
---------------------------------------
27-
.. automodule:: annofabapi.dataclass.instruction
28-
:members:
29-
3020
annofabapi.dataclass.job module
3121
-------------------------------
3222
.. automodule:: annofabapi.dataclass.job
3323
:members:
3424

35-
annofabapi.dataclass.my module
36-
------------------------------
37-
.. automodule:: annofabapi.dataclass.my
38-
:members:
39-
4025
annofabapi.dataclass.organization module
4126
----------------------------------------
4227
.. automodule:: annofabapi.dataclass.organization
@@ -61,11 +46,6 @@ annofabapi.dataclass.project_member module
6146
:members:
6247

6348

64-
annofabapi.dataclass.statistics module
65-
--------------------------------------
66-
.. automodule:: annofabapi.dataclass.statistics
67-
:members:
68-
6949
annofabapi.dataclass.supplementary module
7050
-----------------------------------------
7151
.. automodule:: annofabapi.dataclass.supplementary
@@ -77,8 +57,3 @@ annofabapi.dataclass.task module
7757
.. automodule:: annofabapi.dataclass.task
7858
:members:
7959

80-
annofabapi.dataclass.webhook module
81-
-----------------------------------
82-
.. automodule:: annofabapi.dataclass.webhook
83-
:members:
84-

docs/api_reference/segmentation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
annofabapi.segmentation module
2-
=========================
2+
==================================================
33

44

55
.. automodule:: annofabapi.segmentation

docs/conf.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
# add these directories to sys.path here. If the directory is relative to the
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
13-
# import os
14-
# import sys
15-
# sys.path.insert(0, os.path.abspath('.'))
16-
13+
import os
14+
import sys
15+
sys.path.insert(0, os.path.abspath('../'))
1716

1817
# -- Project information -----------------------------------------------------
1918

@@ -54,7 +53,6 @@
5453
html_theme_options = {
5554
"github_url": "https://github.com/kurusugawa-computer/annofab-api-python-client",
5655
"use_edit_page_button": True,
57-
"footer_items": [], # footerを空にする
5856
}
5957

6058
html_logo = "img/logo_landscape.png"

docs/requirements.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
sphinx==6.1.3
2-
pydata-sphinx-theme==0.13.3
1+
Sphinx==8.0.2
2+
pydata-sphinx-theme==0.15.4
3+
34

45

0 commit comments

Comments
 (0)