Downloading of PDFs etc is deferred/lazy
還沒有人認領這個 Issue。
評估
研究方向
Start at views.populate_pdf and inspect the similar view-population methods mentioned in the issue, along with their tests if present. Trace when the PDF request occurs relative to property access. Done means the PDF is fetched during population, remains available after sign-out or connection closure, and repeated property access does not fetch it again.
由索引模型根據 Issue 內容生成。
描述
Describe the bug
views.populate_pdf and similar methods do not really populate the PDF but instead only populate a getter method which is later used upon property access. This has multiple drawbacks:
- The PDF is loaded multiple times if accessed more than once.
- Access to the PDF is no longer possible after closing the connection to the server
- Parallelizing the PDF fetching is really hard and unintuitive as the action does not happen where it should be but only later as a side effect of accessing the property. Property access should be as fast as possible and synchronous.
- Somewhat related to 3., this makes it impossible to create an asyncio wrapper for this library as property access must be synchronous in Python.
Versions
Details of your environment, including:
- Tableau Server version: Tableau Online
- Python version: 3.10.6
- TSC library version: 0.19.0
To Reproduce
with server.auth.sign_in(tableau_auth):
view = ...
server.views.populate_pdf(view, pdf_req_option)
pathlib.Path("output.pdf").write_bytes(view.pdf)
Results
It raises an error as it cannot receive the PDF any longer.
- 主要語言
- Python
- 星號
- 716
- 分支
- 446
- 平均合併
- 8 天 8 小時
- 30 天內合併 PR
- 2
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
tableau/server-client-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
tableau/server-client-python#1865 ·
-
in-progress
難度 2/5 1-3 小時 新手友好度 78/100
tableau/server-client-python#1829 · 1 則留言 ·
-
enhancement gap needs investigation
難度 2/5 1-3 小時 新手友好度 68/100
tableau/server-client-python#1322 · 1 則留言 ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` 未關閉help wanted Server-Side Enhancement ui-exists
難度 2/5 1-3 小時 新手友好度 68/100
tableau/server-client-python#1101 · 3 則留言 ·
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 68/100
tableau/server-client-python#783 · 5 則留言 ·
查看 tableau/server-client-python 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
難度 2/5 1-3 小時 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 1/5 1 小時以內 新手友好度 80/100
learningequality/kolibri#15351 · 2 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
Name consistency 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
eellak/triplestore#65 · 1 則留言 ·