Skip to content

Commit ca7433c

Browse files
committed
Administrivia....
Add NEWS.md and code to build distribution
1 parent 7a025bd commit ca7433c

File tree

6 files changed

+158
-3
lines changed

6 files changed

+158
-3
lines changed

NEWS.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
1.0.0
2+
-----
3+
4+
First public release.
5+
6+
The names below follow the WL names. Look up the corresponding documentation for information about these.
7+
8+
Functions provided
9+
------------------
10+
11+
- ``AcyclicGraphQ``
12+
- ``AdjacencyList``
13+
- ``BalancedTree``
14+
- ``BarbellGraph``
15+
- ``BetweennessCentrality``
16+
- ``BinomialTree``
17+
- ``ClosenessCentrality``
18+
- ``CompleteGraph``
19+
- ``CompleteKaryTree``
20+
- ``ConnectedComponents``
21+
- ``ConnectedGraphQ``
22+
- ``CycleGraph``
23+
- ``DegreeCentrality``
24+
- ``DirectedEdge``
25+
- ``DirectedGraphQ``
26+
- ``EdgeAdd``
27+
- ``EdgeConnectivity``
28+
- ``EdgeCount``
29+
- ``EdgeDelete``
30+
- ``EdgeIndex``
31+
- ``EdgeList``
32+
- ``EdgeRules``
33+
- ``EigenvectorCentrality``
34+
- ``FindShortestPath``
35+
- ``FindSpanningTree``
36+
- ``FindVertexCut``
37+
- ``FullRAryTree``
38+
- ``Graph``
39+
- ``GraphAtlas``
40+
- ``GraphBox``
41+
- ``GraphData``
42+
- ``GraphDistance``
43+
- ``HITSCentrality``
44+
- ``HighlightGraph``
45+
- ``HknHararyGraph``
46+
- ``HmnHararyGraph``
47+
- ``KaryTree``
48+
- ``KatzCentrality``
49+
- ``LadderGraph``
50+
- ``LoopFreeGraphQ``
51+
- ``MixedGraphQ``
52+
- ``MultigraphQ``
53+
- ``PageRankCentrality``
54+
- ``PathGraph``
55+
- ``PathGraphQ``
56+
- ``PlanarGraphQ``
57+
- ``Property``
58+
- ``PropertyValue``
59+
- ``RandomGraph``
60+
- ``RandomTree``
61+
- ``SimpleGraphQ``
62+
- ``StarGraph``
63+
- ``TreeGraph``
64+
- ``TreeGraphQ``
65+
- ``UndirectedEdge``
66+
- ``VertexAdd``
67+
- ``VertexConnectivity``
68+
- ``VertexCount``
69+
- ``VertexDegree``
70+
- ``VertexDelete``
71+
- ``VertexIndex``
72+
- ``VertexList``
73+
- ``WeaklyConnectedComponents``
74+
75+
76+
GraphData names
77+
----------------
78+
79+
- ``DodecahedralGraph``
80+
- ``DiamondGraph``
81+
- ``PappusGraph``
82+
- ``IsohedralGraph``
83+
- ``PetersenGraph``
84+
85+
The names below follow the WL names. Look up the corresponding documentation for information about these.
86+
However you can also use the corresponding networkx name, e.g. "c" for "Circle", "D" for "Diamond", etc.
87+
88+
Node Marker Names
89+
----------------
90+
91+
- ``Circle``
92+
- ``Diamond``
93+
- ``Square``
94+
- ``Star``
95+
- ``Pentagon``
96+
- ``Octagon``
97+
- ``Hexagon``
98+
- ``Triangle``

README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
`Mathics <https://mathics.org>`_ Graph Module using `NetworkX <https://networkx.org/>`_ and `Matplotlib <https://matplotlib.org>`_
22

3-
::
4-
53
Example Session
64
---------------
75

@@ -25,7 +23,6 @@ Example Session
2523
In[2]:= BinomialTree[3]
2624
In[3]:= BinomialTree[6]
2725
In[4]:= CompleteKaryTree[3, VertexLabels->True]
28-
In[5]:= CompleteKaryTree[6]
2926

3027
Screenshots
3128
-----------

admin-tools/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.python-version

admin-tools/make-dist.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
PACKAGE=pymathics-graph
3+
4+
# FIXME put some of the below in a common routine
5+
function finish {
6+
cd $owd
7+
}
8+
9+
cd $(dirname ${BASH_SOURCE[0]})
10+
owd=$(pwd)
11+
trap finish EXIT
12+
13+
if ! source ./pyenv-versions ; then
14+
exit $?
15+
fi
16+
17+
18+
cd ..
19+
source pymathics/graph/version.py
20+
echo $__version__
21+
22+
for pyversion in $PYVERSIONS; do
23+
if ! pyenv local $pyversion ; then
24+
exit $?
25+
fi
26+
# pip bdist_egg create too-general wheels. So
27+
# we narrow that by moving the generated wheel.
28+
29+
# Pick out first two number of version, e.g. 3.7.9 -> 37
30+
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
31+
rm -fr build
32+
python setup.py develop
33+
python setup.py bdist_egg
34+
python setup.py bdist_wheel
35+
python setup.py bdist_wheel --universal
36+
mv -v dist/${PACKAGE}-$VERSION-{py2.py3,py$first_two}-none-any.whl
37+
done
38+
39+
python ./setup.py sdist

admin-tools/pyenv-versions

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- shell-script -*-
2+
# Sets PYVERSIONS to be pyenv versions that
3+
# we can use in the master branch.
4+
if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
5+
echo "This script should be *sourced* rather than run directly through bash"
6+
exit 1
7+
fi
8+
export PYVERSIONS='3.6.12 3.7.9 3.8.6 3.9.1'

setup.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@
44
import sys
55
import platform
66
import os
7+
import os.path as osp
78
from setuptools import setup, find_namespace_packages
89

910
# Ensure user has the correct Python version
1011
if sys.version_info < (3, 6):
1112
print("Mathics support Python 3.6 and above; you have %d.%d" % sys.version_info[:2])
1213
sys.exit(-1)
1314

15+
def get_srcdir():
16+
filename = osp.normcase(osp.dirname(osp.abspath(__file__)))
17+
return osp.realpath(filename)
18+
19+
20+
def read(*rnames):
21+
return open(osp.join(get_srcdir(), *rnames)).read()
22+
23+
1424
# stores __version__ in the current namespace
1525
exec(compile(open("pymathics/graph/version.py").read(), "version.py", "exec"))
26+
long_description = read("README.rst") + "\n"
1627

1728
is_PyPy = platform.python_implementation() == "PyPy"
1829

@@ -24,6 +35,7 @@
2435
# don't pack Mathics in egg because of media files, etc.
2536
zip_safe=False,
2637
maintainer="Mathics Group",
38+
long_description=long_description,
2739
long_description_content_type="text/x-rst",
2840
# metadata for upload to PyPI
2941
classifiers=[

0 commit comments

Comments
 (0)