Skip to content

Commit 438c872

Browse files
committed
Get ready for release 5.0.0a0
1 parent 643e579 commit 438c872

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
5.0.0.alpha0
2+
------------
3+
4+
Track API changes in Mathics 5.0.0.
5+
6+
Changed to use networkx 2.8 or greater.
7+
8+
Some functionality has been removed for now, because networkx 2.8's API is a bit different with its new NodeView and EdgeView API.
9+
110
2.3.0
211
-----
312

admin-tools/pyenv-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
55
echo "This script should be *sourced* rather than run directly through bash"
66
exit 1
77
fi
8-
export PYVERSIONS='3.6.12 3.7.9 3.8.6 3.9.1'
8+
export PYVERSIONS='3.6.13 3.7.13 3.8.13 3.9.13 3.10.5'

pymathics/graph/__main__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from mathics.core.symbols import Symbol, SymbolFalse, SymbolTrue
2323
from mathics.core.systemsymbols import (
2424
SymbolBlank,
25+
SymbolFailed,
2526
SymbolGraphics,
2627
SymbolMakeBoxes,
2728
SymbolMissing,
@@ -910,7 +911,7 @@ def apply(self, graph, item, name, evaluation):
910911
"PropertyValue[{graph_Graph, item_}, name_Symbol]"
911912
value = graph.get_property(item, name.get_name())
912913
if value is None:
913-
return Symbol("$Failed")
914+
return SymbolFailed
914915
return value
915916

916917

@@ -1688,8 +1689,8 @@ def apply(self, graph, expression, evaluation, options):
16881689

16891690
class DegreeCentrality(_Centrality):
16901691
"""
1691-
>> g = Graph[{a -> b, b <-> c, d -> c, d -> a, e <-> c, d -> b}]; Sort[DegreeCentrality[g]]
1692-
= {2, 2, 3, 4, 5}
1692+
>> g = Graph[{a -> b, b <-> c, d -> c, d -> a, e <-> c, d -> b}]; DegreeCentrality[g]
1693+
= {2, 4, 5, 3, 2}
16931694
16941695
>> g = Graph[{a -> b, b <-> c, d -> c, d -> a, e <-> c, d -> b}]; DegreeCentrality[g, "In"]
16951696
= {1, 3, 3, 0, 1}
@@ -1701,7 +1702,7 @@ class DegreeCentrality(_Centrality):
17011702
def _from_dict(self, graph, centrality):
17021703
s = len(graph.G) - 1 # undo networkx's normalization
17031704
return ListExpression(
1704-
*[Integer(s * centrality.get(v, 0)) for v in graph.vertices],
1705+
*[Integer(s * centrality.get(v, 0)) for v in graph.vertices.expressions],
17051706
)
17061707

17071708
def apply(self, graph, expression, evaluation, options):

pymathics/graph/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# well as importing into Python. That's why there is no
66
# space around "=" below.
77
# fmt: off
8-
__version__="5.0.0.dev0"
8+
__version__="5.0.0a0" # noqa

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bdist_wheel]
2-
universal = 1
2+
universal = 0
33

44
[metadata]
55
description_file = README.rst

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def read(*rnames):
3131
name="pymathics-graph",
3232
version=__version__, # noqa
3333
packages=find_namespace_packages(include=["pymathics.*"]),
34-
install_requires=["Mathics3>=3.0.0", "networkx", "pydot", "matplotlib"],
34+
install_requires=["Mathics3>=5.0.0", "networkx>=2.8.0", "pydot", "matplotlib"],
3535
# don't pack Mathics in egg because of media files, etc.
3636
zip_safe=False,
3737
maintainer="Mathics Group",
@@ -48,6 +48,7 @@ def read(*rnames):
4848
"Programming Language :: Python :: 3.7",
4949
"Programming Language :: Python :: 3.8",
5050
"Programming Language :: Python :: 3.9",
51+
"Programming Language :: Python :: 3.10",
5152
"Programming Language :: Python :: Implementation :: CPython",
5253
"Programming Language :: Python :: Implementation :: PyPy",
5354
"Topic :: Scientific/Engineering",

0 commit comments

Comments
 (0)