Skip to content

Commit ec63d09

Browse files
committed
start restructuring for pip
1 parent 97a48da commit ec63d09

39 files changed

+78
-35
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Vince Kurtz
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

STL/__init__.py

-2
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

reach_avoid.py renamed to examples/reach_avoid.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
import numpy as np
1313
import matplotlib.pyplot as plt
14-
from scenarios.reach_avoid import reach_avoid_specification, plot_reach_avoid_scenario
15-
from systems import DoubleIntegrator
16-
from solvers import *
14+
15+
from pySTL.benchmarks.reach_avoid import reach_avoid_specification, plot_reach_avoid_scenario
16+
from pySTL.systems import DoubleIntegrator
17+
from pySTL.solvers import *
1718

1819
# Specification Parameters
1920
goal_bounds = (7,8,8,9) # (xmin, xmax, ymin, ymax)
File renamed without changes.
File renamed without changes.

pySTL/STL/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from .formula import STLTree, STLFormula
2+
from .predicate import STLPredicate
File renamed without changes.

STL/predicate.py renamed to pySTL/STL/predicate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
from STL.formula import STLFormula
2+
from .formula import STLFormula
33

44
class STLPredicate(STLFormula):
55
"""

pySTL/__init__.py

Whitespace-only changes.

pySTL/benchmarks/__init__.py

Whitespace-only changes.

scenarios/common.py renamed to pySTL/benchmarks/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
##
66

77
import numpy as np
8-
from STL import STLTree, STLPredicate
8+
from pySTL.STL import STLTree, STLPredicate
99
from matplotlib.patches import Rectangle
1010

1111
def inside_rectangle_formula(bounds, y1_index, y2_index, d, name=None):

scenarios/door_puzzle.py renamed to pySTL/benchmarks/door_puzzle.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from scenarios.common import *
1+
from .common import (inside_rectangle_formula,
2+
outside_rectangle_formula,
3+
make_rectangle_patch)
24
import matplotlib.pyplot as plt
35
from matplotlib.patches import Rectangle
46

scenarios/either_or.py renamed to pySTL/benchmarks/either_or.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from scenarios.common import *
1+
from .common import (inside_rectangle_formula,
2+
outside_rectangle_formula,
3+
make_rectangle_patch)
24
import matplotlib.pyplot as plt
35
from matplotlib.patches import Rectangle
46

scenarios/narrow_passage.py renamed to pySTL/benchmarks/narrow_passage.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from scenarios.common import *
1+
from .common import (inside_rectangle_formula,
2+
outside_rectangle_formula,
3+
make_rectangle_patch)
24
import matplotlib.pyplot as plt
35
from matplotlib.patches import Rectangle
46

scenarios/random_multitarget.py renamed to pySTL/benchmarks/random_multitarget.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from scenarios.common import *
1+
from .common import (inside_rectangle_formula,
2+
outside_rectangle_formula,
3+
make_rectangle_patch)
24
import numpy as np
35
import matplotlib.pyplot as plt
46
from matplotlib.patches import Rectangle

scenarios/reach_avoid.py renamed to pySTL/benchmarks/reach_avoid.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from scenarios.common import *
1+
from .common import (inside_rectangle_formula,
2+
outside_rectangle_formula,
3+
make_rectangle_patch)
24
import matplotlib.pyplot as plt
35
from matplotlib.patches import Rectangle
46

scenarios/stepping_stones.py renamed to pySTL/benchmarks/stepping_stones.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from scenarios.common import *
1+
from .common import (inside_rectangle_formula,
2+
outside_rectangle_formula,
3+
make_rectangle_patch)
24
import numpy as np
35
import matplotlib.pyplot as plt
46
from matplotlib.patches import Rectangle

pySTL/solvers/__init__.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from .scipy.gradient_solver import ScipyGradientSolver
2+
3+
from .gurobi.gurobi_micp import GurobiMICPSolver
4+
5+
from .drake.drake_micp import DrakeMICPSolver
6+
from .drake.drake_smooth import DrakeSmoothSolver
7+
from .drake.drake_sos1 import DrakeSos1Solver
File renamed without changes.

pySTL/solvers/drake/__init__.py

Whitespace-only changes.

solvers/drake/drake_base.py renamed to pySTL/solvers/drake/drake_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from solvers.base import STLSolver
1+
from ..base import STLSolver
22
from pydrake.all import MathematicalProgram, eq, ge, le
33

44
class DrakeSTLSolver(STLSolver):

solvers/drake/drake_micp.py renamed to pySTL/solvers/drake/drake_micp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from solvers.drake.drake_base import DrakeSTLSolver
2-
from STL import STLPredicate
1+
from .drake_base import DrakeSTLSolver
2+
from ...STL import STLPredicate
33
import numpy as np
44
import time
55
from pydrake.all import (MathematicalProgram,

solvers/drake/drake_smooth.py renamed to pySTL/solvers/drake/drake_smooth.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from solvers.drake.drake_base import DrakeSTLSolver
2-
from STL import STLPredicate
1+
from .drake_base import DrakeSTLSolver
2+
from ...STL import STLPredicate
33
import numpy as np
44

55
from pydrake.all import MathematicalProgram, eq, le, ge

solvers/drake/drake_sos1.py renamed to pySTL/solvers/drake/drake_sos1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from solvers.drake.drake_micp import DrakeMICPSolver
2-
from STL import STLPredicate
1+
from .drake_micp import DrakeMICPSolver
2+
from ...STL import STLPredicate
33
import numpy as np
44
from pydrake.all import (MathematicalProgram,
55
GurobiSolver, MosekSolver,

pySTL/solvers/gurobi/__init__.py

Whitespace-only changes.

solvers/gurobi/gurobi_micp.py renamed to pySTL/solvers/gurobi/gurobi_micp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from solvers.base import STLSolver
2-
from STL import STLPredicate
1+
from ..base import STLSolver
2+
from ...STL import STLPredicate
33
import numpy as np
44

55
import gurobipy as gp

pySTL/solvers/scipy/__init__.py

Whitespace-only changes.

solvers/scipy/gradient_solver.py renamed to pySTL/solvers/scipy/gradient_solver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import time
33
from scipy.optimize import minimize
4-
from solvers import STLSolver
4+
from ..base import STLSolver
55

66
class ScipyGradientSolver(STLSolver):
77
"""

pySTL/systems/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from .linear import LinearSystem, DoubleIntegrator
2+
from .nonlinear import NonlinearSystem

systems/linear.py renamed to pySTL/systems/linear.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from systems.nonlinear import NonlinearSystem
1+
from .nonlinear import NonlinearSystem
22
import numpy as np
33

44
class LinearSystem(NonlinearSystem):
File renamed without changes.

requirements.txt

Whitespace-only changes.

setup.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(name='pySTL',
4+
version='0.2',
5+
description='A Python library for Signal Temporal Logic',
6+
url='http://github.com/vincekurtz/pySTL',
7+
author='Vince Kurtz',
8+
author_email='vjkurtz@gmail.com',
9+
license='MIT',
10+
packages=find_packages(),
11+
zip_safe=False)

solvers/__init__.py

-9
This file was deleted.

systems/__init__.py

-2
This file was deleted.

0 commit comments

Comments
 (0)