Skip to content

Commit

Permalink
Merge pull request #29 from Mathics3/update_Mathics7
Browse files Browse the repository at this point in the history
Update mathics7
  • Loading branch information
rocky authored Jan 16, 2024
2 parents dceac5f + 38d2534 commit 4824f84
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
5 changes: 1 addition & 4 deletions pymathics/graph/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from inspect import isgenerator
from typing import Callable, Optional, Union

from mathics.builtin.base import AtomBuiltin, Builtin
from mathics.core.builtin import AtomBuiltin, Builtin
from mathics.core.atoms import Atom, Integer, Integer0, Integer1, Integer2, String
from mathics.core.convert.expression import ListExpression, from_python, to_mathics_list
from mathics.core.element import BaseElement
Expand Down Expand Up @@ -854,7 +854,6 @@ class AdjacencyList(_NetworkXBuiltin):
summary_text = "list the adjacent vertices"

def _retrieve(self, graph, what, neighbors, expression, evaluation):

if what.get_head_name() in pattern_objects:
collected = set()
match = Matcher(what).match
Expand Down Expand Up @@ -1426,7 +1425,6 @@ def eval(self, graph, what, expression, evaluation, options) -> Optional[Graph]:
"VertexDelete[graph_, what_, OptionsPattern[VertexDelete]]"
graph = self._build_graph(graph, evaluation, options, expression)
if graph:

head_name = what.get_head_name()
if head_name in pattern_objects:
cases = Expression(
Expand Down Expand Up @@ -1566,7 +1564,6 @@ def eval(self, graph, what, expression, evaluation, options) -> Optional[Graph]:
"EdgeDelete[graph_, what_, OptionsPattern[EdgeDelete]]"
graph = self._build_graph(graph, evaluation, options, expression)
if graph:

head_name = what.get_head_name()
if head_name in pattern_objects:
cases = Expression(
Expand Down
2 changes: 1 addition & 1 deletion pymathics/graph/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
**{"GraphLayout": '"tree"'},
}

from mathics.builtin.base import AtomBuiltin
from mathics.core.builtin import AtomBuiltin


# FIXME: do we need to have TreeGraphAtom and TreeGraph?
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def read(*rnames):
version=__version__, # noqa
packages=find_namespace_packages(include=["pymathics.*"]),
install_requires=[
"Mathics3>=6.0.1",
"Mathics3>=7.0.0dev",
"networkx>=3.0.0",
"pydot",
"matplotlib",
Expand Down
3 changes: 2 additions & 1 deletion test/consistency-and-style/test_summary_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import pytest

from pymathics.graph import __file__ as module_initfile_path
from mathics.builtin.base import Builtin

from mathics.core.builtin import Builtin
from mathics.core.load_builtin import name_is_builtin_symbol
from mathics.doc.common_doc import skip_doc

Expand Down
3 changes: 2 additions & 1 deletion test/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from mathics.core.load_builtin import import_and_load_builtins
from mathics.core.symbols import Symbol
from mathics.core.load_builtin import import_and_load_builtins
from mathics.session import MathicsSession

import_and_load_builtins()
Expand All @@ -12,7 +13,7 @@
# For consistency set the character encoding ASCII which is
# the lowest common denominator available on all systems.
session = MathicsSession(
add_builtin=True, catch_interrupt=False, character_encoding="ASCII"
character_encoding="ASCII"
)


Expand Down

0 comments on commit 4824f84

Please sign in to comment.