Skip to content

Commit 859e6a6

Browse files
author
Xing Han Lu
authored
Pre v0.0.4 - Slightly reframing Python Environment section (#22)
* Slightly reframing Python Environment section * Bump version number * Update changelog
1 parent 5dd3238 commit 859e6a6

8 files changed

+35
-11
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dashVtk
22
Title: React based declarative usage of vtk.js for Dash
3-
Version: 0.0.3
3+
Version: 0.0.4
44
Description: React based declarative usage of vtk.js for Dash
55
Depends: R (>= 3.0.2)
66
Imports:

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "DashVtk"
33
uuid = "1b08a953-4be3-4667-9a23-818b1eccd4c7"
44
authors = ["Kitware Inc <[email protected]> and Plotly Technologies <[email protected]>"]
5-
version = "0.0.3"
5+
version = "0.0.4"
66

77
[deps]
88
Dash = "1b08a953-4be3-4667-9a23-3db579824955"

R/internal.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.dashVtk_js_metadata <- function() {
22
deps_metadata <- list(`dash_vtk` = structure(list(name = "dash_vtk",
3-
version = "0.0.3", src = list(href = NULL,
3+
version = "0.0.4", src = list(href = NULL,
44
file = "deps"), meta = NULL,
55
script = 'dash_vtk.min.js',
66
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashVtk",
77
all_files = FALSE), class = "html_dependency"),
88
`dash_vtk` = structure(list(name = "dash_vtk",
9-
version = "0.0.3", src = list(href = NULL,
9+
version = "0.0.4", src = list(href = NULL,
1010
file = "deps"), meta = NULL,
1111
script = 'dash_vtk.min.js.map',
1212
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashVtk",

README.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,27 @@ python app.py
112112

113113
Depending on your Python environment, you may run into deployment issue related to the vtk version that get pulled in.
114114

115-
Ideally we want a version of vtk equal or newer than 9. When using such version of VTK, dash-vtk won't even try to load the rendering module of VTK and if OpenGL is not available on your system everything will still be fine.
115+
Ideally we want a version of vtk equal or newer than 9. When using such version of VTK, `dash-vtk` won't even try to load the rendering module of VTK and if OpenGL is not available on your system everything will still be fine.
116116

117-
On the other hand, if you are running Python 3.6 or less and you don't upgrade your pip version you will get vtk 8. With vtk 8, there is no way to prevent the loading of the GL library which means that you will have to install libGL on your system. The way [Heroku](https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt) and [dash-enterprise](https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-vtk-explorer/apt-packages) handle it is slightly different but technically you will have to install `libgl1-mesa-glx` via some `apt` infrastructure.
117+
On the other hand, if you are running python-3.6 and/or pip-18 or less and you don't upgrade your pip version, you will only be able to use `vtk<=8.1.2`. With vtk 8, there is no way to prevent the loading of the GL library which means that you will have to install libGL on your system, or you will run into errors like this:
118+
119+
```
120+
File ".../python/lib/python3.6/site-packages/vtkmodules/all.py", line 29, in <module>
121+
from .vtkRenderingOpenGL2 import *
122+
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
123+
[2021-02-08 18:36:15 +0000] [10] [INFO] Worker exiting (pid: 10)
124+
```
125+
126+
or this:
127+
```
128+
File ".../python3.7/site-packages/vtk/__init__.py", line 12, in <module>
129+
from .vtkOpenGLKit import *
130+
File ".../python3.7/site-packages/vtk/vtkOpenGLKit.py", line 9, in <module>
131+
from vtkOpenGLKitPython import *
132+
ModuleNotFoundError: No module named 'vtkOpenGLKitPython'
133+
```
134+
135+
Heroku and Dash Enterprise handle it is slightly different because you will have to install `libgl1-mesa-glx` via some `apt` files. In the case of Heroku, you will have to use a [buildpack](https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt) and add `libgl1-mesa-glx` to a `Aptfile` located in the root of your project. In the case of Dash Enterprise, you do not need to change the buildpack (it is handled automatically) but you will need to add `libgl1-mesa-glx` to a `apt-packages` file instead of `Aptfile`; see [this app](https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-vtk-explorer/apt-packages) as an example.
118136

119137
## References
120138

dash_vtk/package-info.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash_vtk",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "React based declarative usage of vtk.js for Dash",
55
"repository": {
66
"type": "git",

docs/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.0.4] - 2021-02-08
10+
11+
### Changed
12+
* Added section about deployment in `README.md`
13+
* `dash_vtk.utils`: Will try to import `vtkmodules` (`>=9.0.1`) before falling back to `vtk` (`<=8.1.2`) to avoid requiring `libGL`.
14+
915
## [0.0.3] - 2021-02-04
1016

1117
### Changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash_vtk",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "React based declarative usage of vtk.js for Dash",
55
"repository": {
66
"type": "git",

src/DashVtk.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module DashVtk
33
using Dash
44

55
const resources_path = realpath(joinpath( @__DIR__, "..", "deps"))
6-
const version = "0.0.3"
6+
const version = "0.0.4"
77

88
include("vtk_algorithm.jl")
99
include("vtk_calculator.jl")
@@ -34,14 +34,14 @@ function __init__()
3434
[
3535
DashBase.Resource(
3636
relative_package_path = "dash_vtk.min.js",
37-
external_url = "https://unpkg.com/[email protected].3/dash_vtk/dash_vtk.min.js",
37+
external_url = "https://unpkg.com/[email protected].4/dash_vtk/dash_vtk.min.js",
3838
dynamic = nothing,
3939
async = nothing,
4040
type = :js
4141
),
4242
DashBase.Resource(
4343
relative_package_path = "dash_vtk.min.js.map",
44-
external_url = "https://unpkg.com/[email protected].3/dash_vtk/dash_vtk.min.js.map",
44+
external_url = "https://unpkg.com/[email protected].4/dash_vtk/dash_vtk.min.js.map",
4545
dynamic = true,
4646
async = nothing,
4747
type = :js

0 commit comments

Comments
 (0)