diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..d77864a --- /dev/null +++ b/NEWS.md @@ -0,0 +1,98 @@ +1.0.0 +----- + +First public release. + +The names below follow the WL names. Look up the corresponding documentation for information about these. + +Functions provided +------------------ + +- ``AcyclicGraphQ`` +- ``AdjacencyList`` +- ``BalancedTree`` +- ``BarbellGraph`` +- ``BetweennessCentrality`` +- ``BinomialTree`` +- ``ClosenessCentrality`` +- ``CompleteGraph`` +- ``CompleteKaryTree`` +- ``ConnectedComponents`` +- ``ConnectedGraphQ`` +- ``CycleGraph`` +- ``DegreeCentrality`` +- ``DirectedEdge`` +- ``DirectedGraphQ`` +- ``EdgeAdd`` +- ``EdgeConnectivity`` +- ``EdgeCount`` +- ``EdgeDelete`` +- ``EdgeIndex`` +- ``EdgeList`` +- ``EdgeRules`` +- ``EigenvectorCentrality`` +- ``FindShortestPath`` +- ``FindSpanningTree`` +- ``FindVertexCut`` +- ``FullRAryTree`` +- ``Graph`` +- ``GraphAtlas`` +- ``GraphBox`` +- ``GraphData`` +- ``GraphDistance`` +- ``HITSCentrality`` +- ``HighlightGraph`` +- ``HknHararyGraph`` +- ``HmnHararyGraph`` +- ``KaryTree`` +- ``KatzCentrality`` +- ``LadderGraph`` +- ``LoopFreeGraphQ`` +- ``MixedGraphQ`` +- ``MultigraphQ`` +- ``PageRankCentrality`` +- ``PathGraph`` +- ``PathGraphQ`` +- ``PlanarGraphQ`` +- ``Property`` +- ``PropertyValue`` +- ``RandomGraph`` +- ``RandomTree`` +- ``SimpleGraphQ`` +- ``StarGraph`` +- ``TreeGraph`` +- ``TreeGraphQ`` +- ``UndirectedEdge`` +- ``VertexAdd`` +- ``VertexConnectivity`` +- ``VertexCount`` +- ``VertexDegree`` +- ``VertexDelete`` +- ``VertexIndex`` +- ``VertexList`` +- ``WeaklyConnectedComponents`` + + +GraphData names +---------------- + +- ``DodecahedralGraph`` +- ``DiamondGraph`` +- ``PappusGraph`` +- ``IsohedralGraph`` +- ``PetersenGraph`` + +The names below follow the WL names. Look up the corresponding documentation for information about these. +However you can also use the corresponding networkx name, e.g. "c" for "Circle", "D" for "Diamond", etc. + +Node Marker Names +---------------- + +- ``Circle`` +- ``Diamond`` +- ``Square`` +- ``Star`` +- ``Pentagon`` +- ``Octagon`` +- ``Hexagon`` +- ``Triangle`` diff --git a/README.rst b/README.rst index 7e6f436..01ce10e 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,5 @@ `Mathics `_ Graph Module using `NetworkX `_ and `Matplotlib `_ -:: - Example Session --------------- @@ -25,7 +23,6 @@ Example Session In[2]:= BinomialTree[3] In[3]:= BinomialTree[6] In[4]:= CompleteKaryTree[3, VertexLabels->True] - In[5]:= CompleteKaryTree[6] Screenshots ----------- diff --git a/admin-tools/.gitignore b/admin-tools/.gitignore new file mode 100644 index 0000000..183700b --- /dev/null +++ b/admin-tools/.gitignore @@ -0,0 +1 @@ +/.python-version diff --git a/admin-tools/make-dist.sh b/admin-tools/make-dist.sh new file mode 100755 index 0000000..ba8c7ab --- /dev/null +++ b/admin-tools/make-dist.sh @@ -0,0 +1,39 @@ +#!/bin/bash +PACKAGE=pymathics-graph + +# FIXME put some of the below in a common routine +function finish { + cd $owd +} + +cd $(dirname ${BASH_SOURCE[0]}) +owd=$(pwd) +trap finish EXIT + +if ! source ./pyenv-versions ; then + exit $? +fi + + +cd .. +source pymathics/graph/version.py +echo $__version__ + +for pyversion in $PYVERSIONS; do + if ! pyenv local $pyversion ; then + exit $? + fi + # pip bdist_egg create too-general wheels. So + # we narrow that by moving the generated wheel. + + # Pick out first two number of version, e.g. 3.7.9 -> 37 + first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//') + rm -fr build + python setup.py develop + python setup.py bdist_egg + python setup.py bdist_wheel + python setup.py bdist_wheel --universal + mv -v dist/${PACKAGE}-$VERSION-{py2.py3,py$first_two}-none-any.whl +done + +python ./setup.py sdist diff --git a/admin-tools/pyenv-versions b/admin-tools/pyenv-versions new file mode 100644 index 0000000..a45a4fc --- /dev/null +++ b/admin-tools/pyenv-versions @@ -0,0 +1,8 @@ +# -*- shell-script -*- +# Sets PYVERSIONS to be pyenv versions that +# we can use in the master branch. +if [[ $0 == ${BASH_SOURCE[0]} ]] ; then + echo "This script should be *sourced* rather than run directly through bash" + exit 1 +fi +export PYVERSIONS='3.6.12 3.7.9 3.8.6 3.9.1' diff --git a/setup.py b/setup.py index 97fb81d..8804dd7 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ import sys import platform import os +import os.path as osp from setuptools import setup, find_namespace_packages # Ensure user has the correct Python version @@ -11,8 +12,18 @@ print("Mathics support Python 3.6 and above; you have %d.%d" % sys.version_info[:2]) sys.exit(-1) +def get_srcdir(): + filename = osp.normcase(osp.dirname(osp.abspath(__file__))) + return osp.realpath(filename) + + +def read(*rnames): + return open(osp.join(get_srcdir(), *rnames)).read() + + # stores __version__ in the current namespace exec(compile(open("pymathics/graph/version.py").read(), "version.py", "exec")) +long_description = read("README.rst") + "\n" is_PyPy = platform.python_implementation() == "PyPy" @@ -24,6 +35,7 @@ # don't pack Mathics in egg because of media files, etc. zip_safe=False, maintainer="Mathics Group", + long_description=long_description, long_description_content_type="text/x-rst", # metadata for upload to PyPI classifiers=[