1. 22 Mar, 2016 2 commits
    • Douglas's avatar
      Jupyter: automatic rendering of objects as HTML · d67f9a7f
      Douglas authored
      Rendering of last-returning objects wasn't implemented using a custom display
      hook, like in IPyKernel, because it is not thread-safe. Instead user's code is
      modified to call an external method, Base_renderAsHtml, with the object as
      argument to render it. This external method can be called manually as the user
      wishes.
      
      To render a object of a given class a processor needs to be created and
      associated with that class. When the class has no processor, the default one is
      used to render the object's string representation. Many processors were created
      for some special classes: Image class from the Image Module, Figure class from
      matplotlib and all the IPython's display objects classes (Audio, IFrame,
      YouTubeVideo, VimeoVideo, ScribdDocument, FileLink, and FileLinks).
      
      The user can manually add processors as he likes using the `_processor_list`
      object that is automatically injected into the code context.
      d67f9a7f
    • Douglas's avatar
      Jupyter: Added experimental integration between pivottablejs and Pandas.DataFrame · c32ff174
      Douglas authored
      pivottablejs is a very useful pivot table implementation in Javascript that
      alllows the user to create his own tables and charts. And also they had examples
      of integration with Pandas.DataFrame objects and Jupyter. So this is highly
      based on that.
      
      **ATTENTION**: this is an experimental integration and does not follow the ERP5
      Javascript standards. It will be refactored in the future to use RenderJS and
      JIO.
      
      The integration generates an HTML page template which starts the pivot table and
      have a placeholder for the data, that will be later replaced with a Data Frame
      data as CSV. After this replacement the page is stored in the memcached server
      and then served from there, through a Script (Python) object, inside an HTML
      iframe. The iframe is necessary because a lot of Javascript libraries that are
      not included in the Jupyter web page are loaded.
      
      A web page with id "PivotTableJs_getMovementHistoryList" was created to demo
      how pivottablejs can be integrated within ERP5, either using AJAX or not.
      
      In the process of this integration a simple external method to render
      iPython's display classes (Images, Video, Youtube, IFrame, etc) was created. It
      will be refactored and polished along with the kernel itself in the future.
      c32ff174
  2. 18 Mar, 2016 8 commits
  3. 17 Mar, 2016 8 commits
  4. 16 Mar, 2016 2 commits
  5. 15 Mar, 2016 4 commits
  6. 14 Mar, 2016 6 commits
  7. 11 Mar, 2016 3 commits
  8. 10 Mar, 2016 7 commits