Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !238

erp5_data_notebook: Add script for renderjs-extension

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Sebastian requested to merge Kreisel/erp5:renderjs-extension into master Mar 08, 2017
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 2

This commit adds server-side functionality for the jupyter-renderjs-extension. This has no interaction/impact with the existing functionality of the erp5_data_notebook BT.

@klaus mentioned that it is not common practice to return objects of a class (defined in the script). However, for usuability reasons there is an argument to do it here: Usually when using a jupyter extension, a module is imported an functionality is provided by that module. For instance:

In [1]:
import mymodule as mm
mm.someFunction()
mm.someOtherFunction()

To emulate this behavior and to be consistent with the ipython-version (Python 2 Kernel) of this extension I therefore use an object of the class RJSExtension which is returned by this script. I am then able to use

rjs = Base_loadRenderJSExtension()
rjs.someFunction()
rjs.someOtherFunction()

instead of something like

Base_rjsExtensionSomeFunction()
Base_rjsExtensionSomeOtherFunction()

which is much less user-friendly. If there is a better alternative I am not aware of, please comment. Also if anything else is amiss.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: renderjs-extension
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7