Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5
erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
  • Merge Requests 138
    • Merge Requests 138
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Jobs
  • Commits
  • nexedi
  • erp5erp5
  • Merge Requests
  • !238

Merged
Opened Mar 08, 2017 by Sebastian@Kreisel
  • Report abuse
Report abuse

erp5_data_notebook: Add script for renderjs-extension

  • Overview 2
  • Commits 1
  • 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.

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch "https://lab.nexedi.com/Kreisel/erp5.git" "renderjs-extension"
git checkout -b "Kreisel/erp5-renderjs-extension" FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "origin/master"
git merge --no-ff "Kreisel/erp5-renderjs-extension"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: nexedi/erp5!238

Cherry-pick this commit

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7