-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Travis and add a test that verifies the union build (#40)
- Loading branch information
Showing
6 changed files
with
3,244 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: node_js | ||
node_js: "8" | ||
script: | ||
- yarn build | ||
- yarn lint | ||
- yarn test-travis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* @license | ||
* Copyright 2018 Google LLC. 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. | ||
* ============================================================================= | ||
*/ | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
frameworks: ['jasmine', 'karma-typescript'], | ||
files: [{pattern: 'src/**/*.ts'}], | ||
preprocessors: { | ||
'**/*.ts': ['karma-typescript'], // *.tsx for React Jsx | ||
}, | ||
karmaTypescriptConfig: { | ||
tsconfig: 'tsconfig.json', | ||
compilerOptions: { | ||
module: 'commonjs' | ||
}, | ||
reports: {} // Do not produce coverage html. | ||
}, | ||
reporters: ['progress', 'karma-typescript'], | ||
browsers: ['Chrome', 'Firefox'], | ||
browserStack: { | ||
username: process.env.BROWSERSTACK_USERNAME, | ||
accessKey: process.env.BROWSERSTACK_KEY | ||
}, | ||
reportSlowerThan: 500, | ||
browserNoActivityTimeout: 30000, | ||
customLaunchers: { | ||
bs_chrome_mac: { | ||
base: 'BrowserStack', | ||
browser: 'chrome', | ||
browser_version: 'latest', | ||
os: 'OS X', | ||
os_version: 'Sierra' | ||
}, | ||
bs_firefox_mac: { | ||
base: 'BrowserStack', | ||
browser: 'firefox', | ||
browser_version: 'latest', | ||
os: 'OS X', | ||
os_version: 'Sierra' | ||
}, | ||
chrome_with_swift_shader: { | ||
base: 'Chrome', | ||
flags: ['--blacklist-accelerated-compositing', '--blacklist-webgl'] | ||
} | ||
}, | ||
client: { | ||
args: ['--grep', config.grep || ''] | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* @license | ||
* Copyright 2018 Google LLC. 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. | ||
* ============================================================================= | ||
*/ | ||
|
||
import * as tf from './index'; | ||
|
||
describe('Union package', () => { | ||
it('has core ops', () => { | ||
expect(tf.matMul).not.toBeNull(); | ||
expect(tf.tensor).not.toBeNull(); | ||
expect(tf.scalar).not.toBeNull(); | ||
expect(tf.square).not.toBeNull(); | ||
}); | ||
|
||
it('has layers', () => { | ||
expect(tf.sequential).not.toBeNull(); | ||
expect(tf.model).not.toBeNull(); | ||
expect(tf.layers.dense).not.toBeNull(); | ||
}); | ||
|
||
it('version', () => { | ||
// tslint:disable-next-line:no-require-imports | ||
const expected = require('../package.json').version; | ||
expect(tf.version.tfjs).toBe(expected); | ||
expect(tf.version["tfjs-core"]).not.toBeNull(); | ||
expect(tf.version["tfjs-layers"]).not.toBeNull(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"rules": { | ||
"array-type": [true, "array-simple"], | ||
"arrow-return-shorthand": true, | ||
"ban": [true, | ||
["fit"], | ||
["fdescribe"], | ||
["xit"], | ||
["xdescribe"], | ||
["fitAsync"], | ||
["xitAsync"], | ||
["fitFakeAsync"], | ||
["xitFakeAsync"] | ||
], | ||
"ban-types": [true, | ||
["Object", "Use {} instead."], | ||
["String", "Use 'string' instead."], | ||
["Number", "Use 'number' instead."], | ||
["Boolean", "Use 'boolean' instead."] | ||
], | ||
"class-name": true, | ||
"curly": true, | ||
"interface-name": [true, "never-prefix"], | ||
"jsdoc-format": true, | ||
"forin": false, | ||
"label-position": true, | ||
"max-line-length": [true, 80], | ||
"new-parens": true, | ||
"no-angle-bracket-type-assertion": true, | ||
"no-any": true, | ||
"no-construct": true, | ||
"no-consecutive-blank-lines": true, | ||
"no-debugger": true, | ||
"no-default-export": true, | ||
"no-inferrable-types": true, | ||
"no-namespace": [true, "allow-declarations"], | ||
"no-reference": true, | ||
"no-require-imports": true, | ||
"no-string-throw": true, | ||
"no-unused-expression": true, | ||
"no-unused-variable": true, | ||
"no-var-keyword": true, | ||
"object-literal-shorthand": true, | ||
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], | ||
"prefer-const": true, | ||
"radix": true, | ||
"restrict-plus-operands": true, | ||
"semicolon": [true, "always", "ignore-bound-class-methods"], | ||
"switch-default": true, | ||
"triple-equals": [true, "allow-null-check"], | ||
"use-isnan": true, | ||
"variable-name": [ | ||
true, | ||
"check-format", | ||
"ban-keywords", | ||
"allow-leading-underscore", | ||
"allow-trailing-underscore" | ||
] | ||
} | ||
} |
Oops, something went wrong.
4030a12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restoration of daudi karanja indigenous land to promote agriculture and biotechnology product in kenya