Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move mathics.core.builtin initialization code into system_initialize() #648

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Dec 7, 2022

  1. Configuration menu
    Copy the full SHA
    6b93c23 View commit details
    Browse the repository at this point in the history
  2. Move mathics.core.builtin code into system_init...

    Although we now require a frontend to *explicitly* call
    ``initialize_system()`` and this may seem more akward, it is helpful
    and important for a couple of reasons.
    
    First, it provides better modularization and reduces circular imports:
    ``mathics.builtin``  is a close to top-level import and, in contrast to
    ``mathics.builtin.system_init`` there are a lot of modules underneath
    ``mathics.builtin``. (There are none under
    ``mathics.builtin.system_init``).
    
    As a result we can have more ``import mathics.builtin.system_init`` from a module
    where we can't do the same for ``import mathics.builtin``.
    
    Second, by placing initialization of structures which do not
    change outside of development we are in a better position to have write
    and admninstrative tool to load all of this and dump it to as a system
    image, which can be read in rather than built it up from scratch as
    happens now. This new function ``initialize_system`` might have a parameter
    to read the image file rather than do the work it does now.
    
    In its current form though ``initialize_system()`` does as not
    encapsulate system loading as much as it could.
    rocky committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    3251989 View commit details
    Browse the repository at this point in the history
  3. builtin.system_init -> core.system_init

    Move system initialization module out of mathics.builtin.
    (Similar to PR #639)
    
    This also removes the need for Python to "partially initialize"
    mathics.builtin since it doesn't import one of its children
    
    Merge mess
    rocky committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    e1e0c44 View commit details
    Browse the repository at this point in the history