Migrate tf_backend to webfiles rules.
Change: 146938071
This commit is contained in:
parent
f006837ce0
commit
42dc6764a0
@ -13,8 +13,11 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
declare function stub(el: string, obj: any): void;
|
declare function stub(el: string, obj: any): void;
|
||||||
|
declare function fixture(id: string): void;
|
||||||
|
|
||||||
describe('audio dashboard tests', function() {
|
|
||||||
|
describe(
|
||||||
|
'audio dashboard tests', function() {
|
||||||
var audioDash;
|
var audioDash;
|
||||||
var reloadCount = 0;
|
var reloadCount = 0;
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
|
79
tensorflow/tensorboard/components/tf_backend/BUILD
Normal file
79
tensorflow/tensorboard/components/tf_backend/BUILD
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
package(default_visibility = ["//tensorflow:internal"])
|
||||||
|
|
||||||
|
load("@io_bazel_rules_closure//closure:defs.bzl", "webfiles")
|
||||||
|
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_ts_library")
|
||||||
|
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_typescript_genrule")
|
||||||
|
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_webcomponent_library")
|
||||||
|
|
||||||
|
licenses(["notice"]) # Apache 2.0
|
||||||
|
|
||||||
|
# TODO(dandelion): Add webfiles support for the test code.
|
||||||
|
|
||||||
|
webfiles(
|
||||||
|
name = "tf_backend",
|
||||||
|
srcs = [
|
||||||
|
"tf-backend.html",
|
||||||
|
":ts",
|
||||||
|
],
|
||||||
|
path = "/tf-backend",
|
||||||
|
deps = [
|
||||||
|
"//tensorflow/tensorboard/components/tf_imports:d3",
|
||||||
|
"//tensorflow/tensorboard/components/tf_imports:lodash",
|
||||||
|
"//tensorflow/tensorboard/components/vz_sorting",
|
||||||
|
"@org_polymer",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
tensorboard_typescript_genrule(
|
||||||
|
name = "ts",
|
||||||
|
srcs = [
|
||||||
|
"backend.ts",
|
||||||
|
"behavior.ts",
|
||||||
|
"requestManager.ts",
|
||||||
|
"router.ts",
|
||||||
|
"urlPathHelpers.ts",
|
||||||
|
],
|
||||||
|
typings = [
|
||||||
|
"@org_definitelytyped//:d3.d.ts",
|
||||||
|
"@org_definitelytyped//:lodash.d.ts",
|
||||||
|
"//tensorflow/tensorboard/components/vz_sorting:ts_typings",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all_files",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["notsan"],
|
||||||
|
)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# MARKED FOR DELETION
|
||||||
|
|
||||||
|
tensorboard_webcomponent_library(
|
||||||
|
name = "legacy",
|
||||||
|
srcs = [
|
||||||
|
"tf-backend.html",
|
||||||
|
":legacy_ts",
|
||||||
|
],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
destdir = "tf-backend",
|
||||||
|
deps = [
|
||||||
|
"//tensorflow/tensorboard/components:tf_imports",
|
||||||
|
"//third_party/javascript/polymer/v1/polymer:lib",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
tensorboard_ts_library(
|
||||||
|
name = "legacy_ts",
|
||||||
|
srcs = [
|
||||||
|
"backend.ts",
|
||||||
|
"behavior.ts",
|
||||||
|
"requestManager.ts",
|
||||||
|
"router.ts",
|
||||||
|
"urlPathHelpers.ts",
|
||||||
|
],
|
||||||
|
deps = [
|
||||||
|
"//tensorflow/tensorboard/components:common_deps",
|
||||||
|
"//tensorflow/tensorboard/components/vz_sorting:legacy_ts",
|
||||||
|
],
|
||||||
|
)
|
@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
var assert = chai.assert;
|
var assert = chai.assert;
|
||||||
declare function fixture(id: string): void; window.HTMLImports.whenReady(() => {
|
declare function fixture(id: string): void;
|
||||||
|
window.HTMLImports.whenReady(() => {
|
||||||
Polymer({
|
Polymer({
|
||||||
is: 'autoreload-test-element',
|
is: 'autoreload-test-element',
|
||||||
behaviors: [TF.TensorBoard.AutoReloadBehavior],
|
behaviors: [TF.TensorBoard.AutoReloadBehavior],
|
||||||
|
@ -41,6 +41,20 @@ def tensorboard_typescript_genrule(name, srcs, typings=[], **kwargs):
|
|||||||
tools = ["@com_microsoft_typescript//:tsc"],
|
tools = ["@com_microsoft_typescript//:tsc"],
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
native.genrule(
|
||||||
|
name = name + "_typings",
|
||||||
|
srcs = _DEFAULT_TYPINGS + typings + srcs,
|
||||||
|
outs = [src[:-3] + ".d.ts" for src in srcs],
|
||||||
|
cmd = "$(location @com_microsoft_typescript//:tsc)" +
|
||||||
|
" --inlineSourceMap" +
|
||||||
|
" --inlineSources" +
|
||||||
|
" --outDir $(@D)" +
|
||||||
|
" --declaration" +
|
||||||
|
" $(SRCS)",
|
||||||
|
tools = ["@com_microsoft_typescript//:tsc"],
|
||||||
|
**kwargs
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def tensorboard_ts_library(**kwargs):
|
def tensorboard_ts_library(**kwargs):
|
||||||
"""Rules referencing this will be deleted from the codebase soon."""
|
"""Rules referencing this will be deleted from the codebase soon."""
|
||||||
|
Loading…
Reference in New Issue
Block a user