Downloading of PDFs etc is deferred/lazy

オープン
#1,104 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
api

調査の方向性

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 の本文から書いたものです。

説明

enhancement

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:

  1. The PDF is loaded multiple times if accessed more than once.
  2. Access to the PDF is no longer possible after closing the connection to the server
  3. 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.
  4. 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時間
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tableau/server-client-python のほかの issue

tableau/server-client-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。