Skip to content

Commit

Permalink
Add more TensorBoard web dependencies to build
Browse files Browse the repository at this point in the history
- Polymer web-component-tester and its deps
- weblas for vz-projector
- threejs for vz-projector
- numericjs for vz-project

PiperOrigin-RevId: 155472472
  • Loading branch information
jart authored and tensorflower-gardener committed May 10, 2017
1 parent 557b421 commit 1ece66d
Show file tree
Hide file tree
Showing 13 changed files with 244 additions and 62 deletions.
8 changes: 4 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ workspace(name = "org_tensorflow")

http_archive(
name = "io_bazel_rules_closure",
sha256 = "60fc6977908f999b23ca65698c2bb70213403824a84f7904310b6000d78be9ce",
strip_prefix = "rules_closure-5ca1dab6df9ad02050f7ba4e816407f88690cf7d",
sha256 = "0e38269c55536196c9b0c82a601c683f114901acb6d55f214e0179a3e188ef2a",
strip_prefix = "rules_closure-1762d8e6964b9f383b47a57888e55489d2432b61",
urls = [
"http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz", # 2017-02-03
"https://github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz",
"http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/1762d8e6964b9f383b47a57888e55489d2432b61.tar.gz", # 2017-05-08
"https://github.com/bazelbuild/rules_closure/archive/1762d8e6964b9f383b47a57888e55489d2432b61.tar.gz",
],
)

Expand Down
6 changes: 2 additions & 4 deletions tensorflow/tensorboard/components/tf_imports/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ webfiles(

webfiles(
name = "lodash",
srcs = [
"lodash.html",
"@com_lodash",
],
srcs = ["lodash.html"],
path = "/tf-imports",
deps = ["@com_lodash"],
)

webfiles(
Expand Down
9 changes: 3 additions & 6 deletions tensorflow/tensorboard/components/tf_imports/dagre.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
limitations under the License.
-->

<!--
HTML imports are non-blocking thus getting the dependency 'graphlib'
and 'lodash' via script imports instead.
-->
<script src="lodash.js"></script>
<script src="graphlib.core.js"></script>
<link rel="import" href="lodash.html">
<link rel="import" href="graphlib.html">

<script src="dagre.core.js"></script>
3 changes: 2 additions & 1 deletion tensorflow/tensorboard/components/tf_imports/graphlib.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
limitations under the License.
-->

<script src="lodash.js"></script>
<link rel="import" href="lodash.html">

<script src="graphlib.core.js"></script>
2 changes: 1 addition & 1 deletion tensorflow/tensorboard/components/tf_imports/lodash.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
limitations under the License.
-->

<script src="lodash.js"></script>
<script src="../lodash/lodash.js"></script>
32 changes: 29 additions & 3 deletions tensorflow/tensorboard/components/tf_imports_d3v4/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,37 @@ webfiles(

webfiles(
name = "lodash",
srcs = ["lodash.html"],
path = "/tf-imports-d3v4",
deps = ["@com_lodash"],
)

webfiles(
name = "threejs",
srcs = [
"lodash.html",
"@com_lodash",
"threejs.html",
"@org_threejs//:OrbitControls.js",
"@org_threejs//:three.js",
],
path = "/tf-imports-d3v4",
path = "/tf-imports",
)

webfiles(
name = "numericjs",
srcs = [
"numericjs.html",
"@com_numericjs",
],
path = "/tf-imports",
)

webfiles(
name = "weblas",
srcs = [
"weblas.html",
"@io_github_waylonflinn_weblas",
],
path = "/tf-imports",
)

webfiles(
Expand Down
9 changes: 3 additions & 6 deletions tensorflow/tensorboard/components/tf_imports_d3v4/dagre.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
limitations under the License.
-->

<!--
HTML imports are non-blocking thus getting the dependency 'graphlib'
and 'lodash' via script imports instead.
-->
<script src="lodash.js"></script>
<script src="graphlib.core.js"></script>
<link rel="import" href="lodash.html">
<link rel="import" href="graphlib.html">

<script src="dagre.core.js"></script>
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
limitations under the License.
-->

<script src="lodash.js"></script>
<link rel="import" href="lodash.html">

<script src="graphlib.core.js"></script>
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
limitations under the License.
-->

<script src="lodash.js"></script>
<script src="../lodash/lodash.js"></script>
18 changes: 18 additions & 0 deletions tensorflow/tensorboard/components/tf_imports_d3v4/numericjs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
@license
Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<script src="numeric.js"></script>
18 changes: 18 additions & 0 deletions tensorflow/tensorboard/components/tf_imports_d3v4/threejs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
@license
Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<script src="three.js"></script>
18 changes: 18 additions & 0 deletions tensorflow/tensorboard/components/tf_imports_d3v4/weblas.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
@license
Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<script src="weblas.js"></script>
178 changes: 143 additions & 35 deletions tensorflow/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -738,15 +738,17 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
##############################################################################
# TensorBoard JavaScript Production Dependencies

filegroup_external(
webfiles_external(
name = "com_lodash",
licenses = ["notice"], # MIT
sha256_urls = {
"7c7b391810bc08cf815683431857c51b5ee190062ae4f557e1e4689d6dd910ea": [
"http://bazel-mirror.storage.googleapis.com/raw.githubusercontent.com/lodash/lodash/3.8.0/lodash.js",
"https://raw.githubusercontent.com/lodash/lodash/3.8.0/lodash.js",
],
},
sha256 = "0e88207e5f90af4ce8790d6e1e7d09d2702d81bce0bafdc253d18c0a5bf7661e",
urls = [
"http://bazel-mirror.storage.googleapis.com/github.com/lodash/lodash/archive/3.10.1.tar.gz",
"https://github.com/lodash/lodash/archive/3.10.1.tar.gz",
],
strip_prefix = "lodash-3.10.1",
path = "/lodash",
srcs = ["lodash.js"],
)

filegroup_external(
Expand Down Expand Up @@ -870,6 +872,10 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
"http://bazel-mirror.storage.googleapis.com/raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/ebc69904eb78f94030d5d517b42db20867f679c0/mocha/mocha.d.ts",
"https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/ebc69904eb78f94030d5d517b42db20867f679c0/mocha/mocha.d.ts",
],
"513ccd9ee1c708881120eeacd56788fc3b3da8e5c6172b20324cebbe858803fe": [
"http://bazel-mirror.storage.googleapis.com/raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/708609e0764daeb5eb64104af7aca50c520c4e6e/sinon/sinon.d.ts",
"https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/708609e0764daeb5eb64104af7aca50c520c4e6e/sinon/sinon.d.ts",
],
"44eba36339bd1c0792072b7b204ee926fe5ffe1e9e2da916e67ac55548e3668a": [
"http://bazel-mirror.storage.googleapis.com/raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/a872802c0c84ba98ff207d5e673a1fa867c67fd6/polymer/polymer.d.ts",
"https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/a872802c0c84ba98ff207d5e673a1fa867c67fd6/polymer/polymer.d.ts",
Expand Down Expand Up @@ -1205,33 +1211,6 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
},
)

##############################################################################
# TensorBoard JavaScript Testing Dependencies

filegroup_external(
name = "com_chaijs",
# no @license header
licenses = ["notice"], # MIT
sha256_urls = {
"b926b325ad9843bf0b7a6d580ef78bb560e47c484b98680098d4fd9b31b77cd9": [
"http://bazel-mirror.storage.googleapis.com/raw.githubusercontent.com/chaijs/chai/2.3.0/chai.js",
"https://raw.githubusercontent.com/chaijs/chai/2.3.0/chai.js",
],
},
)

filegroup_external(
name = "org_mochajs",
# no @license header
licenses = ["notice"], # MIT
sha256_urls = {
"e36d865a17ffdf5868e55e736526ae30f3d4bc667c85a2a28cd5c850a82361e2": [
"http://bazel-mirror.storage.googleapis.com/raw.githubusercontent.com/mochajs/mocha/2.3.4/mocha.js",
"https://raw.githubusercontent.com/mochajs/mocha/2.3.4/mocha.js",
],
},
)

##############################################################################
# TensorBoard Polymer Dependencies

Expand Down Expand Up @@ -2438,7 +2417,9 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
],
path = "/promise-polyfill",
srcs = [
"Promise.js", "Promise-Statics.js", "promise-polyfill.html",
"Promise.js",
"Promise-Statics.js",
"promise-polyfill.html",
"promise-polyfill-lite.html"
],
deps = ["@org_polymer"],
Expand Down Expand Up @@ -2482,3 +2463,130 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
"webcomponents-lite.min.js",
],
)

##############################################################################
# TensorBoard Testing Dependencies

webfiles_external(
name = "org_npmjs_registry_accessibility_developer_tools",
licenses = ["notice"], # Apache License 2.0
sha256 = "1d6a72f401c9d53f68238c617dd43a05cd85ca5aa2e676a5b3c352711448e093",
urls = [
"http://bazel-mirror.storage.googleapis.com/registry.npmjs.org/accessibility-developer-tools/-/accessibility-developer-tools-2.10.0.tgz",
"https://registry.npmjs.org/accessibility-developer-tools/-/accessibility-developer-tools-2.10.0.tgz",
],
strip_prefix = "package",
path = "/accessibility-developer-tools",
)

webfiles_external(
name = "org_npmjs_registry_async",
licenses = ["notice"], # MIT
sha256 = "08655255ae810bf4d1cb1642df57658fcce823776d3ba8f4b46f4bbff6c87ece",
urls = [
"http://bazel-mirror.storage.googleapis.com/registry.npmjs.org/async/-/async-1.5.0.tgz",
"https://registry.npmjs.org/async/-/async-1.5.0.tgz",
],
strip_prefix = "package",
path = "/async",
)

webfiles_external(
name = "org_npmjs_registry_chai",
licenses = ["notice"], # MIT
sha256 = "aca8137bed5bb295bd7173325b7ad604cd2aeb341d739232b4f9f0b26745be90",
urls = [
"http://bazel-mirror.storage.googleapis.com/registry.npmjs.org/chai/-/chai-3.5.0.tgz",
"https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
],
strip_prefix = "package",
path = "/chai",
)

webfiles_external(
name = "org_npmjs_registry_mocha",
licenses = ["notice"], # MIT
sha256 = "13ef37a071196a2fba680799b906555d3f0ab61e80a7e8f73f93e77914590dd4",
urls = [
"http://bazel-mirror.storage.googleapis.com/registry.npmjs.org/mocha/-/mocha-2.5.3.tgz",
"https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz",
],
suppress = ["strictDependencies"],
strip_prefix = "package",
path = "/mocha",
)

webfiles_external(
name = "org_npmjs_registry_sinon",
licenses = ["notice"], # BSD-3-Clause
sha256 = "49edb057695fc9019aae992bf7e677a07de7c6ce2bf9f9facde4a245045d1532",
urls = [
"http://bazel-mirror.storage.googleapis.com/registry.npmjs.org/sinon/-/sinon-1.17.4.tgz",
"https://registry.npmjs.org/sinon/-/sinon-1.17.4.tgz",
],
strip_prefix = "package/lib",
path = "/sinonjs",
)

webfiles_external(
name = "org_npmjs_registry_sinon_chai",
licenses = ["notice"], # BSD-3-Clause
sha256 = "b85fc56f713832960b56fe9269ee4bb2cd41edd2ceb130b0936e5bdbed5dea63",
urls = [
"http://bazel-mirror.storage.googleapis.com/registry.npmjs.org/sinon-chai/-/sinon-chai-2.8.0.tgz",
"https://registry.npmjs.org/sinon-chai/-/sinon-chai-2.8.0.tgz",
],
strip_prefix = "package",
path = "/sinon-chai",
)

webfiles_external(
name = "org_npmjs_registry_stacky",
licenses = ["notice"], # BSD-3-Clause
sha256 = "c659e60f7957d9d80c23a7aacc4d71b19c6421a08f91174c0062de369595acae",
urls = [
"http://bazel-mirror.storage.googleapis.com/registry.npmjs.org/stacky/-/stacky-1.3.1.tgz",
"https://registry.npmjs.org/stacky/-/stacky-1.3.1.tgz",
],
strip_prefix = "package",
path = "/stacky",
)

webfiles_external(
name = "org_npmjs_registry_web_component_tester",
licenses = ["notice"], # BSD-3-Clause
sha256 = "9d4ebd4945df8a936916d4d32b7f280f2a3afa35f79e7ca8ad3ed0a42770c537",
urls = [
"http://bazel-mirror.storage.googleapis.com/registry.npmjs.org/web-component-tester/-/web-component-tester-4.3.6.tgz",
"https://registry.npmjs.org/web-component-tester/-/web-component-tester-4.3.6.tgz",
],
strip_prefix = "package",
path = "/web-component-tester",
suppress = [
"absolutePaths",
"strictDependencies",
],
deps = [
"@com_lodash",
"@org_npmjs_registry_accessibility_developer_tools",
"@org_npmjs_registry_async",
"@org_npmjs_registry_chai",
"@org_npmjs_registry_mocha",
"@org_npmjs_registry_sinon",
"@org_npmjs_registry_sinon_chai",
"@org_npmjs_registry_stacky",
"@org_polymer_test_fixture",
],
)

webfiles_external(
name = "org_polymer_test_fixture",
licenses = ["notice"], # BSD-3-Clause
sha256 = "59d6cfb1187733b71275becfea181fe0aa1f734df5ff77f5850c806bbbf9a0d9",
strip_prefix = "test-fixture-2.0.1",
urls = [
"http://bazel-mirror.storage.googleapis.com/github.com/PolymerElements/test-fixture/archive/v2.0.1.tar.gz",
"https://github.com/PolymerElements/test-fixture/archive/v2.0.1.tar.gz",
],
path = "/test-fixture",
)

0 comments on commit 1ece66d

Please sign in to comment.