Skip to content

Commit

Permalink
Administrivia....
Browse files Browse the repository at this point in the history
Add NEWS.md and code to build distribution
  • Loading branch information
rocky committed Dec 24, 2020
1 parent 7a025bd commit ca7433c
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 3 deletions.
98 changes: 98 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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``
3 changes: 0 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
`Mathics <https://mathics.org>`_ Graph Module using `NetworkX <https://networkx.org/>`_ and `Matplotlib <https://matplotlib.org>`_

::

Example Session
---------------

Expand All @@ -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
-----------
Expand Down
1 change: 1 addition & 0 deletions admin-tools/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.python-version
39 changes: 39 additions & 0 deletions admin-tools/make-dist.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions admin-tools/pyenv-versions
Original file line number Diff line number Diff line change
@@ -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'
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,26 @@
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
if sys.version_info < (3, 6):
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"

Expand All @@ -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=[
Expand Down

0 comments on commit ca7433c

Please sign in to comment.