Skip to content

Commit 9d28959

Browse files
committed
pymathics.graph: Mathic Graph functions
0 parents  commit 9d28959

File tree

7 files changed

+2605
-0
lines changed

7 files changed

+2605
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*~
2+
/.python-version
3+
/pymathics_graph.egg-info
4+
__pycache__

Makefile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# A GNU Makefile to run various tasks - compatibility for us old-timers.
2+
3+
# Note: This makefile include remake-style target comments.
4+
# These comments before the targets start with #:
5+
# remake --tasks to shows the targets and the comments
6+
7+
GIT2CL ?= admin-tools/git2cl
8+
PYTHON ?= python3
9+
PIP ?= pip3
10+
RM ?= rm
11+
12+
.PHONY: all build \
13+
check clean \
14+
develop dist doc doc-data \
15+
pypi-setup \
16+
pytest \
17+
rmChangeLog \
18+
test
19+
20+
#: Default target - same as "develop"
21+
all: develop
22+
23+
#: build everything needed to install
24+
build: pypi-setup
25+
$(PYTHON) ./setup.py build
26+
27+
#: Check Python version, and install PyPI dependencies
28+
pypi-setup:
29+
$(PIP) install -e .
30+
31+
#: Set up to run from the source tree
32+
develop: pypi-setup
33+
34+
#: Install pymathics.graph
35+
install: pypi-setup
36+
$(PYTHON) setup.py install
37+
38+
# Run tests
39+
check: pytest doctest
40+
41+
#: Remove derived files
42+
clean: clean-pyc
43+
44+
#: Remove old PYC files
45+
clean-pyc:
46+
@find . -name "*.pyc" -type f -delete
47+
48+
#: Run py.test tests. Use environment variable "o" for pytest options
49+
pytest:
50+
py.test test $o
51+
52+
53+
# #: Create data that is used to in Django docs and to build TeX PDF
54+
# doc-data mathics/doc/tex/data: mathics/builtin/*.py mathics/doc/documentation/*.mdoc mathics/doc/documentation/images/*
55+
# $(PYTHON) mathics/test.py -ot -k
56+
57+
#: Run tests that appear in docstring in the code.
58+
doctest:
59+
$(PYTHON) mathics/test.py $o
60+
61+
# #: Make Mathics PDF manual
62+
# doc mathics.pdf: mathics/doc/tex/data
63+
# (cd mathics/doc/tex && $(MAKE) mathics.pdf)
64+
65+
#: Remove ChangeLog
66+
rmChangeLog:
67+
$(RM) ChangeLog || true
68+
69+
#: Create a ChangeLog from git via git log and git2cl
70+
ChangeLog: rmChangeLog
71+
git log --pretty --numstat --summary | $(GIT2CL) >$@

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Mathics Graph Module
2+
3+
::
4+
5+
$ make develop # or make install
6+
7+
The above ``make`` command uses defaults the language to English. If
8+
you would like to install for another language set the variable
9+
``LANG``. For example:
10+
11+
::

pymathics/graph/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""Pymathics Graph - Working with Graphs (Vertices and Edgies)
2+
3+
This module provides functions and variables for workting with
4+
graphs.
5+
"""
6+
7+
8+
from pymathics.graph.__main__ import *
9+
from pymathics.graph.version import __version__
10+
11+
pymathics_version_data = {
12+
"author": "The Mathics Team",
13+
"version": __version__,
14+
"name": "Graph",
15+
"requires": ["networkx"],
16+
}

0 commit comments

Comments
 (0)