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 more builtin module loading code out of mathics/builtin/__init__.py #875

Merged
merged 3 commits into from
Jul 9, 2023

Conversation

rocky
Copy link
Member

@rocky rocky commented Jul 9, 2023

Next iteration in sequence of refactorings.

Here, the remaining code that should have been put into a function has been moved out of mathics/builtin/__init__.py and into mathics.core.builtin_load and imports have been adjusted which reduces circular dependencies.

Remaining refactoring:

Initiate the module loading from the mathics.core.builtin_load module.

Loading currently needs to be rewritten. It currently gets all builtin module names. then from that returned collection imports all module names, then from that collection ... all ... all ...

Instead, of many "all" loops, we need to do follow through everything a specific module name. To do everything, that is in one loop (over builtin module names) and no further loops would follow.

rocky added 3 commits July 9, 2023 10:55
Some imports moved as well.
is_symbol_name comes from mathics_scanner, not the parser.
And modularity is further improved.
Copy link
Contributor

@mmatera mmatera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rocky rocky merged commit 89bcbee into master Jul 9, 2023
11 checks passed
@rocky rocky deleted the load-module-control branch July 9, 2023 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants