Skip to content

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

Merged
Opened Jun 20, 2016 by Douglas@Camata
  • Report abuse
Report abuse

erp5_data_notebook: environment object implementation and refactoring to ERP5 kernel

@Tyagov review, please. I'm creating a test suite now and will post about the test results as soon as they are available.

  • An environment object was implemented to help us deal with the multiprocess architecture of ERP5 and objects that cannot be easily stored in the ZODB. It stores definition of functions, classes and variables as string. The implementation uses a dumb Environment class to allow users to make define and undefine calls, which are captured and processed by an AST transformer before code execution.

  • Along with the environment object, an automatic "import fixer" was created. It does not allow users to import modules as they normally would, because this may cause collateral effects on other users' code. A good example is the plot settings in the matplotlib module. It will fix normal imports, make them use the environment object mentione earlier automatically and warn the user about it.

Some bugs were fixed with this new implementation:

  • https://nexedi.erp5.net/bug_module/20160318-7098DD, which reports an inconsistency on portal catalog queries between Jupyter and Python (Script) objects. Probably an issue with user context storage in ActiveProcess

  • https://nexedi.erp5.net/bug_module/20160330-13AA193, which reports an error related to acquisition when trying to plot images, which happened in other situations, although this is not officially reported in Nexedi's ERP5. This probably also was happening because of old user context storage.

Check out, review, and merge locally

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

git fetch https://lab.nexedi.com/Camata/erp5.git environment_object
git checkout -b Camata/erp5-environment_object 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 Camata/erp5-environment_object

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.

  • Discussion 49
  • Commits 3
  • Changes
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: nexedi/erp5!131

Cherry-pick this merge request

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