You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by tzolov <gi...@git.apache.org> on 2015/08/12 23:47:37 UTC

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

GitHub user tzolov opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/206

    ZEPPELIN-219: Paragaph mode auto-detection - initial impl

    Here are the mode autodetection rules (and optimizations): 
    - Evaluates the editor mode on each `aceChange` event.
    - (Optimization 1) Evaluates the mode only if the cursor is within the first 30 characters of the buffer. 
    - (Optimization 2) Sets the mode (e.g. `session.setMode(new mode)` ) only if the new mode differs from the previous one. 
    
    Also the mode tag detection structure is refactored to bring together the interpreter tag test and the mode reference. The convention looks like this:
    ```javascript
      var editorModes = [
         [<Your Mode 1 Reg Expression Test>, <ACE Mode 1>],
         ......
         [<Your Mode N Reg Expression Test>, <ACE Mode N>]
      ];
    ```
    For example:
    ```javascript
      var editorModes = [
         [/^%spark/, 'ace/mode/scala'],
         [/^%(\w*\.)?\wql/, 'ace/mode/sql'],
         [/^%md/, 'ace/mode/markdown'],
         [/^%sh/, 'ace/mode/sh']
      ];
    ```


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tzolov/incubator-zeppelin ZEPPELIN-219

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-zeppelin/pull/206.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #206
    
----
commit 7cdefa7b63abe0939d2eab36cd21f7126dbb7357
Author: tzolov <ch...@gmail.com>
Date:   2015-08-12T21:34:50Z

    ZEPPELIN-219: Paragaph mode auto-detection - initial impl

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by Madhuka <gi...@git.apache.org>.
Github user Madhuka commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-138304162
  
    @tzolov : You can find few test in PR #262, 
    +1 for the merge (I too can support on writing test) 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by bzz <gi...@git.apache.org>.
Github user bzz commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-135284755
  
    @corneadoug not sure but think that to be able to see it in "create new PR" ui you need to make sure that the branch you are using is actually derived from https://github.com/tzolov/incubator-zeppelin/tree/ZEPPELIN-219 (either checkouted from ZEPPELIN-219 branch of the clean clone of tzolov/incubator-zeppelin or from the new 'remote' pointing here, inside your existing repo)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-138104877
  
    @corneadoug it is done. just rebased (after ZEPPELIN-228) and pushed. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-134149466
  
    @corneadoug, your help will be well appreciated! The suggested testset sounds good and covering the functionality. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-131570220
  
    Two possible places for test. [test controllers and directives](https://github.com/apache/incubator-zeppelin/tree/master/zeppelin-web/test) or [test using selenium](https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-131495714
  
    @djoelz, this change affects paragraph.controller.js. I am not sure i've seen units tests for this or the other js controllers? But i might have missed something.
    
    @Leemoonsoo is there some samples for testing such behavior? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-137455408
  
    @corneadoug, glad to hear you are working on this. Take your time. Your help is highly appreciated and will help me/us learn how to write such tests!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by djoelz <gi...@git.apache.org>.
Github user djoelz commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-134299638
  
    @tzolov I am also new to the angular/js world but if @corneadoug can provide a starting point I can help with the more tests.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-138243255
  
    Just spent a lot of time on this.
    I think we will have to create an issue, and do the tests later.
    With Current version of ui-ace that we use, we can't test it because of a bug (https://github.com/angular-ui/ui-ace/issues/73)
    We would need to Bump to newer version (0.2.x), but those versions have breaking changes.
    I pretty much figured out what we need to change, but can't guarantee that everything would be working (it would take lot of time to manually test + write tests). which would delay more this PR.
    So the best would be to do the test later.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-137438333
  
    @corneadoug,  have you had chance on writing an unit test(s) for this PR? 
    If you have not time and there are no other objections may i suggest to have this improvement merged? It is been hanging around for some time now and there few other tickets depending on it as well.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-137446163
  
    @tzolov I started doing it, if possible give me a day to finish it up


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-138073682
  
    @tzolov let's rebase once #250 is merged, so that I can do a PR without conflicts


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-135285097
  
    I created a remote with his branch, then used his branch as a base.
    The weird part being that I have the choice of everybody except him


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by djoelz <gi...@git.apache.org>.
Github user djoelz commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-131242008
  
    I would love to see some unit tests for this. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-135282089
  
    Hi, Sorry guys I'm taking a bit of time on this one.
    I actually started by understanding the code to know what test I could make, and ended up spending time optimizing the loop and conditions first :P 
    One problem though is that I can't find @tzolov repository in the github interface when I try to make a pull request :/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-138308754
  
    Looks good to me!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-135294267
  
    @tzolov can you merge this into your branch then? https://github.com/corneadoug/incubator-zeppelin/tree/improve/ZEPPELIN-219


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-138292992
  
    Thanks for the update @corneadoug. I've faced the ace upgrade issue while preparing the (ZEPPELIN-216).  When i tried to upgrade ace to 1.2.0 the existing ui-ace version complained. I've managed to increase ui-ace but had to force some dependency resolutions and was not confident it will not cause side effects. So i upgraded ace to safest ace 1.1.9 version instead. But if you manage to upgrade ui-ace (very outdated it seems) it will allow us upgrade ace-build as well. 
    Also i would still love to learn how to write angular controller unit tests. 
    
    @Leemoonsoo , @felixcheung it seems that this PR (e.g. ZEPPELIN-219) is ready to merge.
    The tests will come after the ui-ace upgrade.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-zeppelin/pull/206


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-134072279
  
    @Leemoonsoo thanks for the references. If not mistaken the [test controllers and directives](https://github.com/apache/incubator-zeppelin/tree/master/zeppelin-web/test) doesn't contain any real controller tests at the moment. As i've mentioned earlier i'm not much of js/angular authority  and would prefer to learn from someone else's experience and examples. @djoelz do you feel like you can help here? 
    Otherwise we can review and merge this and postpone the tests for after someone provide an example such?
    
    
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-134110883
  
    Maybe I can help with those tests, I guess we need:
    * Some tests for the setMode function
    * A test scenario for Optimization 1(typing 30 characters and having setMode called)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-135785874
  
    @corneadoug, thanks for the improvements. 
    just merged the corneadoug/improve/ZEPPELIN-219 branch


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-219: Paragaph mode auto-...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/206#issuecomment-130569424
  
    Note: apparently i didn't commit all changes with the latest commit (40b9a33).  Will redo it  again. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---