From 56ea961887d507114174af5f92b8c3c77b0b7a50 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 6 Oct 2016 13:03:42 -0400 Subject: [PATCH] Reorganize the source under src/dunshire. --- makefile | 2 +- src/dunshire/__init__.py | 14 ++++++++++++++ cones.py => src/dunshire/cones.py | 0 errors.py => src/dunshire/errors.py | 0 matrices.py => src/dunshire/matrices.py | 0 .../dunshire/symmetric_linear_game.py | 0 test/suite.py | 2 +- 7 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/dunshire/__init__.py rename cones.py => src/dunshire/cones.py (100%) rename errors.py => src/dunshire/errors.py (100%) rename matrices.py => src/dunshire/matrices.py (100%) rename symmetric_linear_game.py => src/dunshire/symmetric_linear_game.py (100%) diff --git a/makefile b/makefile index 9f59a36..2ef17ef 100644 --- a/makefile +++ b/makefile @@ -4,7 +4,7 @@ check: .PHONY: lint lint: - pylint --reports=n *.py + PYTHONPATH="src/dunshire" pylint --reports=n src/dunshire/*.py .PHONY: clean clean: diff --git a/src/dunshire/__init__.py b/src/dunshire/__init__.py new file mode 100644 index 0000000..55e7968 --- /dev/null +++ b/src/dunshire/__init__.py @@ -0,0 +1,14 @@ +""" +The "user interface" for Dunshire. + +Clients are intended to import everything from this module, which in +turn pulls in everything that they would need to use the library. +""" + +# Needed to construct the cone over which the game takes place. +from cones import (NonnegativeOrthant, + IceCream, + SymmetricPSD, + CartesianProduct) + +from symmetric_linear_game import SymmetricLinearGame diff --git a/cones.py b/src/dunshire/cones.py similarity index 100% rename from cones.py rename to src/dunshire/cones.py diff --git a/errors.py b/src/dunshire/errors.py similarity index 100% rename from errors.py rename to src/dunshire/errors.py diff --git a/matrices.py b/src/dunshire/matrices.py similarity index 100% rename from matrices.py rename to src/dunshire/matrices.py diff --git a/symmetric_linear_game.py b/src/dunshire/symmetric_linear_game.py similarity index 100% rename from symmetric_linear_game.py rename to src/dunshire/symmetric_linear_game.py diff --git a/test/suite.py b/test/suite.py index e66d3ad..836e0ba 100644 --- a/test/suite.py +++ b/test/suite.py @@ -3,7 +3,7 @@ import doctest # Add '../' to our path. from site import addsitedir -addsitedir('.') +addsitedir('./src/dunshire') import cones import matrices import symmetric_linear_game -- 2.44.2