Feature async validate (Validator and Form)

Please make sure these boxes are checked before submitting your PR, thank you!

[x] Make sure you follow DiDi's contributing guide.
[x] Make sure you are merging your commits to dev branch.
[x] Add some descriptions and refer relative issues for you PR.

Travis tests have failed
Hey @dolymood,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 6

     npm test

><EMAIL_ADDRESS>test /home/travis/build/didi/cube-ui
> npm run unit && npm run codecov

><EMAIL_ADDRESS>unit /home/travis/build/didi/cube-ui
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run

(node:4088) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
11 04 2018 10:59:25.701:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
11 04 2018 10:59:25.705:INFO [launcher]: Launching browser PhantomJS_mobile with unlimited concurrency
11 04 2018 10:59:25.725:INFO [launcher]: Starting browser PhantomJS
11 04 2018 10:59:29.408:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket DOoS_Qqtqo5LjPQzAAAA with id 2583751
PhantomJS 2.1.1 (Linux 0.0.0) INFO LOG: 'You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html'

  ActionSheet
    ActionSheet.vue
      ✓ use
      ✓ should render correct contents
      ✓ should render correct contents - no data
      ✓ should render correct contents - picker style
      ✓ should trigger events
    ActionSheet API
      ✓ $createActionSheet API

  Button.vue
    ✓ use
    ✓ should render correct contents
    ✓ props
    ✓ events-called
    ✓ events-no-called

  CascadePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  CheckboxGroup.vue
    ✓ use
    ✓ should render correct contents (horizontal=false)
    ✓ should render correct contents (horizontal=true)
    ✓ should change v-model value

  Checkbox.vue
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  DatePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when configured startColumn and columnCount
    ✓ should render correct contents when configured format
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  Dialog
    Dialog.vue
      ✓ use
      ✓ should render correct contents - icon
      ✓ should render correct contents - title
      ✓ should render correct contents - alert
      ✓ should render correct contents - confirm
      ✓ should render correct contents - confirmBtn/cancelBtn
      ✓ should trigger events
      ✓ should not trigger events when btn is disabled
    Dialog API
      ✓ $createDialog API

  Drawer
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Form.vue
    ✓ use
    ✓ should render correct contents
    ✓ should validate & reset correctly
    ✓ should validate & reset correctly - async validate
    ✓ should validate correctly - trigger blur
    ✓ should validate correctly - debounce
    ✓ should trigger events

  IndexList
    IndexList.vue
      ✓ use
      ✓ should render correct contents
      ✓ should trigger events
      ✓ should fixed title
      ✓ should not have navbar when navbar prop is false
      ✓ run normal when group or item undefined
      ✓ should handle condition of unexpected param

  Input.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not show clear button when no text
    ✓ should show clear button when has text
    ✓ value should be empty when clear button clicked
    ✓ should support more native props
    ✓ should show password eye and work correctly

  Loading.vue
    ✓ use
    ✓ should render correct contents - no size
    ✓ should render correct contents - with size

  Picker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should refill correct
    ✓ should add warn log when single is true
    ✓ setData when picker is invisible
    ✓ setData when picker is visible

  Popup
    Popup.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents
      ✓ events
    Popup API
      ✓ $createPopup API

  Radio.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - horizontal
    ✓ should toggle v-model value

  Rate.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger change event
    ✓ should trigger change event with click

  Scroll
    ✓ use
    ✓ should correct by default
    ✓ should render correct contents
    ✓ should trigger pullingDown
    ✓ should not trigger pullingDown
    ✓ should trigger pullingUp
    ✓ should not trigger pullingUp
    ✓ should trigger click
    ✓ should trigger other events
    ✓ should call correct method

  SegmentPicker
    ✓ use
    ✓ should render correct contents
    ✓ should correct by default
    ✓ should trigger events
    ✓ $updateProps
    ✓ should add warn log when single is true

  Select.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Slide.vue
    ✓ use
    ✓ should render correct contents
    ✓ should clone nodes if loop is true
    ✓ should trigger change event
    ✓ should go to right pageIndex if set initialIndex

  Swipe
    ✓ use
    ✓ should render correct contents
    ✓ should shrink if the swipe width not enough
    ✓ should shrink if the last moving direction is right
    ✓ should shrink and not moved if the duration is more than momentumLimitTime and moving distance is less than momentumLimitDistance
    ✓ should shrink and not moved if y-axis distance is more than x-axis distance
    ✓ should grow if the swipe width enough
    ✓ should grow if the duration is less than momentumLimitTime and moving distance is more than momentumLimitDistance
    ✓ should not swipe out of the boundaries when swiping left
    ✓ should not swipe out of the boundaries when swiping right
    ✓ should trigger events
    ✓ should shrink if another swipe item active
    ✓ should do nothing if active the same swipe item
    ✓ should call refresh if the btns prop has changed
    ✓ should use default props if do not pass any prop

  Switch
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  Textarea.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not expand when blur
    ✓ should expand when focus, fold when blur
    ✓ should has remain when focus
    ✓ should change value
    ✓ should support more native props

  TimePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - no showNow
    ✓ should trigger events
    ✓ should add warn log when sigle is true

  Tip.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents with offset[X]
    ✓ should be hidden after clicked content
    ✓ should be hidden after clicked close button

  Toast
    Toast.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents - time 0
      ✓ should render correct contents - with type
    Toast API
      ✓ $createToast API
      ✓ should trigger correct event

  Upload.vue
    ✓ use
    ✓ should render correct contents
    ✓ should add files & upload
    ✓ should remove file
    ✓ should start & pause upload
    ✓ should retry upload
    ✓ should trigger events

  Validator
    Validator.vue
      ✓ use
      ✗ should render correct contents - invalid
	AssertionError: expected '' to equal '必填' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

      ✓ should not validate when disabled
      ✗ should trigger events
	AssertionError: expected true to be false (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

    rules
      ✓ should be valid - no rule
      ✓ should be valid - unstated rule
      ✓ should be invalid - require: array
      ✓ should be invalid - type: string
      ✓ should be valid - type: string
      ✓ should be invalid - type: number
      ✓ should be valid - type: number
      ✓ should be invalid - type: array
      ✓ should be valid - type: array
      ✓ should be invalid - type: date
      ✓ should be valid - type: date
      ✓ should be invalid - type: email
      ✓ should be valid - type: email
      ✓ should be invalid - type: tel
      ✓ should be valid - type: tel
      ✓ should be invalid - type: url
      ✓ should be valid - type: url
      ✓ should be invalid - min: string
      ✓ should be valid - min: number
      ✓ should be valid - max: string
      ✓ should be invalid - min: number
      ✓ should be valid - min: string
      ✓ should be invalid - min: number
      ✓ should be invalid - notWhitespace
      ✓ should be invalid - pattern
      ✓ should be invalid - custom
    methods
      ✓ should add customized rule and message
      ✓ should rewrite raw type
      ✓ should change the language of default message

PhantomJS 2.1.1 (Linux 0.0.0): Executed 195 of 195 (2 FAILED) (34.646 secs / NaN secs)
TOTAL: 2 FAILED, 193 SUCCESS

1) should render correct contents - invalid
     Validator Validator.vue
     AssertionError: expected '' to equal '必填' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

2) should trigger events
     Validator Validator.vue
     AssertionError: expected true to be false (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

=============================== Coverage summary ===============================
Statements   : 95.13% ( 2150/2260 )
Branches     : 81.43% ( 868/1066 )
Functions    : 94.12% ( 208/221 )
Lines        : 95.2% ( 2144/2252 )
================================================================================
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
  AssertionError: expected '必填' to equal ''
  at /home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210

PhantomJS 2.1.1 (Linux 0.0.0): Executed 195 of 195 (2 FAILED) ERROR (34.747 secs / NaN secs)

=============================== Coverage summary ===============================
Statements   : 95.13% ( 2150/2260 )
Branches     : 81.43% ( 868/1066 )
Functions    : 94.12% ( 208/221 )
Lines        : 95.2% ( 2144/2252 )
================================================================================

npm ERR! Linux 4.14.12-041412-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v6.14.1/bin/node" "/home/travis/.nvm/versions/node/v6.14.1/bin/npm" "run" "unit"
npm ERR! node v6.14.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>unit: `cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>unit script 'cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cube-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cube-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cube-ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/didi/cube-ui/npm-debug.log
npm ERR! Test failed.  See above for more details.

Codecov Report

Merging #155 into dev will decrease coverage by 0.08%.
The diff coverage is 90.19%.

@@            Coverage Diff            @@
##             dev     #155      +/-   ##
=========================================
- Coverage   90.5%   90.41%   -0.09%
=========================================
  Files        106      108       +2
  Lines       2107     2265     +158
  Branches     318      341      +23
=========================================
+ Hits        1907     2048     +141
- Misses        99      110      +11
- Partials     101      107       +6

Impacted Files
Coverage Δ

src/components/upload/upload.vue
92.95% <100%> (+0.1%)
:arrow_up:

src/components/form/mixin.js
100% <100%> (ø)

src/components/form/layouts.js
100% <100%> (ø)

src/components/form/form.vue
91.45% <80.55%> (-2.61%)
:arrow_down:

src/common/helpers/util.js
76.11% <84.61%> (+11.83%)
:arrow_up:

src/components/validator/validator.vue
92.55% <92%> (+1.92%)
:arrow_up:

src/components/form/form-item.vue
91.74% <95.71%> (+2.85%)
:arrow_up:

src/components/slide/slide.vue
78.57% <0%> (-2.39%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b688b0d...bfdfb75. Read the comment docs.

Travis tests have failed
Hey @dolymood,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 6

     npm test

><EMAIL_ADDRESS>test /home/travis/build/didi/cube-ui
> npm run unit && npm run codecov

><EMAIL_ADDRESS>unit /home/travis/build/didi/cube-ui
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run

(node:4093) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
11 04 2018 15:10:22.793:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
11 04 2018 15:10:22.795:INFO [launcher]: Launching browser PhantomJS_mobile with unlimited concurrency
11 04 2018 15:10:22.876:INFO [launcher]: Starting browser PhantomJS
11 04 2018 15:10:23.509:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket jrx28Uxy04-OokQhAAAA with id 25579770
PhantomJS 2.1.1 (Linux 0.0.0) INFO LOG: 'You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html'

  ActionSheet
    ActionSheet.vue
      ✓ use
      ✓ should render correct contents
      ✓ should render correct contents - no data
      ✓ should render correct contents - picker style
      ✓ should trigger events
    ActionSheet API
      ✓ $createActionSheet API

  Button.vue
    ✓ use
    ✓ should render correct contents
    ✓ props
    ✓ events-called
    ✓ events-no-called

  CascadePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  CheckboxGroup.vue
    ✓ use
    ✓ should render correct contents (horizontal=false)
    ✓ should render correct contents (horizontal=true)
    ✓ should change v-model value

  Checkbox.vue
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  DatePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when configured startColumn and columnCount
    ✓ should render correct contents when configured format
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  Dialog
    Dialog.vue
      ✓ use
      ✓ should render correct contents - icon
      ✓ should render correct contents - title
      ✓ should render correct contents - alert
      ✓ should render correct contents - confirm
      ✓ should render correct contents - confirmBtn/cancelBtn
      ✓ should trigger events
      ✓ should not trigger events when btn is disabled
    Dialog API
      ✓ $createDialog API

  Drawer
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Form.vue
    ✓ use
    ✓ should render correct contents
    ✓ should validate & reset correctly
    ✓ should validate & reset correctly - async validate
    ✓ should validate correctly - trigger blur
    ✓ should validate correctly - debounce
    ✓ should trigger events

  IndexList
    IndexList.vue
      ✓ use
      ✓ should render correct contents
      ✓ should trigger events
      ✓ should fixed title
      ✓ should not have navbar when navbar prop is false
      ✓ run normal when group or item undefined
      ✓ should handle condition of unexpected param

  Input.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not show clear button when no text
    ✓ should show clear button when has text
    ✓ value should be empty when clear button clicked
    ✓ should support more native props
    ✓ should show password eye and work correctly

  Loading.vue
    ✓ use
    ✓ should render correct contents - no size
    ✓ should render correct contents - with size

  Picker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should refill correct
    ✓ should add warn log when single is true
    ✓ setData when picker is invisible
    ✓ setData when picker is visible

  Popup
    Popup.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents
      ✓ events
    Popup API
      ✓ $createPopup API

  Radio.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - horizontal
    ✓ should toggle v-model value

  Rate.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger change event
    ✓ should trigger change event with click

  Scroll
    ✓ use
    ✓ should correct by default
    ✓ should render correct contents
    ✓ should trigger pullingDown
    ✓ should not trigger pullingDown
    ✓ should trigger pullingUp
    ✓ should not trigger pullingUp
    ✓ should trigger click
    ✓ should trigger other events
    ✓ should call correct method

  SegmentPicker
    ✓ use
    ✓ should render correct contents
    ✓ should correct by default
    ✓ should trigger events
    ✓ $updateProps
    ✓ should add warn log when single is true

  Select.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Slide.vue
    ✓ use
    ✓ should render correct contents
    ✓ should clone nodes if loop is true
    ✓ should trigger change event
    ✓ should go to right pageIndex if set initialIndex

  Swipe
    ✓ use
    ✓ should render correct contents
    ✓ should shrink if the swipe width not enough
    ✓ should shrink if the last moving direction is right
    ✓ should shrink and not moved if the duration is more than momentumLimitTime and moving distance is less than momentumLimitDistance
    ✓ should shrink and not moved if y-axis distance is more than x-axis distance
    ✓ should grow if the swipe width enough
    ✓ should grow if the duration is less than momentumLimitTime and moving distance is more than momentumLimitDistance
    ✓ should not swipe out of the boundaries when swiping left
    ✓ should not swipe out of the boundaries when swiping right
    ✓ should trigger events
    ✓ should shrink if another swipe item active
    ✓ should do nothing if active the same swipe item
    ✓ should call refresh if the btns prop has changed
    ✓ should use default props if do not pass any prop

  Switch
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  Textarea.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not expand when blur
    ✓ should expand when focus, fold when blur
    ✓ should has remain when focus
    ✓ should change value
    ✓ should support more native props

  TimePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - no showNow
    ✓ should trigger events
    ✓ should add warn log when sigle is true

  Tip.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents with offset[X]
    ✓ should be hidden after clicked content
    ✓ should be hidden after clicked close button

  Toast
    Toast.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents - time 0
      ✓ should render correct contents - with type
    Toast API
      ✓ $createToast API
      ✓ should trigger correct event

  Upload.vue
    ✓ use
    ✓ should render correct contents
    ✓ should add files & upload
    ✓ should remove file
    ✓ should start & pause upload
    ✓ should retry upload
    ✓ should trigger events

  Validator
    Validator.vue
      ✓ use
      ✗ should render correct contents - invalid
	AssertionError: expected '' to equal '必填' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

      ✓ should not validate when disabled
      ✗ should trigger events
	AssertionError: expected true to be false (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

    rules
      ✓ should be valid - no rule
      ✓ should be valid - unstated rule
      ✓ should be invalid - require: array
      ✓ should be invalid - type: string
      ✓ should be valid - type: string
      ✓ should be invalid - type: number
      ✓ should be valid - type: number
      ✓ should be invalid - type: array
      ✓ should be valid - type: array
      ✓ should be invalid - type: date
      ✓ should be valid - type: date
      ✓ should be invalid - type: email
      ✓ should be valid - type: email
      ✓ should be invalid - type: tel
      ✓ should be valid - type: tel
      ✓ should be invalid - type: url
      ✓ should be valid - type: url
      ✓ should be invalid - min: string
      ✓ should be valid - min: number
      ✓ should be valid - max: string
      ✓ should be invalid - min: number
      ✓ should be valid - min: string
      ✓ should be invalid - min: number
      ✓ should be invalid - notWhitespace
      ✓ should be invalid - pattern
      ✓ should be invalid - custom
    methods
      ✓ should add customized rule and message
      ✓ should rewrite raw type
      ✓ should change the language of default message

PhantomJS 2.1.1 (Linux 0.0.0): Executed 195 of 195 (2 FAILED) (33.886 secs / NaN secs)
TOTAL: 2 FAILED, 193 SUCCESS

1) should render correct contents - invalid
     Validator Validator.vue
     AssertionError: expected '' to equal '必填' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

2) should trigger events
     Validator Validator.vue
     AssertionError: expected true to be false (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

=============================== Coverage summary ===============================
Statements   : 95.27% ( 2156/2263 )
Branches     : 81.68% ( 874/1070 )
Functions    : 94.14% ( 209/222 )
Lines        : 95.34% ( 2150/2255 )
================================================================================
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
  AssertionError: expected '必填' to equal ''
  at /home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210

PhantomJS 2.1.1 (Linux 0.0.0): Executed 195 of 195 (2 FAILED) ERROR (34.003 secs / NaN secs)

=============================== Coverage summary ===============================
Statements   : 95.27% ( 2156/2263 )
Branches     : 81.68% ( 874/1070 )
Functions    : 94.14% ( 209/222 )
Lines        : 95.34% ( 2150/2255 )
================================================================================

npm ERR! Linux 4.14.12-041412-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v6.14.1/bin/node" "/home/travis/.nvm/versions/node/v6.14.1/bin/npm" "run" "unit"
npm ERR! node v6.14.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>unit: `cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>unit script 'cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cube-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cube-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cube-ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/didi/cube-ui/npm-debug.log
npm ERR! Test failed.  See above for more details.

Travis tests have failed
Hey @dolymood,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 6

     npm test

><EMAIL_ADDRESS>test /home/travis/build/didi/cube-ui
> npm run unit && npm run codecov

><EMAIL_ADDRESS>unit /home/travis/build/didi/cube-ui
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run

(node:4079) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
12 04 2018 11:26:45.084:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
12 04 2018 11:26:45.087:INFO [launcher]: Launching browser PhantomJS_mobile with unlimited concurrency
12 04 2018 11:26:45.095:INFO [launcher]: Starting browser PhantomJS
12 04 2018 11:26:45.687:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket SZs51JVd7VpEI6qVAAAA with id 19124299
PhantomJS 2.1.1 (Linux 0.0.0) INFO LOG: 'You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html'

  ActionSheet
    ActionSheet.vue
      ✓ use
      ✓ should render correct contents
      ✓ should render correct contents - no data
      ✓ should render correct contents - picker style
      ✓ should trigger events
    ActionSheet API
      ✓ $createActionSheet API

  Button.vue
    ✓ use
    ✓ should render correct contents
    ✓ props
    ✓ events-called
    ✓ events-no-called

  CascadePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  CheckboxGroup.vue
    ✓ use
    ✓ should render correct contents (horizontal=false)
    ✓ should render correct contents (horizontal=true)
    ✓ should change v-model value

  Checkbox.vue
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  DatePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when configured startColumn and columnCount
    ✓ should render correct contents when configured format
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  Dialog
    Dialog.vue
      ✓ use
      ✓ should render correct contents - icon
      ✓ should render correct contents - title
      ✓ should render correct contents - alert
      ✓ should render correct contents - confirm
      ✓ should render correct contents - confirmBtn/cancelBtn
      ✓ should trigger events
      ✓ should not trigger events when btn is disabled
    Dialog API
      ✓ $createDialog API

  Drawer
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Form.vue
    ✓ use
    ✓ should render correct contents
    ✓ should validate & reset correctly
    ✓ should validate & reset correctly - async validate
    ✓ should validate correctly - trigger blur
    ✓ should validate correctly - debounce
    ✓ should trigger events

  IndexList
    IndexList.vue
      ✓ use
      ✓ should render correct contents
      ✓ should trigger events
      ✓ should fixed title
      ✓ should not have navbar when navbar prop is false
      ✓ run normal when group or item undefined
      ✓ should handle condition of unexpected param

  Input.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not show clear button when no text
    ✓ should show clear button when has text
    ✓ value should be empty when clear button clicked
    ✓ should support more native props
    ✓ should show password eye and work correctly

  Loading.vue
    ✓ use
    ✓ should render correct contents - no size
    ✓ should render correct contents - with size

  Picker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should refill correct
    ✓ should add warn log when single is true
    ✓ setData when picker is invisible
    ✓ setData when picker is visible

  Popup
    Popup.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents
      ✓ events
    Popup API
      ✓ $createPopup API

  Radio.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - horizontal
    ✓ should toggle v-model value

  Rate.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger change event
    ✓ should trigger change event with click

  Scroll
    ✓ use
    ✓ should correct by default
    ✓ should render correct contents
    ✓ should trigger pullingDown
    ✓ should not trigger pullingDown
    ✓ should trigger pullingUp
    ✓ should not trigger pullingUp
    ✓ should trigger click
    ✓ should trigger other events
    ✓ should call correct method

  SegmentPicker
    ✓ use
    ✓ should render correct contents
    ✓ should correct by default
    ✓ should trigger events
    ✓ $updateProps
    ✓ should add warn log when single is true

  Select.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Slide.vue
    ✓ use
    ✓ should render correct contents
    ✓ should clone nodes if loop is true
    ✓ should trigger change event
    ✓ should go to right pageIndex if set initialIndex

  Swipe
    ✓ use
    ✓ should render correct contents
    ✓ should shrink if the swipe width not enough
    ✓ should shrink if the last moving direction is right
    ✓ should shrink and not moved if the duration is more than momentumLimitTime and moving distance is less than momentumLimitDistance
    ✓ should shrink and not moved if y-axis distance is more than x-axis distance
    ✓ should grow if the swipe width enough
    ✓ should grow if the duration is less than momentumLimitTime and moving distance is more than momentumLimitDistance
    ✓ should not swipe out of the boundaries when swiping left
    ✓ should not swipe out of the boundaries when swiping right
    ✓ should trigger events
    ✓ should shrink if another swipe item active
    ✓ should do nothing if active the same swipe item
    ✓ should call refresh if the btns prop has changed
    ✓ should use default props if do not pass any prop

  Switch
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  Textarea.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not expand when blur
    ✓ should expand when focus, fold when blur
    ✓ should has remain when focus
    ✓ should change value
    ✓ should support more native props

  TimePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - no showNow
    ✓ should trigger events
    ✓ should add warn log when sigle is true

  Tip.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents with offset[X]
    ✓ should be hidden after clicked content
    ✓ should be hidden after clicked close button

  Toast
    Toast.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents - time 0
      ✓ should render correct contents - with type
    Toast API
      ✓ $createToast API
      ✓ should trigger correct event

  Upload.vue
    ✓ use
    ✓ should render correct contents
    ✓ should add files & upload
    ✓ should remove file
    ✓ should start & pause upload
    ✓ should retry upload
    ✓ should trigger events

  Validator
    Validator.vue
      ✓ use
      ✓ should render correct contents - invalid
      ✓ should reset correctly
      ✓ should not validate when disabled
      ✗ should trigger events
	AssertionError: expected '' to equal '必填' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

    rules
      ✓ should be valid - no rule
      ✓ should be valid - unstated rule
      ✓ should be invalid - require: array
      ✓ should be invalid - type: string
      ✓ should be valid - type: string
      ✓ should be invalid - type: number
      ✓ should be valid - type: number
      ✓ should be invalid - type: array
      ✓ should be valid - type: array
      ✓ should be invalid - type: date
      ✓ should be valid - type: date
      ✓ should be invalid - type: email
      ✓ should be valid - type: email
      ✓ should be invalid - type: tel
      ✓ should be valid - type: tel
      ✓ should be invalid - type: url
      ✓ should be valid - type: url
      ✓ should be invalid - min: string
      ✓ should be valid - min: number
      ✓ should be valid - max: string
      ✓ should be invalid - min: number
      ✓ should be valid - min: string
      ✓ should be invalid - min: number
      ✓ should be invalid - notWhitespace
      ✓ should be invalid - pattern
      ✓ should be invalid - custom
    methods
      ✓ should add customized rule and message
      ✓ should rewrite raw type
      ✓ should change the language of default message

PhantomJS 2.1.1 (Linux 0.0.0): Executed 196 of 196 (1 FAILED) (33.251 secs / NaN secs)
TOTAL: 1 FAILED, 195 SUCCESS

1) should trigger events
     Validator Validator.vue
     AssertionError: expected '' to equal '必填' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

=============================== Coverage summary ===============================
Statements   : 95.34% ( 2169/2275 )
Branches     : 81.84% ( 879/1074 )
Functions    : 94.14% ( 209/222 )
Lines        : 95.41% ( 2163/2267 )
================================================================================

npm ERR! Linux 4.14.12-041412-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v6.14.1/bin/node" "/home/travis/.nvm/versions/node/v6.14.1/bin/npm" "run" "unit"
npm ERR! node v6.14.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>unit: `cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>unit script 'cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cube-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cube-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cube-ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/didi/cube-ui/npm-debug.log
npm ERR! Test failed.  See above for more details.

Travis tests have failed
Hey @dolymood,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 6

     npm test

><EMAIL_ADDRESS>test /home/travis/build/didi/cube-ui
> npm run unit && npm run codecov

><EMAIL_ADDRESS>unit /home/travis/build/didi/cube-ui
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run

(node:4079) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
12 04 2018 13:10:03.082:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
12 04 2018 13:10:03.086:INFO [launcher]: Launching browser PhantomJS_mobile with unlimited concurrency
12 04 2018 13:10:03.098:INFO [launcher]: Starting browser PhantomJS
12 04 2018 13:10:03.940:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket zSvvvW8fu1isU5uKAAAA with id 49899782
PhantomJS 2.1.1 (Linux 0.0.0) INFO LOG: 'You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html'

  ActionSheet
    ActionSheet.vue
      ✓ use
      ✓ should render correct contents
      ✓ should render correct contents - no data
      ✓ should render correct contents - picker style
      ✓ should trigger events
    ActionSheet API
      ✓ $createActionSheet API

  Button.vue
    ✓ use
    ✓ should render correct contents
    ✓ props
    ✓ events-called
    ✓ events-no-called

  CascadePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  CheckboxGroup.vue
    ✓ use
    ✓ should render correct contents (horizontal=false)
    ✓ should render correct contents (horizontal=true)
    ✓ should change v-model value

  Checkbox.vue
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  DatePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when configured startColumn and columnCount
    ✓ should render correct contents when configured format
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  Dialog
    Dialog.vue
      ✓ use
      ✓ should render correct contents - icon
      ✓ should render correct contents - title
      ✓ should render correct contents - alert
      ✓ should render correct contents - confirm
      ✓ should render correct contents - confirmBtn/cancelBtn
      ✓ should trigger events
      ✓ should not trigger events when btn is disabled
    Dialog API
      ✓ $createDialog API

  Drawer
    ✓ use
    ✓ should render correct contents

Travis tests have failed
Hey @dolymood,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 6

     npm test

><EMAIL_ADDRESS>test /home/travis/build/didi/cube-ui
> npm run unit && npm run codecov

><EMAIL_ADDRESS>unit /home/travis/build/didi/cube-ui
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run

(node:4080) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
13 04 2018 05:35:23.246:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
13 04 2018 05:35:23.249:INFO [launcher]: Launching browser PhantomJS_mobile with unlimited concurrency
13 04 2018 05:35:23.267:INFO [launcher]: Starting browser PhantomJS
13 04 2018 05:35:24.068:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket Y4MiutVei-SK3MxDAAAA with id 65407029
PhantomJS 2.1.1 (Linux 0.0.0) INFO LOG: 'You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html'

  ActionSheet
    ActionSheet.vue
      ✓ use
      ✓ should render correct contents
      ✓ should render correct contents - no data
      ✓ should render correct contents - picker style
      ✓ should trigger events
    ActionSheet API
      ✓ $createActionSheet API

  Button.vue
    ✓ use
    ✓ should render correct contents
    ✓ props
    ✓ events-called
    ✓ events-no-called

  CascadePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  CheckboxGroup.vue
    ✓ use
    ✓ should render correct contents (horizontal=false)
    ✓ should render correct contents (horizontal=true)
    ✓ should change v-model value

  Checkbox.vue
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  DatePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when configured startColumn and columnCount
    ✓ should render correct contents when configured format
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  Dialog
    Dialog.vue
      ✓ use
      ✓ should render correct contents - icon
      ✓ should render correct contents - title
      ✓ should render correct contents - alert
      ✓ should render correct contents - confirm
      ✓ should render correct contents - confirmBtn/cancelBtn
      ✓ should trigger events
      ✓ should not trigger events when btn is disabled
    Dialog API
      ✓ $createDialog API

  Drawer
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Form.vue
    ✓ use
    ✓ should render correct contents
    ✓ should validate & reset correctly
    ✓ should validate & reset correctly - async validate
    ✓ should validate correctly - trigger blur
    ✓ should validate correctly - debounce
    ✓ should trigger events

  IndexList
    IndexList.vue
      ✓ use
      ✓ should render correct contents
      ✓ should trigger events
      ✓ should fixed title
      ✓ should not have navbar when navbar prop is false
      ✓ run normal when group or item undefined
      ✓ should handle condition of unexpected param

  Input.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not show clear button when no text
    ✓ should show clear button when has text
    ✓ value should be empty when clear button clicked
    ✓ should support more native props
    ✓ should show password eye and work correctly

  Loading.vue
    ✓ use
    ✓ should render correct contents - no size
    ✓ should render correct contents - with size

  Picker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should refill correct
    ✓ should add warn log when single is true
    ✓ setData when picker is invisible
    ✓ setData when picker is visible

  Popup
    Popup.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents
      ✓ events
    Popup API
      ✓ $createPopup API

  Radio.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - horizontal
    ✓ should toggle v-model value

  Rate.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger change event
    ✓ should trigger change event with click

  Scroll
    ✓ use
    ✓ should correct by default
    ✓ should render correct contents
    ✓ should trigger pullingDown
    ✓ should not trigger pullingDown
    ✓ should trigger pullingUp
    ✓ should not trigger pullingUp
    ✓ should trigger click
    ✓ should trigger other events
    ✓ should call correct method

  SegmentPicker
    ✓ use
    ✓ should render correct contents
    ✓ should correct by default
    ✓ should trigger events
    ✓ $updateProps
    ✓ should add warn log when single is true

  Select.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Slide.vue
    ✓ use
    ✓ should render correct contents
    ✓ should clone nodes if loop is true
    ✓ should trigger change event
    ✓ should go to right pageIndex if set initialIndex

  Swipe
    ✓ use
    ✓ should render correct contents
    ✓ should shrink if the swipe width not enough
    ✓ should shrink if the last moving direction is right
    ✓ should shrink and not moved if the duration is more than momentumLimitTime and moving distance is less than momentumLimitDistance
    ✓ should shrink and not moved if y-axis distance is more than x-axis distance
    ✓ should grow if the swipe width enough
    ✓ should grow if the duration is less than momentumLimitTime and moving distance is more than momentumLimitDistance
    ✓ should not swipe out of the boundaries when swiping left
    ✓ should not swipe out of the boundaries when swiping right
    ✓ should trigger events
    ✓ should shrink if another swipe item active
    ✓ should do nothing if active the same swipe item
    ✓ should call refresh if the btns prop has changed
    ✓ should use default props if do not pass any prop

  Switch
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  Textarea.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not expand when blur
    ✓ should expand when focus, fold when blur
    ✓ should has remain when focus
    ✓ should change value
    ✓ should support more native props

  TimePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - no showNow
    ✓ should trigger events
    ✓ should add warn log when sigle is true

  Tip.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents with offset[X]
    ✓ should be hidden after clicked content
    ✓ should be hidden after clicked close button

  Toast
    Toast.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents - time 0
      ✓ should render correct contents - with type
    Toast API
      ✓ $createToast API
      ✓ should trigger correct event

  Upload.vue
    ✓ use
    ✓ should render correct contents
    ✓ should add files & upload
    ✓ should remove file
    ✓ should start & pause upload
    ✓ should retry upload
    ✓ should trigger events

  Validator
    Validator.vue
      ✓ use
      ✗ should render correct contents - invalid
	AssertionError: expected 'cube-validator cube-validator_validating' to include 'cube-validator_invalid' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

      ✓ should reset correctly
      ✓ should not validate when disabled
ERROR LOG: '[Vue warn]: Error in nextTick: "AssertionError: expected 'cube-validator' to include 'cube-validator_validating'"

found in

---> <CubeValidator> at /home/travis/build/didi/cube-ui/src/components/validator/validator.vue
       <Root>'
ERROR LOG: AssertionError{message: 'expected 'cube-validator' to include 'cube-validator_validating'', showDiff: false, actual: 'cube-validator', expected: undefined, stack: undefined, line: 210, sourceURL: 'http://localhost:9876/absolute/home/travis/build/didi/cube-ui/node_modules/chai/chai.js?ab7cf506d9d77c111c878b1e10b7f25348630760'}
      ✗ should trigger events
	AssertionError: expected '必填' to equal '' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

      ✓ should trigger events
	AssertionError: expected '必填' to equal '' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

    methods
      ✓ should add customized rule and message
      ✓ should rewrite raw type
      ✓ should rewrite raw type
      ✓ should change the language of default message

PhantomJS 2.1.1 (Linux 0.0.0): Executed 172 of 196 (2 FAILED) (33.699 secs / NaN secs)
TOTAL: 2 FAILED, 170 SUCCESS

1) should render correct contents - invalid
     Validator Validator.vue
     AssertionError: expected 'cube-validator cube-validator_validating' to include 'cube-validator_invalid' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

2) should trigger events
     Validator Validator.vue
     AssertionError: expected '必填' to equal '' (/home/travis/build/didi/cube-ui/node_modules/chai/chai.js:210)

=============================== Coverage summary ===============================
Statements   : 94.2% ( 2143/2275 )
Branches     : 78.77% ( 846/1074 )
Functions    : 88.74% ( 197/222 )
Lines        : 94.27% ( 2137/2267 )
================================================================================

npm ERR! Linux 4.14.12-041412-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v6.14.1/bin/node" "/home/travis/.nvm/versions/node/v6.14.1/bin/npm" "run" "unit"
npm ERR! node v6.14.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>unit: `cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>unit script 'cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cube-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cube-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cube-ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/didi/cube-ui/npm-debug.log
npm ERR! Test failed.  See above for more details.

Travis tests have failed
Hey @dolymood,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 6

     npm test

><EMAIL_ADDRESS>test /home/travis/build/didi/cube-ui
> npm run unit && npm run codecov

><EMAIL_ADDRESS>unit /home/travis/build/didi/cube-ui
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run

(node:4085) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
13 04 2018 05:42:09.879:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
13 04 2018 05:42:09.882:INFO [launcher]: Launching browser PhantomJS_mobile with unlimited concurrency
13 04 2018 05:42:09.889:INFO [launcher]: Starting browser PhantomJS
13 04 2018 05:43:09.944:WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
13 04 2018 05:43:09.954:INFO [launcher]: Trying to start PhantomJS again (1/2).
13 04 2018 05:43:17.701:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket uid0_XUIGTN6e-hwAAAA with id 93019212
PhantomJS 2.1.1 (Linux 0.0.0) INFO LOG: 'You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html'

  ActionSheet
    ActionSheet.vue
      ✓ use
      ✓ should render correct contents
      ✓ should render correct contents - no data
      ✓ should render correct contents - picker style
      ✓ should trigger events
    ActionSheet API
      ✓ $createActionSheet API

  Button.vue
    ✓ use
    ✓ should render correct contents
    ✓ props
    ✓ events-called
    ✓ events-no-called

  CascadePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  CheckboxGroup.vue
    ✓ use
    ✓ should render correct contents (horizontal=false)
    ✓ should render correct contents (horizontal=true)
    ✓ should change v-model value

  Checkbox.vue
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  DatePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when configured startColumn and columnCount
    ✓ should render correct contents when configured format
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  Dialog
    Dialog.vue
      ✓ use
      ✓ should render correct contents - icon
      ✓ should render correct contents - title
      ✓ should render correct contents - alert
      ✓ should render correct contents - confirm
      ✓ should render correct contents - confirmBtn/cancelBtn
      ✓ should trigger events
      ✓ should not trigger events when btn is disabled
    Dialog API
      ✓ $createDialog API

  Drawer
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Form.vue
    ✓ use
    ✓ should render correct contents
    ✓ should validate & reset correctly
    ✓ should validate & reset correctly - async validate
    ✓ should validate correctly - trigger blur
    ✓ should validate correctly - debounce
    ✓ should trigger events

  IndexList
    IndexList.vue
      ✓ use
      ✓ should render correct contents
      ✓ should trigger events
      ✓ should fixed title
      ✓ should not have navbar when navbar prop is false
      ✓ run normal when group or item undefined
      ✓ should handle condition of unexpected param

  Input.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not show clear button when no text
    ✓ should show clear button when has text
    ✓ value should be empty when clear button clicked
    ✓ should support more native props
    ✓ should show password eye and work correctly

  Loading.vue
    ✓ use
    ✓ should render correct contents - no size
    ✓ should render correct contents - with size

  Picker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should refill correct
    ✓ should add warn log when single is true
    ✓ setData when picker is invisible
    ✓ setData when picker is visible

  Popup
    Popup.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents
      ✓ events
    Popup API
      ✓ $createPopup API

  Radio.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - horizontal
    ✓ should toggle v-model value

  Rate.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger change event
    ✓ should trigger change event with click

  Scroll
    ✓ use
    ✓ should correct by default
    ✓ should render correct contents
    ✓ should trigger pullingDown
    ✓ should not trigger pullingDown
    ✓ should trigger pullingUp
    ✓ should not trigger pullingUp
    ✓ should trigger click
    ✓ should trigger other events
    ✓ should call correct method

  SegmentPicker
    ✓ use
    ✓ should render correct contents
    ✓ should correct by default
    ✓ should trigger events
    ✓ $updateProps
    ✓ should add warn log when single is true

  Select.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Slide.vue
    ✓ use
    ✓ should render correct contents
    ✓ should clone nodes if loop is true
    ✓ should trigger change event
    ✓ should go to right pageIndex if set initialIndex

  Swipe
    ✓ use
    ✓ should render correct contents
    ✓ should shrink if the swipe width not enough
    ✓ should shrink if the last moving direction is right
    ✓ should shrink and not moved if the duration is more than momentumLimitTime and moving distance is less than momentumLimitDistance
    ✓ should shrink and not moved if y-axis distance is more than x-axis distance
    ✓ should grow if the swipe width enough
    ✓ should grow if the duration is less than momentumLimitTime and moving distance is more than momentumLimitDistance
    ✓ should not swipe out of the boundaries when swiping left
    ✓ should not swipe out of the boundaries when swiping right
    ✓ should trigger events
    ✓ should shrink if another swipe item active
    ✓ should do nothing if active the same swipe item
    ✓ should call refresh if the btns prop has changed
    ✓ should use default props if do not pass any prop

  Switch
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  Textarea.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not expand when blur
    ✓ should expand when focus, fold when blur
    ✓ should has remain when focus
    ✓ should change value
    ✓ should support more native props

  TimePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - no showNow
    ✓ should trigger events
    ✓ should add warn log when sigle is true

  Tip.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents with offset[X]
    ✓ should be hidden after clicked content
    ✓ should be hidden after clicked close button

  Toast
    Toast.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents - time 0
      ✓ should render correct contents - with type
    Toast API
      ✓ $createToast API
      ✓ should trigger correct event

  Upload.vue
    ✓ use
    ✓ should render correct contents
    ✓ should add files & upload
    ✓ should remove file
    ✓ should start & pause upload
    ✓ should retry upload
    ✓ should trigger events

  Validator
    Validator.vue
      ✓ use
      ✓ should render correct contents - invalid
      ✓ should reset correctly
      ✓ should not validate when disabled
      ✓ should trigger events
    rules
      ✓ should be valid - no rule
      ✓ should be valid - unstated rule
      ✓ should be invalid - require: array
      ✓ should be invalid - type: string
      ✓ should be valid - type: string
      ✓ should be invalid - type: number
      ✓ should be valid - type: number
      ✓ should be invalid - type: array
      ✓ should be valid - type: array
      ✓ should be invalid - type: date
      ✓ should be valid - type: date
      ✓ should be invalid - type: email
      ✓ should be valid - type: email
      ✓ should be invalid - type: tel
      ✓ should be valid - type: tel
      ✓ should be invalid - type: url
      ✓ should be valid - type: url
      ✓ should be invalid - min: string
      ✓ should be valid - min: number
      ✓ should be valid - max: string
      ✓ should be invalid - min: number
      ✓ should be valid - min: string
      ✗ should be invalid - min: number
	expected '' to not equal ''

      ✓ should be invalid - notWhitespace
      ✓ should be invalid - pattern
      ✓ should be invalid - custom
    methods
      ✓ should add customized rule and message
      ✓ should rewrite raw type
      ✓ should change the language of default message

PhantomJS 2.1.1 (Linux 0.0.0): Executed 196 of 196 (1 FAILED) (34.388 secs / 33.251 secs)
TOTAL: 1 FAILED, 195 SUCCESS

1) should be invalid - min: number
     Validator rules
     expected '' to not equal ''

=============================== Coverage summary ===============================
Statements   : 95.47% ( 2172/2275 )
Branches     : 81.84% ( 879/1074 )
Functions    : 94.14% ( 209/222 )
Lines        : 95.54% ( 2166/2267 )
================================================================================

npm ERR! Linux 4.14.12-041412-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v6.14.1/bin/node" "/home/travis/.nvm/versions/node/v6.14.1/bin/npm" "run" "unit"
npm ERR! node v6.14.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>unit: `cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>unit script 'cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cube-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cube-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cube-ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/didi/cube-ui/npm-debug.log
npm ERR! Test failed.  See above for more details.


UTF-8 strings get mangled

Issue
When a path contains a directory/file that has a UTF-8 encoded name, the \ gets replaced with /, therefore mangling the original string.
Here is an example:
Original:
SoMuchStuff.app\Contents\Resources\Data\StreamingAssets\aa\StandaloneOSX\localization-string-tables-portugu�s(pt)_assets_all.bundle
Parsed:
SoMuchStuff.app/Contents/Resources/Data/StreamingAssets/aa/StandaloneOSX/localization-string-tables-portugu/s(pt)_assets_all.bundle

Nevermind, this was actually a problem with the csv crate deserialization


Feature/style selections

Time Estimate or Size
Small
Problem
Checkboxes are working and merged, they need styling
Solution
Pretty straightforward styling PR, no paradigm changes.
I'd say the worst thing in this review-wise is all the selectors to remove blue color from the antd checkboxes. There may be a better way to do it, but I promise that in this current set up removing any of those selectors introduces something we don't want.
Most of the changes are in the agent_row.css and side_panel.css
Small other miscellaneous things: importing Overpass font and removed one layer of the html nesting in the side panel.
Did design review with UX back at the start of the year and this looks the same to me and the code is basically identical.
We went over the scroll bar and non-scroll bar states that weren't completely spelled out in spec.

New feature (non-breaking change which adds functionality)

Steps to Verify:

Does it look right?

Screenshots (optional):

for the checkbox color: since you're using antd can't you change the primary color and use the style tokens?

for the checkbox color: since you're using antd can't you change the primary color and use the style tokens?

After a lot of feedback about keeping PRs small I was reluctant to add the ConfigProvider to this PR and figured it would be simplest to stay in line with the existing CSS approach, but I can definitely do that.
I assumed that if we were going to add the ConfigProvider it would make sense to also refactor and move other code/styling into that paradigm which would make for a bigger change set.

for the checkbox color: since you're using antd can't you change the primary color and use the style tokens?

After a lot of feedback about keeping PRs small I was reluctant to add the ConfigProvider to this PR and figured it would be simplest to stay in line with the existing CSS approach, but I can definitely do that.
I assumed that if we were going to add the ConfigProvider it would make sense to also refactor and move other code/styling into that paradigm which would make for a bigger change set.

I wouldn't restyle everything, but I think adding it and just styling the primary color and the few lines you need for checkboxes might be the same or fewer lines of code than trying to overwrite the styles in your css file.

I wouldn't restyle everything, but I think adding it and just styling the primary color and the few lines you need for checkboxes might be the same or fewer lines of code than trying to overwrite the styles in your css file.

I accidentally overwrote your comment above thats why it says I edited it, sorry.
It had been a minute since I looked at the token code. I'll probably just push it so you can see, but I still end up needing about half the current CSS rules to get everything looking right as I can't target the check itself with the design token, and the border in the checked state takes on the color of the background...
Maybe you know a better way to do the checkboxes via design token?

@meganrm I pushed a change with the simplest blend of ConfigProvider and basic CSS I could figure out for now. The borders for unchecked/indeterminate and checked states dont take the same token property, and i couldn't target the checkmark with the token.


Progress bars are missing in my Jupyter environment (PSC)

Bug report
When I use the latest release on the PSC ondemand service, I don't see progress bars in a Jupyter Lab notebook:

I use Python 3.12 with the conda environment
Before submitting
Please check the following:

[x] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
[x] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead.
[ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.

I was about to say that we may recommend to install ipywidgets in this error message, but its installation completely broke my PSC Jupyter Lab

My Jupyter is fixed now, but ipywidgets didn't really help. Could we have an option to use a "simple" tqdm progress bar? Because a naive code like this works for me:
from tqdm import tqdm

for _ in tqdm(range(100)):
    pass

while from tqdm.auto import tqdm does not.

To clarify, are you suggesting/approve of potentially having two flag on the arguments?
progress_bar (bool): should we display any progress bar at all
simple_progress_bar (bool): if we're displaying a progress bar, make it a simple (plain text, non-widgety one).
I also want to cross-reference this issue that motivated using the widget-style progress bar in the first place: https://github.com/astronomy-commons/lsdb/issues/167

progress_bar (bool): should we display any progress bar at all
simple_progress_bar (bool): if we're displaying a progress bar, make it a simple (plain text, non-widgety one).

Is there any way to check if widgets are active and do this choice for user?

I also want to cross-reference this issue that motivated using the widget-style progress bar in the first place: https://github.com/astronomy-commons/lsdb/issues/167

The new progress bar is pretty, I think it was a good change!


Investigate devpod vs devcontainer for backing executable for devcontainer

Feature
Devcontainer CLI
Devpod CLI

Set up a devcontainer
✅ (using devcontainer up)
✅ (using devpod up)

Set up a running container
✅ (using devcontainer set-up)
✅ (using devpod up)

Stop a running dev container
❌
✅ (using devpod stop)

Port forwarding
⚠ (Can be implemented with a lot of effort)
✅ (using devpod ssh)

Running manual commands inside the devcontainer
✅ (using devcontainer exec)
✅ (using devpod ssh)

Deleting dev container
❌
✅ (using devpod down)

Going ahead with DevPod.


unix,win: give thread pool threads an 8 MB stack

Give the threads in the thread pool a stack size that is consistent across platforms and architectures.
Fixes: https://github.com/libuv/libuv/issues/3786

Should we document this

Done. Added a versionchanged note.


Error in v2.3.1: undefined method `ensure_karafka_initialized!' for Karafka::Testing:Module

Just caught this error in our CI when upgrading karafka-testing via Dependabot.
We don't automatically require our gems in the Gemfile and, following the testing docs, we had only this in spec_helper:
require 'karafka/testing/rspec/helpers'

RSpec.configure do |config|
  config.include Karafka::Testing::RSpec::Helpers
end

Simply adding require 'karafka/testing' as well fixed the issue. Not sure if this is a bug or the documentation should be updated.

Testing docs say:
gem 'karafka-testing'

and not
gem 'karafka-testing', require: false

Though I agree @Drowze that maybe I should just require the root from the rspec require. Let me reopen and do this with the next release!

Understood about not having require: false in docs, but then Karafka is assuming its clients have Bundler.require(...) somewhere in their code - which I think is a fair assumption for Rails apps, but not so much in other ruby apps (we're running Karafka in a few Rails apps, but also inside Hanami).

Fair enough :) it shall be fixed. Thank you for reporting that!


docs: Link to Meltano Cloud from Production doc

Related to https://github.com/meltano/internal-marketing/issues/750

@sbalnojan Not intentionally hiding it, but this PR was just to make sure that the one place where we already talk about managed hosting options was accurate.
The big announcement will come later this month: https://github.com/meltano/internal-marketing/issues/466 (we have enough people for the Alpha right now, but definitely want more people on the waitlist for Beta and GA), at which point I like the idea of a header banner.
Until then, I do already want everyone who starts evaluating Meltano to know this is going to exist, hence the new button on the homepage, and I think we should mention it as an alternative to self-managing wherever makes sense. Are there other spots in the docs where you'd add it? This section comes to mind: https://docs.meltano.com/getting-started/#deploy-your-pipelines-in-production.


Store a preferred  Kubernetes shcema version in settings, and allow the user to select another version during one session

As a user, I want to be able to select a version of K8s schema to test without having to change the setting for it for later.

it must be possible to change the preferred version, so every time I start a session the version is the one configured.
it must be possible to change the version for this session without modyfing the preferred version
it should be possible to identify the preferred version and go back to it.
it should be possible to identify other versions used in external sources (i.e. the cluster k8s schema version)
it should be possible to quickly deactivate the K8s schema validation
it should be possible to compare the list of errors between two different schema versions in compare and sync.

For instance:

My configuration files are being tested against K8s 1.25.2, that is my preferred version. Every time I start the session the version is that one.
I want to connect to a cluster. When I do, the version in the cluster is 1.24.8. I don't want to see validation errors because of the mismatch in the cluster. When I connect, Monokle asks me if I want to change the session version to 1.24.8 or keep the same one.
I want to be able to promote the session version to the settings one.
I want to test if my cluster will have a problem if I update my cluster to 1.26.1. I select the version for the session and I see the changes.

Monokle is not showing a validation error when the Kubernetes schema version is changed.
Here is the sample manifest:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: hello
spec:
  schedule: "* * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: hello
            image: busybox:1.28
            imagePullPolicy: IfNotPresent
            command:
            - /bin/sh
            - -c
            - date; echo Hello from the Kubernetes cluster
          restartPolicy: OnFailure

this apiversion is deprecated. When we deploy, Monokle is throwing error but not pre-deployment when validation is enabled.
https://user-images.githubusercontent.com/125909758/226903301-211ee7bb-a5ba-4fb2-9051-b42149c515fb.mp4


Feature/issue 2467 vectorized signatures rn gs

Submission Checklist

[ ] Run unit tests: ./runTests.py src/test/unit
[x] Run cpplint: make cpplint
[x] Declare copyright holder and open-source license: see below

Summary
Vectorize the *_rng distribution functions following stan-dev/math#605 stan-dev/math#722.
Intended Effect
Vectorize the following functions
beta_rng
cauchy_rng
chi_square_rng
double_exponential_rng
exp_mod_normal_rng
exponential_rng
frechet_rng
gamma_rng
gumbel_rng
inv_chi_square_rng
inv_gamma_rng
logistic_rng
lognormal_rng
pareto_rng
pareto_type_2_rng
rayleigh_rng
scaled_inv_chi_square_rng
skew_normal_rng
student_t_rng
weibull_rng

How to Verify
Double check updated tests in  stan/src/test/test-models/good/function-signatures/distributions/rngs.stan and/or run
./runTests.py src/test/unit/lang/parser/distribution_functions_test.cpp
I didn't run src/test/unit, but the tests (and updated tests) from src/test/unit/lang do pass.
Side Effects
None
Documentation
All *_rng distribution functions have s added to their arguments to indicate these function willingly accept vectors.
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
California State University, Chico
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

This already looks much cleaner.  Though, I don't quite know where the new function rng_return_type should go.  For now, I put it in src/stan/lang/ast/sigs/function_signatures_def.hpp.
Tests and docs have been updated.

It's OK there for now.  We'll probably eventually want to move it to one of the meta directories, but there's going to be a big re-org going forward that should simplify that when it happens.

Hmm.  Now I can see my own review.  No idea what's going on, as it only popped up after I left the last comment.  I'm pretty sure it wasn't there before.

The location for the return type function is fine for now.  We like to try to break functions out into their own files, but it's no big deal here.

Thank you for your time on the comments and for the feedback on my coding.  Just pushed the latest changes.  Let me know what your next thoughts are.

@bob-carpenter, it looks like some checks were not successful because they timed out.  I'm happy to do something about this, just let me know what.  Thanks.

We need to restart the timed-out jobs.  Travis is getting very finicky these days.

Dang, timed-out again.  Would you mind restarting these, when you get a chance?  Thanks.

If you want to go ahead and make the doc fixes, I might not get to it for a couple days.  It's the same comment as I had last time---the return types aren't clear in the doc.  Also, you want to use compound declare-define whenever possible.

I'll update the doc now and resubmit.  Otherwise, this looks great.

Thanks for doing this @roualdes! (and @bob-carpenter ofc., but that's implied)

I was going to do this now, but now I'm confused about how to modify someone else's branch.  Sean showed me how to do it once and I didn't take good enough notes.
What needs to happens is for those signatures reals foo(reals, reals), the return type is more subtle.  It's real if both arguments are real and vector (?) or something else otherwise.  Once that change goes in, I'll merge.  I was going to figure out what the return type was by looking at the signatures, but I'm stuck on the Git process.  I'm sure I'll get that sorted out if you'd rather hang on and let me finish this doc.  I was suggesting pointing in each function's definition to a section that explains how the return types work for vectorized RNGs.

OK, I think I'm in business.  Mitzi walked me through the instructions in the Git Book,  which are the same as those provided by Sean. I added them our GitHub process page.

Turns out there were only a couple missing cases.  This looks great.  When it passes, it can be merged.


AddCustomType from EditorPlugin with C# script doesn't expose child nodes

Godot version
3.5.1.stable.mono
System information
Windows 11
Issue description
Creating a custom node with the EditorPlugin functionality in C# is not allowing the children of that custom node to appear in the editor or at runtime when that custom node is added via the editor (clicking the plus button to add a scene in the editor and adding the custom type to the scene). However, the custom node recognizes the child nodes correctly when added via the file system (dragging and dropping the .tscn file into the scene tree). The custom node also works when instanced via a script with ResourceLoader.Load().
Steps to reproduce

Go to the Plugins tap under Project Settings.
Click create and follow the dialog to construct the default EditorPlugin script for C#.
Make sure to add the [Tool] attribute above and the #if #endif TOOLS preprocessor directives.
Override _EnterTree() and add the AddCustomType() there.
Create a separate Control script and scene with [Tool] which will be the custom type.
Add child nodes to that custom type.
When that custom type is added via the editor the children are not exposed so they don't appear in the editor or at runtime. Also, the child nodes can't be found via scripts with GetChildCount() or with GetNode().

Minimal reproduction project
test_bugs.zip

The same happens btw in Godot 4. Tool script created nodes never show up in the editor

@atlasapplications if you add nodes dynamically from editor scripts you need to set the owner of the node AFTER you added you child to the parent.
Godot 4:
label.owner = self
Godot 3:
label.set_owner(self)
Also if this scene get's saved the instance of your node will be saved as well, so make sure you add a check if this node already exists else you can get duplicates :)

@dotlogix the functionality you're describing doesn't appear to solve the issue. I've set CustomType.Owner = GetTree().EditedSceneRoot (properties in the C# API exists in Godot 3 as well) on _Ready() for the custom type and it doesn't change that the child nodes of the custom type are not appearing in the editor.
However, I think I've found a partial solution that solves about 50% of the issue, which is to set CustomType.Filename = string.Empty and that makes the Node act like its been loaded from the file system so at runtime the children are appearing, but unfortunately not in the editor still.

I use Godot 4 but could you try to use this code in your Godot 3 app?
public static class NodeExtensions {
    public static T GetOrAddChild<T>(this Node parent, string name, Func<string, T> factoryFunc) where T : Node {
        var node = parent.GetNodeOrNull(name);
        if(node is T next) return next;

        next = factoryFunc.Invoke(name);
        if(node is not null) {
            node.ReplaceBy(next);
            node.QueueFree();
        } else {
            parent.AddChild(next);
        }
        next.Owner = parent.GetTree().EditedSceneRoot;
        return next;
    }
    public static T AddOrUpdateChild<T, TU>(this Node parent, string name, Func<string, T> factoryFunc, Func<string, TU, T> updateFunc) where T : Node where TU : Node {
        var node = parent.GetNodeOrNull(name);
        var next = node is not TU temp
            ? factoryFunc.Invoke(name)
            : updateFunc.Invoke(name, temp);

        if(node == next) return next;

        if(node is not null) {
            node.ReplaceBy(next);
            node.QueueFree();
        } else {
            parent.AddChild(next);
        }

        next.Owner = parent.GetTree().EditedSceneRoot;
        return next;
    }
    public static T AddOrUpdateChild<T>(this Node parent, string name, Func<string, T> factoryFunc, Func<string, Node, T> updateFunc) where T : Node {
        return AddOrUpdateChild<T, Node>(parent, name, factoryFunc, updateFunc);
    }
}

I've see this is well, i.e.
AddCustomType("CustomNode", "Node2D", script, icon);
AddCustomType("EvenMoreCustomNode", "CustomNode", script, icon);

the later won't appear among the selectable nodes. If I change its base type to i.e. "Node2D", then it appears under Node2D.


action.clampWhenFinished doesn't stop on last frame

Hello, according to the Read Me:
action.clampWhenFinished = true;
// If true, stops on its last frame. If false, it resets. Default is true.
but when testing your demo with my own spritesheet using glitch, the playOnce function resets to its first frame instead. my spritesheet is a scroll opening and i need it to stop on its last frame. changing the value to false in the SpriteMixer.js didn't change anything. Please help.

I just set the frame I want it to end on in the SpriteMixer "finished" event listener.

I just set the frame I want it to end on in the SpriteMixer "finished" event listener.


Add missing logprob mapping for Azure OpenAI provider

Title: Add missing logprob mapping for Azure OpenAI provider
Description: The Portkey gateway doesn't return any logprobs when these are set to True and 5 respectively, calling Azure directly works. I guess the reason is this mapping was missing. Kindly merge this so we can get logprobs when calling Azure via Portkey.
Motivation: We use the SaaS version of your gateway @ Haptik, and I need these scores.

Thanks for the quick turnaround on the review @VisargD. Do I need to do anything else here? If not, can we please merge this?


[Optimisation] Avoid reprocessing of locally produced blocks

Description
We could avoid reprocessing blocks that has been locally generated\proposed.

The EL will already optimise this so I wouldn't try to special case it. If we were going to special case it, we'd be better off skipping the processing of the whole block - we'd have to check the block signature since that's created by the validator but could just keep a short term cache of the BeaconBlock and resulting BeaconState to import without reprocessing.

Closed as not planned.


DOC: examples for derivatives of Bessel functions

Reference issue
part of #7168
What does this implement/fix?
Adds examples for all functions listed under derivatives of Bessel functions.
Additional information
I am not familiar with plotting in the complex plane, thats why I did not add plots for Hankel function derivatives. Could still be added if deemed necessary.

A couple reminders:

Examples should now include the line import numpy as np if np is used.
No blank line immediately after the Examples heading.

@WarrenWeckesser The first point is addressed no? Do you see any missing import? (Note they are not at the beginning of the examples).

@tupui, yeah, I noticed that after my comment (comment has been edited).  I thought we had a preference for importing numpy at the beginning.

I am neutral on the import location for examples. But sure if we want that, let's make it the policy to have all imports at the top.

In https://github.com/scipy/scipy/issues/13049#issuecomment-1199457608, @mdhaber suggested adding the imports "to the top of the code block where they are first needed", which I guess is consistent with this pull request.   I have a slight preference for putting the imports of np and plt at the beginning, but I'll let those with stronger preferences run the debate.


Tyscript compile issue after fresh install

Running into errors compiling the typescript
Terriann:master
$ npm i @types/node --global
/usr/local/lib
└──<EMAIL_ADDRESS>
Terriann:master
$ tsc
node_modules/@types/requirejs/index.d.ts(416,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'require' must be of type 'NodeRequire', but here has type 'Require'.

Some post said to remove the @types/node package from the dependencies. One post even suggested deleting the folder and a simple npm install just brought the problem back 😖
Even then I would try to compile my typescript and get this:
$ tsc
src/CsvToMarkdown.ts(103,12): error TS2304: Cannot find name 'module'.
src/CsvToMarkdown.ts(104,2): error TS2304: Cannot find name 'module'.
```

This happened after I moved directories around and ended up checking out the project again and running `npm install` so it may be a version based issue but that's just a hunch.

It's only when you write out your problem that Google finally points you to the right SO 😒
https://stackoverflow.com/a/39603502/480603
Which also references https://github.com/Microsoft/TypeScript/issues/9184


ng-repeat won't work if my object keys starting with "$" and there is no error messages

{{key}}:{{val}}

{{key}}:{{val}}

{{key}}:{{val}}

The related codes in angularjs:
if (collection.hasOwnProperty(key) && key.charAt(0) != '$') {
    collectionKeys.push(key);
}

IMO, this is a limitation or a bug in AngularJs side. It is very inconvenient because each time to use ng-repeat to iterate over object keys, we need to ensure each key not start with $, or it won't work and there is no error messages.
Also there is a post on stackoverflow:
http://stackoverflow.com/questions/29141277/angularjs-ng-repeat-doesnt-work-if-the-key-starts-with

$ is considered a private key to Angular (generally signifying API) - this is pretty well known, and I do not believe this should be modified in Angular.

Yet another HTML parser magic. Give up and use JavaScript for codding view.

$ and $$ are reserved AngularJS internal prefixes. You should not use them.

Dupe of #6266


Dead Link in Architecture Overview

At the end of file architecture-doc/readme.md, the link in the text reading Continue to LZA configuration files and installation instructions sends you to a file that doesn't exist in the repo. It doesn't look like there's a general readme.md in the config directory, so it's a little hard to know what the next step is after reading through the overview doc.

Thanks for reporting.
It should link to the install instructions here: https://github.com/aws-samples/landing-zone-accelerator-on-aws-for-tse-se/blob/main/install.md
We will correct this in our next release.

Fixed in 1.7.0-a release.


[FEATURE REQ] Setup DataX platform to collect build telemetry

This work is done. We have data from build tool available in DataX.


Update Table Integration test baseline images

The images are from a run of the tests: https://github.com/adobecom/dc/actions/runs/10840158756/job/30081944984

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.19%. Comparing base (5ab1856) to head (e0cb75f).

Additional details and impacted files
@@            Coverage Diff             @@
##            stage     #806      +/-   ##
==========================================
- Coverage   90.21%   90.19%   -0.02%
==========================================
  Files          43       43
  Lines        5519     5519
==========================================
- Hits         4979     4978       -1
- Misses        540      541       +1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


New install .. keeps creating the same library

i ran python3 plexlibrary hulu .. it created the library and started to populate it .. got around 74 shows and error out.
.. about 2 hours later started again and created another library with the same name.
i have no setup any cron ...
any ideas?

here is the error.
Setting the sort titles for the 'TV Shows Hulu' library...
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "plexlibrary/main.py", line 3, in
main()
File "plexlibrary/plexlibrary.py", line 64, in main
r.run(args.sort_only)
File "plexlibrary/recipe.py", line 637, in run
missing_items, list_count = self._run()
File "plexlibrary/recipe.py", line 613, in _run
all_new_items = self._modify_sort_titles_and_cleanup(item_list=item_list, imdb_map=imdb_map, new_library=new_library, sort_only=False)
File "plexlibrary/recipe.py", line 438, in _modify_sort_titles_and_cleanup
return all_new_items
UnboundLocalError: local variable 'all_new_items' referenced before assignment

100% my fault


Cannot install Twofa using brew

I get the following error on my Macbook M1 when I try brew install.
curl: (22) The requested URL returned error: 403 Forbidden
Error: Failed to download resource "twofa"
Download failed: https://dl.bintray.com/sqreen/bottles-sqreen/twofa-0.0.1.tar.gz

See here: https://github.com/sqreen/homebrew-speakeasy/issues/1

Are there any workarounds?
I can't build it from source without an AppleDeveloper license ( I think )

Not that I know of.  sqreen maintainers would have to fix it


How to show datatable instead of json?

hi, sorry but I ma kind of new to the datatables
I have a function in a controller:
    // Show the Restaurant Working hours
    public function showResWorkingHours($id)
    {
        $restaurant = $this->restaurantRepository->findWithoutFail($id);

        $res_workingHours = $restaurant->workingHours()->get();

        if (empty($res_workingHours)) {
            Flash::error('Restaurant Do not have working hours');

            return redirect(route('restaurant.index'));
        }

        $test = Datatables::of($res_workingHours)
            ->addColumn('action', 'res_working_hours.datatables_actions')
            ->make();

        return $test->render('res_working_hours.index');

        // return view('res_working_hours.index')->with('resWorkingHour', $res_workingHours);
    }

to show the data in the Datatable, but instead I am getting the json:
{"draw":0,"recordsTotal":7,"recordsFiltered":7,"data":[[1,1,1,"1100-1500,1800-2200","<form method=\"POST\" action=\"http:\/\/localhost\/fc_project_a\/public\/resWorkingHours\/1\" accept-charset=\"UTF-8\"><input name=\"_method\" type=\"hidden\" value=\"DELETE\"><input name=\"_token\" type=\"hidden\" value=\"dTgZPQrdxRuJyOPiUK469qRZpJQQL7Ny45v7NZcK\">\n
\n    \n        <\/i>\n    <\/a>\n    \n ....
instead, what I did wrong in the implementation?
Thank You

You can add if condition to alter the response:
if (request()->ajax()) {
$test = Datatables::of($res_workingHours)
            ->addColumn('action', 'res_working_hours.datatables_actions')
            ->make();
}

return view('res_working_hours.index');

hi, I have added the if (request()->ajax()) {
but I am getting:
Undefined variable: dataTable (View: C:\xampp\htdocs\fc_project_a\resources\views\res_working_hours\table.blade.php) (View: C:\xampp\htdocs\fc_project_a\resources\views\res_working_hours\table.blade.php)
This is the view.blade.php:
@section('css')
    @include('layouts.datatables_css')
@endsection

{!! $dataTable->table(['width' => '100%']) !!}

@section('scripts')
    @include('layouts.datatables_js')
    {!! $dataTable->scripts() !!}
@endsection

actually the function above is in a restaurantController:
class restaurantController extends AppBaseController
{

...

   // Restaurant Datatable List page
    public function index(restaurantDataTable $restaurantDataTable)
    {

        return $restaurantDataTable->render('restaurant.index');

    }

    // Show the Restaurant Working hours
    public function showResWorkingHours($id)
    {
        $restaurant = $this->restaurantRepository->findWithoutFail($id);

        $res_workingHours = $restaurant->workingHours()->get();

        if (empty($res_workingHours)) {
            Flash::error('Restaurant Do not have working hours');

            return redirect(route('restaurant.index'));
        }

        if (request()->ajax()) {

            $test = Datatables::of($res_workingHours)
                ->addColumn('action', 'res_working_hours.datatables_actions')
                ->make();

        }

        //return $test->render('res_working_hours.index');

        return view('res_working_hours.index');
    }

}

I have another datatable class called restaurantDataTable:
class restaurantDataTable extends DataTable
{

    /**
     * @return \Illuminate\Http\JsonResponse
     */
    public function ajax()
    {

        return $this->datatables
            ->eloquent($this->query())
            ->addColumn('action', 'restaurant.datatables_actions')
            ->make(true);
    }

...

}

but this restaurantDataTable only used for showing restaurant list datatable page, which when clicked the added action column will goto edit restaurant info form page
I am trying to create another restaurant list datatable page, tht when clicked the added action column will goto restaurant working hours list datatable page, which is another datatable list showing 7 rows (days) of working hours for that res_id.
I added the function restaurantController@showResWorkingHours into restaurantController to try achieve that, but it is returning the json instead of the datatable view.
another way I trying to do is clone restaurantDataTable & create:
class resWorkingHourDataTable extends DataTable
{

    public function ajax()
    {
        return $this->datatables
            ->eloquent($this->query())
            ->addColumn('action', 'restaurant.workinghours_datatables_actions')
            ->make(true);
    }

}

and add it into restaurantController@showResWorkingHours like:
class restaurantController extends AppBaseController
{

   // Restaurant Working Hour Datatable List page
    public function showResWorkingHours(resWorkingHourDataTable $resWorkingHourDataTable)
    {

        return $resWorkingHourDataTable->render('restaurant.index');

    }

}

the view.blade.php is expecting a 'dataTable' object is there anyway I can return a datatable object with:
            $test = Datatables::of($res_workingHours)
                ->addColumn('action', 'res_working_hours.datatables_actions')
                ->make();

?


workflows: remove windows for ci and release

fixes #1741
Right now the windows build is completely broken due to the OOM issue, and it now blocks the new releases for 0.8.23 and 0.8.24. I would recommend removing the windows builds for now and we can always add them back later. (first report in https://github.com/GoogleCloudPlatform/terraformer/issues/1542)
cc @sergeylanzman

now, the builds are green 💯