Downloading of PDFs etc is deferred/lazy
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 50/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 716
- Forks
- 446
- Merge medio
- 8 d 8 h
- PR fusionados (30 d)
- 2
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tableau/server-client-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
tableau/server-client-python#1865 ·
-
in-progress
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
tableau/server-client-python#1829 · 1 comentario ·
-
enhancement gap needs investigation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
tableau/server-client-python#1322 · 1 comentario ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` Abiertohelp wanted Server-Side Enhancement ui-exists
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
tableau/server-client-python#1101 · 3 comentarios ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
tableau/server-client-python#783 · 5 comentarios ·
Todos los issues de tableau/server-client-python
Issues similares
-
link-check link-check:sphinx-theme
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
OpenHands/extensions#626 · 1 comentario ·
-
Change observation tooltip text Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
CSCfi/sd-search-api#39 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100